Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building package with ROS2 Foxy and colcon build #6

Open
duochh opened this issue Aug 5, 2023 · 0 comments
Open

Error when building package with ROS2 Foxy and colcon build #6

duochh opened this issue Aug 5, 2023 · 0 comments

Comments

@duochh
Copy link

duochh commented Aug 5, 2023

Here is my log when I build 2 packages in ros2 foxy and colcon build:
-----------------------------------BEGINNING LOG-----------------------------------------
Starting >>> ros2_unitree_legged_msgs
Finished <<< ros2_unitree_legged_msgs [8.01s]
Starting >>> unitree_legged_real
--- stderr: unitree_legged_real
-- CMAKE_SYSTEM_PROCESSOR: x86_64
/home/ubuntu/ros2_ws/src/unitree_ros2_to_real/src/ros2_walk_example.cpp:6:10: fatal error: unitree_legged_sdk/unitree_legged_sdk.h: No such file or directory
6 | #include "unitree_legged_sdk/unitree_legged_sdk.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/ros2_walk_example.dir/build.make:63: CMakeFiles/ros2_walk_example.dir/src/ros2_walk_example.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:109: CMakeFiles/ros2_walk_example.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/home/ubuntu/ros2_ws/src/unitree_ros2_to_real/src/ros2_udp.cpp:6:10: fatal error: unitree_legged_sdk/unitree_legged_sdk.h: No such file or directory
6 | #include "unitree_legged_sdk/unitree_legged_sdk.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/home/ubuntu/ros2_ws/src/unitree_ros2_to_real/src/ros2_position_example.cpp:6:10: fatal error: unitree_legged_sdk/unitree_legged_sdk.h: No such file or directory
6 | #include "unitree_legged_sdk/unitree_legged_sdk.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/ros2_position_example.dir/build.make:63: CMakeFiles/ros2_position_example.dir/src/ros2_position_example.cpp.o] Error 1
make[2]: *** [CMakeFiles/ros2_udp.dir/build.make:63: CMakeFiles/ros2_udp.dir/src/ros2_udp.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:82: CMakeFiles/ros2_position_example.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:136: CMakeFiles/ros2_udp.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Failed <<< unitree_legged_real [1.21s, exited with code 2]

Summary: 1 package finished [9.37s]
1 package failed: unitree_legged_real
1 package had stderr output: unitree_legged_real
----------------------------END LOG---------------------------------------

I think you should check your CMakeLists.txt file in package unitree_ros2_to_real. The include_directory() may not contain the correct folder path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant