Add custom point cloud frame ID support to Depth and RGBD camera sensors #582
Add custom point cloud frame ID support to Depth and RGBD camera sensors #582david-wb wants to merge 1 commit intogazebosim:mainfrom
Conversation
a74e34e to
3cec41b
Compare
|
my understanding from going over #488 again is that a separate frame id field is not desired for reasons mentioned in #488 (comment) - mainly that the separate frame is needed by ROS and so that frame should be created in ros_gz. I started the work on this in gazebosim/ros_gz#703 but haven't had the chance to get back to it. |
|
Only one frame is needed on ROS side IMHO. |
|
@iche033 |
|
Ok I don't want to go back and forth between different solutions to the optical frame problem as that caused other complaints before. If you're ok with any solution and just want the problem resolved, I just updated gazebosim/ros_gz#703 - Would you able to give that PR a try? |
- Introduced `pointCloudFrameId` member variable to store custom frame ID. - Updated `Load` method to check for `points_frame_id` in SDF and set the frame ID accordingly. - Modified point cloud initialization to use the custom frame ID if specified. - Added integration tests for custom point cloud frame ID functionality. - Created SDF files for testing with and without custom frame IDs. Signed-off-by: David Brown <davewbrwn@gmail.com>
3cec41b to
0e90f16
Compare
🎉 New feature
Closes #488
Summary
The problem
Currently, the depth and rgbd cameras use the content from the
<frame_id>tag or the default frameId for both thethe images and the point cloud. However, the images typically need an optical frame id while the point cloud needs a "sensor" frame id.
The Solution
This proposed change enables depth and rbgd camera sensors to include a new
<points_frame_id>tag to use for the point cloud messages. This is not a breaking change, because when the tag is not included, behavior is unchanged.Example:
Test it
To test manually, launch gazebo sim with a urdf containing a depth camera that uses the new tag. Then verify frame ids on the images and point clouds are correct.
Checklist
codecheckpassed (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-byandGenerated-bymessages.