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

ROS2: cannot change image_transport plugin used by rtabmap's nodes #1181

Open
matlabbe opened this issue Jul 5, 2024 · 0 comments
Open

ROS2: cannot change image_transport plugin used by rtabmap's nodes #1181

matlabbe opened this issue Jul 5, 2024 · 0 comments
Labels

Comments

@matlabbe
Copy link
Member

matlabbe commented Jul 5, 2024

Under ros1, we could do:

rosrun rtabmap_odom rgbd_odometry _rgb/image_transport:=compressed _depth/image_transport:=compressedDepth
...
/rgbd_odometry subscribed to (approx sync):
   /rgb/image/compressed \
   /depth/image/compressedDepth \
   /rgb/camera_info
...

and the node will subscribe to input topics with corresponding image_transport suffix.

Similar commands under ROS2 don't work:

ros2 run rtabmap_odom rgbd_odometry --ros-args -p rgb/image_transport:=compressed -p depth/image_transport:=compressedDepth
...
rgbd_odometry subscribed to (approx sync):
   /rgb/image,
   /depth/image,
   /rgb/camera_info
...
ros2 run rtabmap_odom rgbd_odometry --ros-args -p image_transport:=compressed
...
rgbd_odometry subscribed to (approx sync):
   /rgb/image,
   /depth/image,
   /rgb/camera_info
...

Workaround

Current workaround is to use image_transport's republish node:

ros2 run image_transport republish compressed raw --ros-args -r in/compressed:=/rgb/image/compressed -r out:=/rgb/image
ros2 run image_transport republish compressedDepth raw --ros-args -r in/compressedDepth:=/depth/image/compressed -r out:=/depth/image
ros2 run rtabmap_odom rgbd_odometry 
...
rgbd_odometry subscribed to (approx sync):
   /rgb/image,
   /depth/image,
   /rgb/camera_info
...
@matlabbe matlabbe added the bug label Jul 5, 2024
@matlabbe matlabbe changed the title ROS2: cannot change image_transport plugin ROS2: cannot change image_transport plugin used by rtabmap's nodes Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant