Open JLBicho opened 2 years ago
Solved the problem with the linking of the cap library. Just had to change the ament_target_dependencies to target_link_libraries.
However, a new problem arises. With the change in capabilities, the linked libraries are lost. When running the launch file with the prefix, the libraries cannot be found.
[INFO] [mitsubishi_main-1]: process started with pid [59898]
[mitsubishi_main-1] /home/jose/ros2_ws/install/mitsubishi_servo/lib/mitsubishi_servo/mitsubishi_main: error while loading shared libraries: librcl_lifecycle.so: cannot open shared object file: No such file or directory
[ERROR] [mitsubishi_main-1]: process has died [pid 59898, exit code 127, cmd 'ethercat_grant /home/jose/ros2_ws/install/mitsubishi_servo/lib/mitsubishi_servo/mitsubishi_main --ros-args -r __ns:=/mitsubishi --params-file /home/jose/ros2_ws/install/mitsubishi_servo/share/mitsubishi_servo/params/mrj5n.yaml'].
Problem is in CMakeList.txt
If I put:
The output of the compilation is:
If I put:
Then the output is:
So the problem is how to link the libcap-dev in the CMakeList. In ROS1 with catkin I assume it was done in the
include_directories(${catkin_INCLUDE_DIRS})
stepSo, if anyone has any idea it will be most welcome