Repository navigation
feat(autoware): Add PointField struct - #801
Merged
Merged
Conversation
romancardenas
force-pushed
the
autoware/point_field
branch
from
November 17, 2026 04:00
afd4ebe to
9a60fea
Compare
romancardenas
marked this pull request as ready for review
November 17, 2026 04:06
This was referenced Nov 17, 2026
nokosaaan
approved these changes
Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is part of #748
It addresses @nokosaaan 's comments in #783. The idea is trying to get an alternative implementation that avoids allocations in the heap. I will divide the contribution in several PRs, as it will ease the review process.
This PR only adds the
PointFieldstructure. Unlike in ROS2's autoware, the message fields are private, and fields are checked at construction time to avoid overflows.The structure itself contains multiple convenience methods to access point field values on a point.
This PR also includes a
TypedPointField<T>struct that provides access to typed data structures.Both
PointFieldandTypedPointField<T>provideiteranditer_mutmethods that allow iterating over all the values of a field. The prior iterates over byte chunks, while the later iterates over typed data structures.The
PointFieldhas convenience methods to get range indices for a given position of a value. Alternatively, theTypedPointFieldallows reading and writing a typed value with thetry_readandtry_writemethods.How was this PR tested?
scripts/ci.shpasses on my machine.