Robotics StackExchange | Archived questions

ROS2 component failed to load at runtime

Hello,

I was dabbling around with some ros2 I was able to make a few components and run them at runtime with ros2 component standalone . It works for all my other components I have and everything compiles. However, this one component I have made - an action server - fails to get loaded at runtime. The Cmakelists is virtually the same for every component I have.

Here is the error (ros2 - foxy - ubuntu 20.04)

```` ros2 component standalone softwaretraining composition::movingturtleactionserver [INFO] [1620341189.925671907] [standalonecontainerffda1629b46f]: Load Library: /home/niiquaye/ros2training/install/softwaretraining/lib/libmovingturtaction.so [ERROR] [1620341189.933938571] [standalonecontainerffda1629b46f]: Failed to load library: Could not load library LoadLibrary error: /home/niiquaye/ros2training/install/softwaretraining/lib/libmovingturtaction.so: undefined symbol: ZN11composition27movingturtleactionserver15linearvelocityE, at /tmp/binarydeb/ros-foxy-rcutils-1.1.3/src/sharedlibrary.c:84 Failed to load component: Failed to load library: could not load library loadlibrary error: /home/niiquaye/ros2training/install/softwaretraining/lib/libmovingturtaction.so: undefined symbol: zn11composition27movingturtleactionserver15linearvelocitye, at /tmp/binarydeb/ros-foxy-rcutils-1.1.3/src/sharedlibrary.c:84, interrupting container node [INFO] [1620341189.936580613] [rclcpp]: signalhandler(signalvalue=2)

````

Asked by rover_challenger on 2021-05-06 18:05:03 UTC

Comments

Can you share the CMakeLists.txt? Without it it is very difficult for us to guess what is the issue.

Asked by sgvandijk on 2021-05-07 01:40:49 UTC

Answers