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

Change the dependencies of Mavros and build failed

asked 2016-05-13 04:17:37 -0500

crazymumu gravatar image

I've changed the one of the original ros mesage of mavros, which is mavros_msgs/Waypoint.
When I try to build it, I got the errors like:

The dependencies of the message/service 'mavros_msgs/Waypoint' have changed. Please rerun cmake.

I know catkin package is based on cmake, but seems not as the same one. How can I to build this package after changing the original files. Thx.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
5

answered 2019-02-26 10:11:29 -0500

Another option: run touch path/to/CMakeLists.txt, the re-run catkin build/catkin_make.

CMake has three stages: configuration, generation, and build. (I think that) ROS generates messages during the generation stage. Normally, the generation stage is only run when a CMakeLists.txt file is changed; otherwise the results are cached and reused during the build phase. Catkin can recognize that the messages need to be re-generated, but for some reason can't directly run the cmake generate stage again by itself. The easiest way to re-run the generation stage without having to rebuild your entire workspace is to mark the CMakeLists.txt file as changed, which the touch command does.

edit flag offensive delete link more
0

answered 2017-09-09 17:59:27 -0500

lucasw gravatar image

updated 2017-09-09 17:59:48 -0500

catkin clean -b and then rerun catkin build.

Seems like a bug in catkin build though, not to realize it has to rebuild a message or service file.

edit flag offensive delete link more

Comments

I'm on kinetic, and this doesn't work for me.

$ catkin clean -b> catkin: command not found

lindzey gravatar image lindzey  ( 2018-10-02 12:29:47 -0500 )edit

source /opt/ros/kinetic/setup.bash

lucasw gravatar image lucasw  ( 2018-10-02 13:35:54 -0500 )edit
0

answered 2019-01-08 03:19:48 -0500

sebasan gravatar image

in this link explain how add Prerequisites/Constraints.

try add in CMakeList.txt file this line:

 add_dependencies(some_target ${${PROJECT_NAME}_EXPORTED_TARGETS})

saludos

edit flag offensive delete link more

Comments

I don't think this approach will work for messages, as the generate_messages doesn't make a cmake target.

BryceWilley gravatar image BryceWilley  ( 2019-02-26 10:13:53 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2016-05-13 04:17:37 -0500

Seen: 4,481 times

Last updated: Feb 26 '19