Ask Your Question

Ros1_Bridge: Custom message pairing failed if those messages have non- identical names in ros1 and ros2

asked 2018-07-27 12:13:53 -0500

Rucha gravatar image

I am developing simple publisher- subscriber with custom messages.

  1. The name of custom message file is 'EgoData.msg' in ROS1 and 'Size.msg' in ROS2 workspace. I have done the mapping in yaml file as follows:

     ros1_package_name: 'ros1_test'
     ros1_message_name: 'EgoData'
     ros2_package_name: 'bridge_test'
     ros2_message_name: 'Size'
          vehicleLength: 'length'
  2. I have done all the necessary steps for bridging custom messages. After I run dynamic bridge, publisher and subscriber, I get following error:

    failed to create 1to2 bridge for topic '/chatter' with ROS 1 type 'ros1_test/EgoData' and ROS 2 type 'bridge_test/Size': No template specialization for the pair

  3. For debugging, I also checked generated/bridge_test_factories.cpp, it does not show any mapping of ros1 to ros 2.

  4. Now, if I keep the name of custom messages at ros1 and ros2 same, say, I make ROS1 message name as 'Size.msg', and then build-run necessary nodes - publisher, subscriber and bridge; the pairing gets successful:

    created 1to2 bridge for topic '/chatter' with ROS 1 type 'ros1_test/Size' and ROS 2 type 'bridge_test/Size' [INFO] [ros1_bridge]: Passing message from ROS 1 ros1_test/Size to ROS 2 bridge_test/Size (showing msg only once per type)

    I have seen example mapping_rules.yaml where, even though service names are different, I can see them paired when I print using "--print-pairs". But in my case it's not working for messages. So is it something like the name of custom messages which we want to bridge must be identical? Or do I need to do any extra steps other than mentioned in documentation for custom messages? Kindly let me know the probable finding.

Looking forward to the answer.

edit retag flag offensive close merge delete


Please consider sharing all your code to check if there is any difference to what is recommended in the docs. They are supposed to work as-is.

Dirk Thomas gravatar imageDirk Thomas ( 2018-07-27 12:19:08 -0500 )edit

Hi, sorry for the delayed reply. I have uploaded the code here. I am using ros1 kinetic and ros2 bouncy- colcon build. Please let me know if any other information is needed.

Rucha gravatar imageRucha ( 2018-07-31 06:45:33 -0500 )edit

A reminder that I have posted code's link in my previous comment, the issue is still not solved. Please let me know your view.

Rucha gravatar imageRucha ( 2018-08-06 05:03:51 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-08-10 15:38:03 -0500

marguedas gravatar image

Thanks @Rucha for reporting and your patience. This is indeed a bug in the ros1_bridge.

There is a PR at that should fix it, I used a simplified version of your packages to test it (available at )

edit flag offensive delete link more


Hello, thank you for the fix. I tested it at my end, it works fine now.

Rucha gravatar imageRucha ( 2018-08-14 06:37:40 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2018-07-27 12:13:53 -0500

Seen: 236 times

Last updated: Aug 10 '18