Skip to content
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

Refactor rgbd_camera_bridge demo #643

Merged
merged 12 commits into from
Dec 18, 2024
Merged

Conversation

caguero
Copy link
Contributor

@caguero caguero commented Nov 12, 2024

Refactors the rgbd_camera_bridge demo leveraging the latest improvements in ros_gz.

  • I replaced the previous launch file from Python to XML.
  • I didn't tackle the options using ros_gz_image or ros_gz_point_cloud for now.

Summary

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

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.

@caguero caguero marked this pull request as ready for review November 22, 2024 20:41
@caguero caguero requested a review from ahcorde as a code owner November 22, 2024 20:41
ahcorde

This comment was marked as outdated.

Copy link
Collaborator

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar comment #634

Copy link
Collaborator

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you to add the Grid plugin to RViz?

@caguero
Copy link
Contributor Author

caguero commented Dec 13, 2024

Do you to add the Grid plugin to RViz?

Loaded in aebe372.

@caguero
Copy link
Contributor Author

caguero commented Dec 13, 2024

similar comment #634

This one is a bit tricker. The rgbd_camera sensor publishes on the ROS side:

- topic_name: "/rgbd_camera/image"
 ros_type_name: "sensor_msgs/msg/Image"
- topic_name: "/rgbd_camera/camera_info"
  ros_type_name: "sensor_msgs/msg/CameraInfo"
- topic_name: "/rgbd_camera/depth_image"
  ros_type_name: "sensor_msgs/msg/Image"
- topic_name: "/rgbd_camera/points"
  ros_type_name: "sensor_msgs/msg/PointCloud2"

All of these topics share the same frame_id, which is rgbd_camera/link/rgbd_camera. The problem is that the ROS/Gazebo coordinate convention is different for all these topics except for /rgbd_camera/points, which is correct.

The proper solution should be to republish /rgbd_camera/image, /rgbd_camera/camera_info and /rgbd_camera/depth_image with a different topic and also changing frame_id. We could then add a static_transform_publisher for the new frame_id with the transformation.

Alternatively, we could also try to resurrect #257 and combine it with some remappings similar to https://github.com/osrf/mbzirc/blob/main/mbzirc_ign/src/mbzirc_ign/model.py#L235-L260 (thanks @iche033 for the pointers).

I'd leave it for a separate PR.

@ahcorde ahcorde enabled auto-merge (squash) December 18, 2024 20:41
@ahcorde ahcorde merged commit 5cc492c into ros2 Dec 18, 2024
4 of 5 checks passed
@ahcorde ahcorde deleted the caguero/rgbd_camera_bridge_demo_v2 branch December 18, 2024 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants