ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Short answer: Packages that you want to be linked by ros1_bridge (without a mapping rule) cannot end in "_interfaces", and that's possibly the only sequence of character's that it can't end with.

Longer answer: The answer to the original problem, basically, is that I used a sequence of characters as my suffix that produces unexpected results. I named my package my_interfaces. However, in __init__.py of ros1_bridge, in the function determine_package_pairs (found here), you'll see these variables:

ros1_suffix = '_msgs'
ros2_suffixes = ['_msgs', '_interfaces']

The logic following says that to compare a ROS1 package's name and a ROS2 package's name, you first have to remove possible suffixes. So, when given "my_interfaces", it modifies it to say that the new ROS1 package name is "my_interfaces", but the ROS2 package name is only "my" now. Since those aren't equivalent anymore, it stops processing these packages as possible linkages between the bridge.

Short answer: Packages that you want to be linked by ros1_bridge (without a mapping rule) cannot end in "_interfaces", and that's possibly the only sequence of character's that it can't end with.

Longer answer: The answer to the original problem, basically, is that I used a sequence of characters as my suffix that produces unexpected results. I named my package my_interfaces. However, in __init__.py of ros1_bridge, in the function determine_package_pairs (found here), you'll see these variables:

ros1_suffix = '_msgs'
ros2_suffixes = ['_msgs', '_interfaces']

The logic following says that to compare a ROS1 package's name and a ROS2 package's name, you first have to remove possible suffixes. So, when given "my_interfaces", it modifies it to say that the new ROS1 package name is "my_interfaces", but the ROS2 package name is only "my" now. Since those aren't equivalent anymore, it stops processing these packages as possible linkages between the bridge.bridge. My solution was to simply rename the package to be anything BUT something that ends in "_interfaces"... I'm not really sure as to why this was implemented without first checking that they're equivalent.

Short answer: Packages that you want to be linked by ros1_bridge (without a mapping rule) cannot end in "_interfaces", and that's possibly the only sequence of character's that it can't end with.

Longer answer: The answer to the original problem, basically, is that I used a sequence of characters as my suffix that produces unexpected results. I named my package my_interfaces. However, in __init__.py of ros1_bridge, in the function determine_package_pairs (found here), you'll see these variables:

ros1_suffix = '_msgs'
ros2_suffixes = ['_msgs', '_interfaces']

The logic following says that to compare a ROS1 package's name and a ROS2 package's name, you first have to remove possible suffixes. So, when given "my_interfaces", it modifies it to say that the new ROS1 package name is "my_interfaces", but the ROS2 package name is only "my" now. Since those aren't equivalent anymore, it stops processing these packages as possible linkages between the bridge. My solution was to simply rename the package to be anything BUT something that ends in "_interfaces"... I'm not really sure as to why this was implemented without first checking that they're equivalent.equivalent, it caused me a LOT of frustration XD

Short answer: Packages that you want to be linked by ros1_bridge (without a mapping rule) cannot end in "_interfaces", and that's possibly the only sequence of character's that it can't end with.

Longer answer: The answer to the original problem, basically, is that I used a sequence of characters as my suffix that produces unexpected results. I named my package my_interfaces. However, in __init__.py of ros1_bridge, in the function determine_package_pairs (found here), you'll see these variables:

ros1_suffix = '_msgs'
ros2_suffixes = ['_msgs', '_interfaces']

The logic following says that to compare a ROS1 package's name and a ROS2 package's name, you first have to remove possible suffixes. So, when given "my_interfaces", it modifies it to say that the new ROS1 package name is "my_interfaces", but the ROS2 package name is only "my" now. Since those aren't equivalent anymore, it stops processing these packages as possible linkages between the bridge. My solution was to simply rename the package to be anything BUT something that ends in "_interfaces"... I'm not really sure as to why this was implemented without first checking that they're equivalent, it caused me a LOT of frustration XD

However, I have not yet solved the follow up issue in my third edit. If someone can point out what the issue there is, that'd be much appreciated! I'll update this answer if I find a solution.