MoveIt Task Constructor 项目教程
1. 项目的目录结构及介绍
MoveIt Task Constructor 项目的目录结构如下:
moveit_task_constructor/
├── cmake/
├── doc/
├── examples/
├── moveit_task_constructor/
│ ├── core/
│ ├── demo/
│ ├── interface/
│ ├── stages/
│ └── test/
├── resources/
└── test/
- cmake/: 包含CMake配置文件。
- doc/: 包含项目文档。
- examples/: 包含示例代码。
- moveit_task_constructor/: 核心代码目录,包含多个子模块:
- core/: 核心功能实现。
- demo/: 演示代码。
- interface/: 接口定义。
- stages/: 任务阶段实现。
- test/: 测试代码。
- resources/: 包含资源文件。
- test/: 包含测试代码。
2. 项目的启动文件介绍
项目的启动文件通常位于 examples/
目录下,例如 demo_task.launch
。该文件用于启动示例任务。
<launch>
<arg name="robot_name" default="panda" />
<arg name="rviz" default="true" />
<include file="$(find moveit_task_constructor_demo)/launch/planning_context.launch">
<arg name="robot_name" value="$(arg robot_name)" />
</include>
<node name="moveit_task_constructor_demo" pkg="moveit_task_constructor_demo" type="demo_task" output="screen">
<rosparam command="load" file="$(find moveit_task_constructor_demo)/config/demo_task.yaml" />
</node>
<group if="$(arg rviz)">
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find moveit_task_constructor_demo)/config/demo_task.rviz" />
</group>
</launch>
3. 项目的配置文件介绍
配置文件通常位于 config/
目录下,例如 demo_task.yaml
。该文件用于配置任务参数。
task:
stages:
- name: pick
type: Pick
params:
object: box
- name: place
type: Place
params:
target: target_position
- task: 定义任务的根节点。
- stages: 定义任务的各个阶段。
- name: 阶段的名称。
- type: 阶段的类型。
- params: 阶段的参数。
以上是 MoveIt Task Constructor 项目的基本教程,涵盖了项目的目录结构、启动文件和配置文件的介绍。