unitreerobotics / unitree_ros_to_real

107 stars 94 forks source link

catkin_make Error: /usr/bin/ld: cannot find -lunitree_legged_sdk #71

Closed XiaoHuang996 closed 1 year ago

XiaoHuang996 commented 1 year ago

Unitree_legeed_sdk : 3.8.4 Unitree_ros_to_real : 3.8.0 Ubuntu 20.04 catkin_ws/src/unitree_legged_sdk catkin_ws/src/unitree_ros_to_real

While compiling Unitrees_ros_to_real i am getting following error,

[ 90%] Building CXX object unitree_ros_to_real/unitree_legged_real/CMakeFiles/example_position.dir/src/exe/example_position.cpp.o [ 92%] Building CXX object unitree_ros_to_real/unitree_legged_real/CMakeFiles/ros_udp.dir/src/exe/ros_udp.cpp.o [ 94%] Building CXX object unitree_ros_to_real/unitree_legged_real/CMakeFiles/example_walk.dir/src/exe/example_walk.cpp.o [ 96%] Linking CXX executable /home/hzp/Unitreerobot_ws/devel/lib/unitree_legged_real/example_walk [ 98%] Linking CXX executable /home/hzp/Unitreerobot_ws/devel/lib/unitree_legged_real/example_position /usr/bin/ld: 找不到 -lunitree_legged_sdk collect2: error: ld returned 1 exit status make[2]: [unitree_ros_to_real/unitree_legged_real/CMakeFiles/example_walk.dir/build.make:101:/home/hzp/Unitreerobot_ws/devel/lib/unitree_legged_real/example_walk] 错误 1 make[1]: [CMakeFiles/Makefile2:1915:unitree_ros_to_real/unitree_legged_real/CMakeFiles/example_walk.dir/all] 错误 2 make[1]: 正在等待未完成的任务.... /usr/bin/ld: 找不到 -lunitree_legged_sdk collect2: error: ld returned 1 exit status make[2]: [unitree_ros_to_real/unitree_legged_real/CMakeFiles/example_position.dir/build.make:101:/home/hzp/Unitreerobot_ws/devel/lib/unitree_legged_real/example_position] 错误 1 make[1]: [CMakeFiles/Makefile2:1778:unitree_ros_to_real/unitree_legged_real/CMakeFiles/example_position.dir/all] 错误 2 [100%] Linking CXX executable /home/hzp/Unitreerobot_ws/devel/lib/unitree_legged_real/ros_udp /usr/bin/ld: 找不到 -lunitree_legged_sdk collect2: error: ld returned 1 exit status make[2]: [unitree_ros_to_real/unitree_legged_real/CMakeFiles/ros_udp.dir/build.make:101:/home/hzp/Unitreerobot_ws/devel/lib/unitree_legged_real/ros_udp] 错误 1 make[1]: [CMakeFiles/Makefile2:1614:unitree_ros_to_real/unitree_legged_real/CMakeFiles/ros_udp.dir/all] 错误 2 make: [Makefile:141:all] 错误 2 Invoking "make -j4 -l4" failed

Someone please help

XiaoHuang996 commented 1 year ago

Copying catkin_ws/src/unitree_legged_sdk/lib/cpp/amd64 or arm64/libunitree_legged_sdk.so into /usr/lib/ will solve it.