ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

catkin_make clean (missing files for msg/srv headers)

asked 2021-10-26 04:17:45 -0600

CroCo gravatar image

updated 2021-10-26 07:46:01 -0600

lucasw gravatar image

I'm working on a project, and I've noticed an aberrant behaviour with catkin_make clean. The project contains .msg and .srv. If I clean the folder using catkin_make clean, the header files associated with .msg and .srv are deleted. When I built the project again, CMake complained that the header files associated with .msg and .srv were missing. To resolve the problem, I have to comment add_executable and target_link_libraries so that catkin will be able to generate the header files again. After that, I have to uncomment add_executable and target_link_libraries. Is this normal? I'm using ubuntu 16.04 with kinetic ros version.

edit retag flag offensive close merge delete

Comments

Quick comment: your CMakeLists.txt is missing an add_dependencies(..) for your nodes / libraries. See C++ message or service dependencies in the Catkin documentation.

There are quite a few Q&As about this on ROS Answers actually.

Also: could you please explain why you're still using Kinetic on Ubuntu 16.04? Kinetic has been EOL for quite some time now.

gvdhoorn gravatar image gvdhoorn  ( 2021-10-26 05:27:54 -0600 )edit

@gvdhoorn can you provide a link for discussing this issue in the answers? I'm using Kinetic because I'm working with a project that that supports this version. Unfortuntalely, the developers of packages I'm using have no update for the newest version. I totally agree with you about sticking with the latest version.

CroCo gravatar image CroCo  ( 2021-10-26 05:45:43 -0600 )edit

If you use Google and add site:answers.ros.org to your query you should be able to find those previous Q&As.

But the documentation I linked already explains what you need to do.

Unfortuntalely, the developers of packages I'm using have no update for the newest version

as always: unless things actually error out while building, packages not stating compatibility or having been released for newer versions of ROS doesn't mean they can't be used with newer versions.

But this is off-topic, as: it won't solve your current problem (that has an unrelated cause) and you have already tried.

gvdhoorn gravatar image gvdhoorn  ( 2021-10-26 06:40:05 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-10-26 07:43:13 -0600

Mike Scheutzow gravatar image

updated 2021-10-26 07:51:13 -0600

You probably have not executed:

source ./devel/setup.bash

from your top-level catkin_ws dir.

This setup.bash file is created the first time you run catkin_make in a clean directory. If you have done this, then your CMakeLists.txt is not correct.

edit flag offensive delete link more

Comments

I've sourced the bash file but same problem. The suggested solution by @gvdhoom worked. The reason for this I believe the default generated CMakeLists comment out add_dependencies.

CroCo gravatar image CroCo  ( 2021-10-28 04:35:32 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2021-10-26 04:17:45 -0600

Seen: 172 times

Last updated: Oct 26 '21