-
Notifications
You must be signed in to change notification settings - Fork 59
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
Enable packing w/o padding for PointCloudMsgs #493
base: gz-sensors9
Are you sure you want to change the base?
Conversation
Signed-off-by: Maksim Derbasov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me, but I haven't verified if memory alignment is no longer necessary in ROS 2. @ahcorde / @mjcarroll can you confirm?
changes look good to me as well. Just need confirmation that this is fine to do and all these sensors should continue to work fine in ROS 2. |
Ping C: |
@peci1 I noticed you have some context seeing you created PointCloudLibrary/pcl#4939. Mind taking a look? |
I don't think this part of Gazebo should care too much about ROS. That should be the job of ros_gz. However, I think neither padding nor not padding is correct. I'd make this a configuration option. |
Thanks for the input @peci1.
I agree, but if what we do here makes it more difficult to bridge to ROS efficiently, we should reconsider.
What I don't quite get is if the padding would actually be useful here. Wouldn't the PCL PointCloud data structure be created from the message based on the values in the |
I tried to answer the same question, seems all conversion magic happens here and I not sure how this packing offsets from GZ are propagated to ROS msg |
If that is true, then any alignment is ignored. |
That's in
I guess we don't know for sure. @ntfshard since there's a lot of uncertainty here, I'd rather not merge this as-is without more evidence that this would not break existing systems. One way we can find out is to write test code that uses the PCL APIs (https://github.com/ros-perception/perception_pcl/blob/ros2/pcl_conversions/include/pcl_conversions/pcl_conversions.h) to convert a Alternatively, we can make this configurable. If we go that route, we'll have to figure out where the configuration is specified (e.g. in the SDF |
I see, yes, it's understandable concerns.
I'd like to clarify this part. You mean not a unit test, but some application which performs conversion and comparing, like an experiment? Because we don't have a ROS code here it feels like something which is not belong here.
It feels quite heavy solution I suppose |
Yes, more of an experiment to convince ourselves that this is safe. |
Also I tried GZ GPULidar plugin with Rviz (through the bridge), and it worked fine |
Hmm... Can you also try with intensity somewhere in the middle? |
And release mode, of course...? |
I do not provide a new version of archive of sources due to it's just 2 line change (intensity goes up on 1 line and some extra keys in cmake file) It could be much more convenient if we have a design documentation or technical specification to ROS2 messages. |
🦟 Bug fix
Fixes #
Summary
According to comments in code, we have to add a padding for fields in packed points msg for ROS1. And due to current branch is not supporting ROS1, we can switch this padding off to increase throughput.
I checked this change with lidar and rviz and it seems working fine (which I mentioned in comment here)
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.