I have been following the book "Programming Robots with ROS: A Practical Introduction to the Robot Operating System"
In the "Defining a New Message" part of the book we create a new message definition
Example 3-3. Complex.msg
float32 real
float32 imaginary
so we require to modify the package.xml and add the following lines:
<build_depend>message_generation</build_depend>
<run_depend>message_runtime</run_depend>
but when I run the catkin_make in the catkin_ws directory I get the following error
Error(s) in /home/gtkratosman-lap/catkin_ws/src/basic/package.xml:
- The manifest (with format version 2) must not contain the following tags: run_depend
My version:
ii python-rospkg 1.1.4-100 all ROS package library
ii python-rospkg-modules 1.1.4-1 all ROS package library
Here is the full package.xml file
<?xml version="1.0"?>
<package format="2">
<name>basic</name>
<version>0.0.0</version>
<description>The basic package</description>
<maintainer email="[email protected]">gtkratosman-
lap</maintainer>
<license>TODO</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>rospy</build_depend>
<run_depend>message_generation</run_depend>
<run_depend>message_runtime</run_depend>
<build_export_depend>rospy</build_export_depend>
<exec_depend>rospy</exec_depend>
<export>
</export>
</package>
You are mixing formats 1 and 2 in your package.xml:
<run_depend>
is only available in format 1 while in format 2 it should be <exec_depend>
(which is not available in format 1).
So in your case simple replace run_depend
with exec_depend
and it should be good.
For more information about the difference between the formats see the official documentation.
Just omit the format. It is not necessary and breaks your code. Use this template for your package.xml.
<?xml version="1.0"?>
<package>
<name>basic</name>
<version>0.0.0</version>
<description>The basic package</description>
<maintainer email="[email protected]">gtkratosman-lap</maintainer>
<license>TODO</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>rospy</build_depend>
<build_depend>message_generation</build_depend>
<run_depend>message_runtime</run_depend>
<export>
<!-- Other tools can request additional information be placed here -->
</export>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With