Add serial port to ros2_control demo cause error
Need Help, I use ros2_control demo diff_drive example, I create a serial port function file, compiling with no error but when I run it show an error:
[ros2_control_node-2] [INFO] [1633700315.468669177] [MobotSystemHardware]: Starting ...please wait...
[ros2_control_node-2] /home/shahrol/ros2_control_ws/install/controller_manager/lib/controller_manager/ros2_control_node: symbol lookup error: /home/shahrol/ros2_control_ws/install/mobot_hardware/lib/libmobot_hardware.so: undefined symbol: _ZN14mobot_hardware15MobotSerialPortC1Ev
[ERROR] [ros2_control_node-2]: process has died [pid 59942, exit code 127, cmd '/home/shahrol/ros2_control_ws/install/controller_manager/lib/controller_manager/ros2_control_node --ros-args --params-file /tmp/launch_params_u8ti5ohi --params-file /home/shahrol/ros2_control_ws/install/mobot_bringup/share/mobot_bringup/config/mobot_diff_drive_controller.yaml'].
I believe the error cause by this code I add , when remove it ok... but need to use for instantiate the serial port:
serial_port_ = std::make_shared<MobotSerialPort>();
I add this in start() function in hardware interface. If I remove it the program can run with no error.
- main control code base on ros2_control demo
- the serial port code is base https://github.com/DeborggraeveR/ros2...
Please Help..
Iam looking at the same code base at the moment. Whitout your actual code its difficult. What does your analog to "mecanumbot_serial_port.hpp" look like, and its CMake?