ros1_bridge icon indicating copy to clipboard operation
ros1_bridge copied to clipboard

More feedback during build process required when encountering invalid interface mappings

Open alexg-k opened this issue 1 year ago • 0 comments

More feedback during the build process of the ros1_bridge would be nice. If you have a 100 different messages and services (and their parameters) named differently across ros1 and ros2, you will likely make mistakes in the mapping files. These errors may include a typo in the names of the ros1/2 packages, messages or parameters. Most of the time, the build with such an error compiles through without any warning or error. Only when you run the bridge with --print-pairs, you will maybe notice that interfaces are missing.

My suggestion is that when an explicit mapping (any ros1/2 package, interface, parameter name was not found) in the mapping file fails, then this should produce at least output to stderr. Maybe it would also be a good idea to print an info when an implicit mapping was found (without any mapping file entry).

Right now the following example compiles just fine:

my_msgs_mapping.yaml:

-
  ros1_package_name: 'my_pkg_msgs1'
  ros1_message_name: 'NotMyMsg1' # <-- intentional error here
  ros2_package_name: 'my_pkg_msgs2'
  ros2_message_name: 'MyMsg2'
  fields_1_to_2:
  my_param1 : 'my_param2'

ros1 service called MyMsg1.msg:

bool my_param1

ros2 service called MyMsg1.msg:

bool my_param2

alexg-k avatar Sep 07 '22 08:09 alexg-k