ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
As the other answers already state, you need to add the correct dependencies in the CMakeLists.txt
. However, I found I also have to correctly specify the dependencies in the package.xml
, otherwise the packages would not build in the correct order (i.e., first foo_msgs
then foo
).
I am using the catkin tools for building. Not sure if it is strictly necessary for caktin_make
.
A minimal package.xml
could look like this:
<?xml version="1.0"?>
<package format="2">
<name>foo</name>
<version>1.0.0</version>
<description>Package foo depends on foo_msgs</description>
<maintainer email="foo@bar.com">Foo Bar<maintainer>
<license>Foo Bar</license>
<buildtool_depend>catkin</buildtool_depend>
<depend>roscpp</depend>
<depend>foo_msgs</depend>
</package>