-
Notifications
You must be signed in to change notification settings - Fork 215
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
Issue in Chapter 2 #6
Comments
The centroid.h is automatically generated when we do the catkin_make. But some readers are getting this issue. Is the copying of this same package is working? |
Are you advising to remove the message generation line? What do you mean by 'new package'? Because creating the package as suggested earlier in the chapter had no code, I deleted that package and did the copy. |
@eraserpencil No, don't remove that line. Because centroid is a custom message, for generating a header from the custom message, we need that line. Are you getting the above error for the package that you have copied? |
Apologies, that was the error from an amateurish attempt at fixing the header file. Please refer to updated error. Much thanks |
I got same problem too. Is there any way to fix it? |
@eraserpencil @kungfrank, Sorry for the delay. I have done a fix in the CMakeLists.txt in the repo, you can check this change |
In the CMakeLists.txt catkin_package() must be called after add_message_files and generate_messages in project.
did i miss anything? |
@kungfrank @eraserpencil Actually the centroid.h is an autogenerated header, it is working in ROS Kinetic perfectly, If you are not getting, I have included my centroid.h. Please check the following link https://github.com/qboticslabs/ros_robotics_projects/tree/master/chapter_2_codes |
Problem solve! Thanks for your help. |
@eraserpencil Excuse me, i want to know how you solve the problem of "In the CMakeLists.txt catkin_package() must be called after add_message_files and generate_messages in project. |
I couldn't find centroid.h in face_tracker_pkg and this snippet of code in face_tracker_node.cpp is causing an error.
#include <face_tracker_pkg/centroid.h>
Update:
Error at
catkin_makeafter copying the packages over /home/bla/ros/src/face_tracker_pkg/src/face_tracker_node.cpp:43:39: fatal error: face_tracker_pkg/centroid.h: No such file or directory compilation terminated. face_tracker_pkg/CMakeFiles/face_tracker_node.dir/build.make:62: recipe for target 'face_tracker_pkg/CMakeFiles/face_tracker_node.dir/src/face_tracker_node.cpp.o' failed make[2]: *** [face_tracker_pkg/CMakeFiles/face_tracker_node.dir/src/face_tracker_node.cpp.o] Error 1 CMakeFiles/Makefile2:3020: recipe for target 'face_tracker_pkg/CMakeFiles/face_tracker_node.dir/all' failed make[1]: *** [face_tracker_pkg/CMakeFiles/face_tracker_node.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 1%] Built target dynamic_reconfigure_generate_messages_lisp Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j2 -l2" failed Please advice/correct me corrective instructions. Also, it seems copying the packages from your repo makes everything work, instead of creating the packages. Please add a side note that copying is advised.
The text was updated successfully, but these errors were encountered: