我一直在关注"用ROS编程机器人:机器人操作系统的实用介绍"
在本书的"定义新消息"部分中,我们创建了一个新的消息定义
Example 3-3. Complex.msg
float32 real
float32 imaginary
Run Code Online (Sandbox Code Playgroud)
所以我们需要修改package.xml并添加以下行:
<build_depend>message_generation</build_depend>
<run_depend>message_runtime</run_depend>
Run Code Online (Sandbox Code Playgroud)
但是当我在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
Run Code Online (Sandbox Code Playgroud)
我的版本:
ii python-rospkg 1.1.4-100 all ROS package library
ii python-rospkg-modules 1.1.4-1 all ROS package library
Run Code Online (Sandbox Code Playgroud)
这是完整的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>
Run Code Online (Sandbox Code Playgroud)
只是省略格式。这是没有必要的,并且会破坏您的代码。将此模板用于您的 package.xml。
<?xml version="1.0"?>
<package>
<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>
<build_depend>message_generation</build_depend>
<run_depend>message_runtime</run_depend>
<export>
<!-- Other tools can request additional information be placed here -->
</export>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4298 次 |
| 最近记录: |