jayprajapati009 / ros1_bridge_tutorial

Tutorial: Using `ros1_bridge` Package for ROS 1 (Noetic) and ROS 2 (Humble)
5 stars 0 forks source link

How to handle /rosout #1

Open Ryanf55 opened 1 week ago

Ryanf55 commented 1 week ago

Great documentation! Do you have any tips on how to handle /rosout properly?

# ros2 run ros1_bridge dynamic_bridge --bridge-all-topics
failed to create 2to1 bridge for topic '/rosout' with ROS 2 type 'rcl_interfaces/msg/Log' and ROS 1 type 'rosgraph_msgs/Log': No template specialization for the pair
check the list of supported pairs with the `--print-pairs` option
# ros2 run ros1_bridge dynamic_bridge --print-pairs | grep rosgraph
  - 'rosgraph_msgs/msg/Clock' (ROS 2) <=> 'rosgraph_msgs/Clock' (ROS 1)

Looks like there's some notes about field selection being required, but all the dependencies look merged: https://github.com/ros2/ros1_bridge/blob/3d5328dc21564d2130b4ded30afe5cd1c41cf033/doc/index.rst?plain=1#L311C23-L311C122

Any tips?

If you need a fully-fledged example in docker, feel free to check out the dockerfiles here I added (modeled after your guide). https://github.com/osrf/docker_images/pull/778

jayprajapati009 commented 1 week ago

Hey, sorry for the late reply. I think different log msg types cause this issue. Check the commits here, it may work, https://github.com/ros2/ros1_bridge/pull/174/commits

You can also try setting up different logging methods for ROS1 and ROS2 that would omit the /rosout. Or, you can publish the logs to a topic on ROS1, subscribe to that topic in ROS2, again that would not require the use of /rosout.

I hope it helps.