ros2 / ros1_bridge

ROS 2 package that provides bidirectional communication between ROS 1 and ROS 2
Apache License 2.0
421 stars 274 forks source link

symbol lookup error #416

Closed talhassj28 closed 9 months ago

talhassj28 commented 9 months ago

I am trying to convert a ROS1 bagfile into a ROS2 bagfile. The bagfile contains topics with non-standard message types (adma, ouster and sbg_driver). I have built every message type I need for ROS1 and ROS2 in separate workspaces and the ros1_bridge in another.

Workspaces:
.
├─ ros1_msgs_ws
│  └─ src
│     └─ \<Pkgs for ROS1 messages\>
├─ ros2_msgs_ws
│  └─ src
│     └─ \<Pkgs for ROS2 messages including mapping rules\>
└─ bridge_ws
   └─ src
      └─ ros1_bridge

I can succesfully print all pairs with ros2 run ros1_bridge dynamic_bridge --print-pairs | grep -E 'adma|ouster|sbg':

Screenshot from 2023-09-15 12-08-35

When I try to use the bridge for converting the messages, I get an symbol lookup error in connection with one of my custom message types (adma_ros_driver_msgs). Here is my procedure:

Terminal 1:

Expected behavior

Actual behavior

Additional information

talhassj28 commented 9 months ago

I figured out what the problem was. It's actually not a rosbridge issue. Apparently I forgot to add the dependencies of custom ROS2 messages in the CMake file.

rosidl_generate_interfaces(${PROJECT_NAME}
  ${msg_files}
  DEPENDENCIES <dependencies i.e. std_msgs>
)

solved the issue.