Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ROS python Error "The manifest (with format version 2) must not contain the following tags: run_depend"

Tags:

python

ros

rospy

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>
like image 989
サルバドル Avatar asked Nov 15 '17 14:11

サルバドル


2 Answers

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.

like image 171
luator Avatar answered Sep 19 '22 11:09

luator


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>

like image 29
maetulj Avatar answered Sep 21 '22 11:09

maetulj