一直在关注《Programming Robots with ROS: A Practical Introduction to the Robot Operating System》这本书
在本书的“Defining a New Message”部分,我们创建了一个新的消息定义
Example 3-3. Complex.msg
float32 real
float32 imaginary
所以我们需要修改package.xml,添加如下几行:
<build_depend>message_generation</build_depend>
<run_depend>message_runtime</run_depend>
但是当我在 catkin_ws 目录中运行 catkin_make 时,出现以下错误
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
我的版本:
ii python-rospkg 1.1.4-100 all ROS package library
ii python-rospkg-modules 1.1.4-1 all ROS package library
这是完整的 package.xml 文件
<?xml version="1.0"?>
<package format="2">
<name>basic</name>
<version>0.0.0</version>
<description>The basic package</description>
<maintainer email="gtkratosman-lap@todo.todo">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>
最佳答案
您在 package.xml 中混合了格式 1 和格式 2:
<run_depend>
仅在格式 1 中可用,而在格式 2 中应为 <exec_depend>
(在格式 1 中不可用)。
所以在你的情况下简单替换 run_depend
与 exec_depend
应该不错。
有关格式之间差异的更多信息,请参阅 official documentation .
关于python - ROS python 错误 "The manifest (with format version 2) must not contain the following tags: run_depend",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47309913/