-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PointCloud2 fields not always sorted by offset #434
Comments
That makes sense - happy to review a PR |
@SteveMacenski Thanks for the feedback. I will see if I have the time to dig into this a bit more. I looked over the code quickly yesterday and I wasn't entirely sure what was going on. |
For your information: this also came up in PCL itself a few months ago: PointCloudLibrary/pcl#5598 (comment) |
Some ROS
sensor_msgs/PointCloud2
messages created with the functions defined in plc_conversion.h will not have thefields
attribute sorted by offset. I don't think that is a documented requirement, so the messages are fine and readable with most tools. However, most of the time the fields are sorted in that way and it looks like some tools do assume that the field is sorted that way (for example eric-wieser/ros_numpy#40). I believe in general would be good practice to always make sure that the fields in point cloud messages are sorted in such a way, even though it is not specified.The issue linked above has an example of a message that is not sorted. It was created with
pcl::toROSMsg()
from apcl::PointXYZINormal
type point cloud object. Thecurvature
andintensity
fields are both populated as used here. The fields look like this:The text was updated successfully, but these errors were encountered: