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

Building ros1_bridge, but ros1 workspace not getting sourced

asked 2020-10-15 21:05:10 -0500

nightduck gravatar image

I've followed the instructions here to build ros1_bridge with my custom messages. But the mapping doesn't show up when running ros2 run ros1_bridge dynamic_bridge --print-pairs. If I run rosmsg list and ros2 msg list after building, I can see both of my project's messages, so I know they were sourced.

oren@ubuntu-workstation:~/git/bridge_ws$ros2 msg list | grep cinematography
cinematography_msgs/msg/ArtisticSpec
cinematography_msgs/msg/BoolPlusHeader
cinematography_msgs/msg/BoundingBox
cinematography_msgs/msg/DroneState
cinematography_msgs/msg/GPSYaw
cinematography_msgs/msg/GimbalAngleEulerCmd
cinematography_msgs/msg/GimbalAngleQuatCmd
cinematography_msgs/msg/MultiDOF
cinematography_msgs/msg/MultiDOFarray
cinematography_msgs/msg/VelCmd
cinematography_msgs/msg/VelCmdGroup
oren@ubuntu-workstation:~/git/bridge_ws$rosmsg list | grep airsim_ros_pkgs
airsim_ros_pkgs/BoolPlusHeader
airsim_ros_pkgs/GPSYaw
airsim_ros_pkgs/GimbalAngleEulerCmd
airsim_ros_pkgs/GimbalAngleQuatCmd
airsim_ros_pkgs/VelCmd
airsim_ros_pkgs/VelCmdGroup
airsim_ros_pkgs/multiDOF
airsim_ros_pkgs/multiDOF_array

Yet if I run the bridge, I get the repeated error message:

failed to create 2to1 bridge for topic '/airsim_node/gimbal_angle_quat_cmd' with ROS 2 type 'cinematography_msgs/msg/GimbalAngleQuatCmd' and ROS 1 type '': No template specialization for the pair
check the list of supported pairs with the `--print-pairs` option

Which would imply that my ros1 workspace isn't getting sourced. And sure enough. Start a fresh terminal, source my ros1_bridge, and:

oren@ubuntu-workstation:~/git/bridge_ws$rosmsg list | grep airsim_ros_pkgs
oren@ubuntu-workstation:~/git/bridge_ws$ros2 msg list | grep cinematography
cinematography_msgs/msg/ArtisticSpec
cinematography_msgs/msg/BoolPlusHeader
cinematography_msgs/msg/BoundingBox
cinematography_msgs/msg/DroneState
cinematography_msgs/msg/GPSYaw
cinematography_msgs/msg/GimbalAngleEulerCmd
cinematography_msgs/msg/GimbalAngleQuatCmd
cinematography_msgs/msg/MultiDOF
cinematography_msgs/msg/MultiDOFarray
cinematography_msgs/msg/VelCmd
cinematography_msgs/msg/VelCmdGroup

Why is it ignoring my ros1 workspace??

Bottom of the ROS2 package.xml

  <export>
    <build_type>ament_cmake</build_type>
    <ros1_bridge mapping_ruiles="GimbalAngleQuatCmd_mapping_rule.yaml"/>
  </export>
</package>

The mapping yaml file

-
  ros1_package_name: 'airsim_ros_pkgs'
  ros2_package_name: 'cinematography_msgs'

All relevant msg files are identical

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-10-19 10:02:40 -0500

nightduck gravatar image

There was a typo in the package.xml.

"mapping_ruiles"

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2020-10-15 21:05:10 -0500

Seen: 373 times

Last updated: Oct 19 '20