Error while launching ros1_bridge

asked 2019-07-17 05:09:14 -0500

kk2105 gravatar image

updated 2019-07-17 06:21:15 -0500

gvdhoorn gravatar image

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

edit retag flag offensive close merge delete

Comments

Please don't cross post your question: https://github.com/ros2/ros1_bridge/i...

Dirk Thomas gravatar imageDirk Thomas ( 2019-07-17 09:14:24 -0500 )edit

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
marguedas gravatar imagemarguedas ( 2019-07-17 10:52:13 -0500 )edit

@Dirk Thomas Apologies Sir.

kk2105 gravatar imagekk2105 ( 2019-07-21 21:41:17 -0500 )edit

@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.

kk2105 gravatar imagekk2105 ( 2019-07-21 21:42:14 -0500 )edit