Robotics StackExchange | Archived questions

fatal error: turtlebot_msgs/SetFollowState.h: No such file or directory

When I run the code : " $ mkdir -p ~/catkinws/src $ cd ~/catkinws/ $ catkin_make " to create a ROS workspace and some errors happened:

/home/xzs/catkinws/src/turtlebotapps/turtlebotfollower/src/follower.cpp:36:10: fatal error: turtlebotmsgs/SetFollowState.h: No such file or directory 36 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [turtlebotapps/turtlebotfollower/CMakeFiles/turtlebotfollower.dir/build.make:63: turtlebotapps/turtlebotfollower/CMakeFiles/turtlebotfollower.dir/src/follower.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:3783: turtlebotapps/turtlebotfollower/CMakeFiles/turtlebot_follower.dir/all] Error 2 make: *** [Makefile:141: all] Error 2 Invoking "make -j4 -l4" failed How can I figure it out?

Asked by 1210652636 on 2020-11-11 09:54:39 UTC

Comments

Is ros-melodic-turtlebot3-msgs installed? (or similar if you are not on melodic)

Asked by chfritz on 2020-11-11 11:44:05 UTC

Answers

Have you tried:

sudo apt install ros-noetic-turtlebot3-msgs? (Make sure to replace noetic in case you use a different ROS Distro)

Running rosdep from your catkin_ws folder might also help installing the required dependencies:

rosdep install --from-paths . --ignore-src -r -y

Asked by toebgen on 2020-11-11 12:19:21 UTC

Comments

It works thanks a lot!!!

Asked by 1210652636 on 2020-11-11 12:43:51 UTC

Happy to hear that! :-) Please don't forget to accept the answer in order to close the question.

Asked by toebgen on 2020-11-11 12:46:15 UTC

it works, too for me, thanks

Asked by luigicyborg on 2023-07-29 11:28:22 UTC