unitreerobotics / unitree_ros_to_real

107 stars 94 forks source link

Error to catkin build unitree_ros_to_real package for Go1, unitree_legged_sdk.h: No such file or directory #32

Closed Emonot closed 2 years ago

Emonot commented 2 years ago

Hello, I try to build unitree_ros_to_real to use Go1 with catkin build. And I got this error :

`Errors << unitree_legged_real:make /home/evrard/catkin_ws/logs/unitree_legged_real/build.make.000.log make[2]: No rule to make target 'CMakeFiles/lcm_server.dir/build'. Stop. make[1]: [CMakeFiles/lcm_server.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... In file included from /home/evrard/catkin_ws/src/unitree_ros_to_real/unitree_legged_real/src/exe/torque_mode.cpp:12:0: /home/evrard/catkin_ws/src/unitree_ros_to_real/unitree_legged_real/include/convert.h:18:10: fatal error: unitree_legged_sdk/unitree_legged_sdk.h: No such file or directory

include "unitree_legged_sdk/unitree_legged_sdk.h"

      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated. make[2]: [CMakeFiles/torque_lcm.dir/src/exe/torque_mode.cpp.o] Error 1 make[1]: [CMakeFiles/torque_lcm.dir/all] Error 2 In file included from /home/evrard/catkin_ws/src/unitree_ros_to_real/unitree_legged_real/src/exe/position_mode.cpp:13:0: /home/evrard/catkin_ws/src/unitree_ros_to_real/unitree_legged_real/include/convert.h:18:10: fatal error: unitree_legged_sdk/unitree_legged_sdk.h: No such file or directory

include "unitree_legged_sdk/unitree_legged_sdk.h"

      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated. make[2]: [CMakeFiles/position_lcm.dir/src/exe/position_mode.cpp.o] Error 1 make[1]: [CMakeFiles/position_lcm.dir/all] Error 2 In file included from /home/evrard/catkin_ws/src/unitree_ros_to_real/unitree_legged_real/src/exe/velocity_mode.cpp:13:0: /home/evrard/catkin_ws/src/unitree_ros_to_real/unitree_legged_real/include/convert.h:18:10: fatal error: unitree_legged_sdk/unitree_legged_sdk.h: No such file or directory

include "unitree_legged_sdk/unitree_legged_sdk.h"

      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated. make[2]: [CMakeFiles/velocity_lcm.dir/src/exe/velocity_mode.cpp.o] Error 1 make[1]: [CMakeFiles/velocity_lcm.dir/all] Error 2 In file included from /home/evrard/catkin_ws/src/unitree_ros_to_real/unitree_legged_real/src/exe/walk_mode.cpp:13:0: /home/evrard/catkin_ws/src/unitree_ros_to_real/unitree_legged_real/include/convert.h:18:10: fatal error: unitree_legged_sdk/unitree_legged_sdk.h: No such file or directory

include "unitree_legged_sdk/unitree_legged_sdk.h"

      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated. make[2]: [CMakeFiles/walk_lcm.dir/src/exe/walk_mode.cpp.o] Error 1 make[1]: [CMakeFiles/walk_lcm.dir/all] Error 2 make: *** [all] Error 2 cd /home/evrard/catkin_ws/build/unitree_legged_real; catkin build --get-env unitree_legged_real | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd - `

I have the same version for unitree_ros_to_real (3.4.0) and unitree_legged_sdk(3.4.2). They are both in the catkin/src folder as describe in the README file. I also try to modify the CMakeFile as describe on other issues post but it does'nt work.

Emonot commented 2 years ago

By replacing the path in the CMakeList.txt for include_directories, link_directories, and add_executables by the path to the unitree_legged_sdk package in the ~/catkin_ws/src , catkin build worked out.