Robotics StackExchange | Archived questions

Error while launching ros1_bridge

Hi Guys,

I have recently started working on ROS2 and want to bridge the connection between ros1 and ros2.

Version used:
ROS1 - melodic (ros1_bridge)
ROS2 - dashing

I have created a docker for installing ROS2 dashing with only ros1_bridge package.

I start my roscore in my local system and follow the below steps in docker container.

system@efcf353f6ea8:/module$ source /opt/ros/dashing/setup.bash 
system@efcf353f6ea8:/module$ ros2 run ros1_bridge dynamic_bridge 
/opt/ros/dashing/lib/ros1_bridge/dynamic_bridge: error while loading shared libraries: libroscpp.so: cannot open shared object file: No such file or directory

To get rid off above error I source the ROS1.

system@efcf353f6ea8:/module$ source /opt/ros/melodic/setup.bash 
ROS_DISTRO was set to 'dashing' before. Please make sure that the environment does not mix paths from different distributions.
system@efcf353f6ea8:/module$ ros2 run ros1_bridge dynamic_bridge 
Failed to load entry point 'info': /opt/ros/dashing/lib/librosbag2_storage.so: undefined symbol: _ZNK12class_loader11ClassLoader15isLibraryLoadedEv
The C extension '/opt/ros/dashing/lib/python3.6/site-packages/rosbag2_transport/_rosbag2_transport_py.cpython-36m-x86_64-linux-gnu.so' failed to be imported while being present on the system. Please refer to 'https://index.ros.org/doc/ros2/Troubleshooting/#import-failing-even-with-library-present-on-the-system' for possible solutions
Segmentation fault

Could you guys please let me know the fix for this.

Thank you, KK

Asked by kk2105 on 2019-07-17 05:09:14 UTC

Comments

Please don't cross post your question: https://github.com/ros2/ros1_bridge/issues/205#issuecomment-512185529

Asked by Dirk Thomas on 2019-07-17 09:14:24 UTC

As a side note you can use the docker images provided by OSRF instead of building your own:

$ docker run -it --rm osrf/ros:dashing-ros1-bridge
root@59cd1226f46d:/# ros2 run ros1_bridge dynamic_bridge

Asked by marguedas on 2019-07-17 10:52:13 UTC

@Dirk Thomas Apologies Sir.

Asked by kk2105 on 2019-07-21 21:41:17 UTC

@marguedas I need to install additional packages as well. So I feel it is better if I build my own docker rather than using the OSRF.

Asked by kk2105 on 2019-07-21 21:42:14 UTC

Answers