CoppeliaRobotics / simROS2

ROS 2 Interface for CoppeliaSim
Other
31 stars 16 forks source link

Plugin fails to load #5

Closed hgrw closed 4 years ago

hgrw commented 4 years ago

Hi there. It looks like simExtROS2Interface was fixed for foxy in May (6431eb59034a783c00ca0f4844167fda24058cb1). I hoped that compiling from the latest commit at the time of writing would yield an .so file that would be compatible with both foxy, and coppeliasim 4.0 (albeit with a few adjustments here and there, eg updating repos in $COPPELIA_SIM_ROOT_DIR/programming/). Alas, this is not the case. The plugin doesn't load, despite all the dependencies being found. I have pasted the output of libLoadErrorCheck.sh at bottom, and some basic system info is below.

Do you have any idea what might be going on?

My system is running: kernel: 5.4.0-37-generic OS: Ubuntu 20.04 LTS CoppeliaSim Version: 4.0.0 ROS2 Version: foxy

To build the repo, I pulled the latest commits from include and libPlugin

 ./libLoadErrorCheck.sh        linux-vdso.so.1 (0x00007ffd30bef000)
        libstd_srvs__rosidl_typesupport_cpp.so =>
/opt/ros/foxy/lib/libstd_srvs__rosidl_typesupport_cpp.so
(0x00007f053c499000)
        libexample_interfaces__rosidl_typesupport_cpp.so =>
/opt/ros/foxy/lib/libexample_interfaces__rosidl_typesupport_cpp.so
(0x00007f053c486000)
        libimage_transport.so => /opt/ros/foxy/lib/libimage_transport.so
(0x00007f053c37a000)
        librclcpp.so => /opt/ros/foxy/lib/librclcpp.so (0x00007f053c1ae000)
        libsensor_msgs__rosidl_typesupport_cpp.so =>
/opt/ros/foxy/lib/libsensor_msgs__rosidl_typesupport_cpp.so
(0x00007f053c1a1000)
        librcutils.so => /opt/ros/foxy/lib/librcutils.so (0x00007f053c189000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f053c13e000)
        libtf2_ros.so => /opt/ros/foxy/lib/libtf2_ros.so (0x00007f053c0bb000)
        libtf2_msgs__rosidl_typesupport_cpp.so =>
/opt/ros/foxy/lib/libtf2_msgs__rosidl_typesupport_cpp.so
(0x00007f053c0b2000)
        librclcpp_action.so => /opt/ros/foxy/lib/librclcpp_action.so
(0x00007f053c093000)
        librcl_action.so => /opt/ros/foxy/lib/librcl_action.so
(0x00007f053c080000)
        liblibstatistics_collector.so =>
/opt/ros/foxy/lib/liblibstatistics_collector.so (0x00007f053c077000)
        librcl.so => /opt/ros/foxy/lib/librcl.so (0x00007f053c03d000)
        libstatistics_msgs__rosidl_typesupport_cpp.so =>
/opt/ros/foxy/lib/libstatistics_msgs__rosidl_typesupport_cpp.so
(0x00007f053c038000)
        libtracetools.so => /opt/ros/foxy/lib/libtracetools.so
(0x00007f053c033000)
        libgeometry_msgs__rosidl_typesupport_cpp.so =>
/opt/ros/foxy/lib/libgeometry_msgs__rosidl_typesupport_cpp.so
(0x00007f053c027000)
        libstd_msgs__rosidl_typesupport_cpp.so =>
/opt/ros/foxy/lib/libstd_msgs__rosidl_typesupport_cpp.so
(0x00007f053c01b000)
        libbuiltin_interfaces__rosidl_typesupport_cpp.so =>
/opt/ros/foxy/lib/libbuiltin_interfaces__rosidl_typesupport_cpp.so
(0x00007f053c014000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00007f053be33000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f053be18000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f053bc26000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f053ded0000)
        librosidl_typesupport_cpp.so =>
/opt/ros/foxy/lib/librosidl_typesupport_cpp.so (0x00007f053bc1f000)
        libaction_msgs__rosidl_typesupport_cpp.so =>
/opt/ros/foxy/lib/libaction_msgs__rosidl_typesupport_cpp.so
(0x00007f053bc19000)
        libmessage_filters.so => /opt/ros/foxy/lib/libmessage_filters.so
(0x00007f053bc12000)
        libament_index_cpp.so => /opt/ros/foxy/lib/libament_index_cpp.so
(0x00007f053bc06000)
        libclass_loader.so => /opt/ros/foxy/lib/libclass_loader.so
(0x00007f053bbf0000)
        libconsole_bridge.so.0.5 => /opt/ros/foxy/lib/libconsole_bridge.so.0.5
(0x00007f053bbea000)
        libtinyxml2.so.6 => /usr/lib/x86_64-linux-gnu/libtinyxml2.so.6
(0x00007f053bbd3000)
        librcpputils.so => /opt/ros/foxy/lib/librcpputils.so (0x00007f053bbca000)
        librcl_yaml_param_parser.so =>
/opt/ros/foxy/lib/librcl_yaml_param_parser.so (0x00007f053bbbf000)
        librosgraph_msgs__rosidl_typesupport_cpp.so =>
/opt/ros/foxy/lib/librosgraph_msgs__rosidl_typesupport_cpp.so
(0x00007f053bbba000)
        librcl_interfaces__rosidl_typesupport_cpp.so =>
/opt/ros/foxy/lib/librcl_interfaces__rosidl_typesupport_cpp.so
(0x00007f053bbae000)
        librmw_implementation.so => /opt/ros/foxy/lib/librmw_implementation.so
(0x00007f053bba2000)
        librmw.so => /opt/ros/foxy/lib/librmw.so (0x00007f053bb99000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007f053bb76000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f053ba25000)
        libtf2.so => /opt/ros/foxy/lib/libtf2.so (0x00007f053b9fe000)
        librcl_interfaces__rosidl_typesupport_c.so =>
/opt/ros/foxy/lib/librcl_interfaces__rosidl_typesupport_c.so
(0x00007f053b9f3000)
        librcl_logging_spdlog.so => /opt/ros/foxy/lib/librcl_logging_spdlog.so
(0x00007f053b9eb000)
        librcl_interfaces__rosidl_generator_c.so =>
/opt/ros/foxy/lib/librcl_interfaces__rosidl_generator_c.so
(0x00007f053b9d9000)
        librosidl_runtime_c.so => /opt/ros/foxy/lib/librosidl_runtime_c.so
(0x00007f053b9ce000)
        libyaml.so => /opt/ros/foxy/lib/libyaml.so (0x00007f053b9ab000)
        librosidl_typesupport_c.so => /opt/ros/foxy/lib/librosidl_typesupport_c.so
(0x00007f053b9a4000)
        libspdlog.so.1 => /usr/lib/x86_64-linux-gnu/libspdlog.so.1
(0x00007f053b8fb000)
        libbuiltin_interfaces__rosidl_generator_c.so =>
/opt/ros/foxy/lib/libbuiltin_interfaces__rosidl_generator_c.so
(0x00007f053b8f4000)
fferri commented 4 years ago

I can't reproduce this on any of the Ubuntu 20.04 machines. Can you try again with the latest version of include, common, libPlugin, simExtROS2Interface and CoppeliaSim 4.1.0 beta?

Tahir-Rasheed-437 commented 4 years ago

I can't reproduce this on any of the Ubuntu 20.04 machines. Can you try again with the latest version of include, common, libPlugin, simExtROS2Interface and CoppeliaSim 4.1.0 beta?

I am currently using Foxy on linux 20.04 with latest versions of include, common, libPlugin, simExtROS2Interface and CoppeliaSim 4.1.0 beta. The plugin compiled very and loaded very well. The problem comes when i use a message not mentioned in the default meta/interfaces.txt. For example sensor_msgs/msg/LaserScan. I have edited the interfaces file and add it, recompile the plugin but still CoppeliaSim is giving me error:

[simExtROS2Interface:error] simExtROS2Interface_createPublisher: Unsupported message type 'sensor_msgs/LaserScan'. You may want to add it to meta/interfaces.txt and recompile the ROS2Interface plugin.

I did add the line "sensor_msgs/msg/LaserScan" in meta/interfaces.txt. Even geometry_msgs/msg/Twist is not working. I was wondering if there is something else needed to be done other than just adding a line in meta/interfaces.txt? Thanks

fferri commented 4 years ago

Why do you use sensor_msgs/LaserScan, when the message name is sensor_msgs/msg/LaserScan?

Tahir-Rasheed-437 commented 4 years ago

yes sorry my bad. sensor_msgs/LaserScan was working fine with ROS1 and ROS2 dashing so i didn't notice that the problem is in my robot code of vrep. Thanks for a quick reply. Its working fine now.