天天看点

Moveit_core解析moveit_core:moveit_experimental:moveit_planners

moveit_core:

该存储库包含MoveIt使用的核心库:

- 运动模型的表示

- 碰撞检测接口和实现

- 运动学解算器插件的接口

- 运动规划插件的界面

- 控制器和传感器的接口

这些库不依赖于ROS(ROS消息除外),可以独立使用。

moveit_experimental:

这个存储库中可能包含了以前正在处理或已经处理过的已损坏/未保留/未完成的库。他们不是MoveIt!正式的一部分

此存储库中的代码不提供支持,但如果您觉得合适,欢迎使用它。

moveit_planners

MoveIt中使用的运动计划库的接口moveit_planners/chomp

## CHOMP运动计划

###测试/运行CHOMP

//将资源库克隆到工作区的源代码目录中。

> git clone https://github.com/ros-planning/moveit.git

//cd到您刚克隆的目录并签出靛蓝分支。

> cd moveit

> git checkout indigo-devel

//用`catkin_make`制作工作区,并获取工作区的安装文件。

//获取`moveit_resources`包。该软件包包含测试机器人和配置以测试CHOMP。

> git clone https://github.com/ksatyaki/moveit_resources.git

//运行演示。

> roslaunch moveit_resources demo_chomp.launch

MoveIt_Plugins

这是MoveIt插件的集合:

- moveit_simple_controller_manager - 一个非常基本的控制器管理器插件。可以连接到FollowJointTrajectoryAction和GripperCommandAction服务器。

MoveIt_Plugins/moveit_ros_control_interface

MoveIt! ROS控制插件

这个包提供了基类“moveit_controller_manager :: MoveItControllerManager”的插件和一个新的用于“moveit_controller_manager :: MoveItControllerHandle”分配器的插件基类。

allocator类是必需的,因为`moveit_controller_manager:: MoveItControllerHandle`需要传递给构造函数的名字。

提供了两个变体,“moveit_ros_control_interface:: MoveItControllerManager”用于连接单独的ros_control节点和“moveit_ros_control_interface :: MoveItMultiControllerManager”,以便与任意数量的ros_control节点无缝集成。

## moveit_ros_control_interface :: MoveItControllerManager

该插件在`〜ros_control_namespace` ROS参数中给出的命名空间中交互单个ros_control-driven节点。

它通过`list_controllers`服务轮询所有控制器,并将它们的属性传递给MoveIt !.

轮询被遏制到1赫兹。

###处理插件/Handle plugins

实际的句柄创建被委托给基类“moveit_ros_control_interface :: ControllerHandleAllocator”的分配器插件。

这些插件应该注册与匹配相应控制器类型的查找名称。

目前提供了`position_controllers /JointTrajectoryController`,`velocity_controllers / JointTrajectoryController`和`effort_controllers / JointTrajectoryController`的插件,它们简单地包装`moveit_simple_controller_manager ::FollowJointTrajectoryControllerHandle`实例。

###建立/setup

在你的MoveIt!启动文件(例如`ROBOT_moveit_config / launch /ROBOT_moveit_controller_manager.launch.xml`)设置`moveit_controller_manager`参数:

```

<arg name =“moveit_controller_manager”default =“moveit_ros_control_interface:: MoveItControllerManager”/>

```

并确保将`ros_control_namespace`参数设置为您想要连接的基于ros_control的节点的名称空间(不带/ contoller_manager / part)。

如果您正在使用`moveit_setup_assistent`,则可以将其添加到`ROBOT_moveit_config / config /ROBOT_controllers.yaml`,例如:

```

ros_control_namespace:/机器人

controller_list:

 - 名称:/ ROBOT / position_trajectory_controller

action_ns:follow_joint_trajectory

类型:FollowJointTrajectory

默认值:true

关节:

- joint_a1

 - joint_a2

 - joint_a3

- joint_a4

- joint_a5

- joint_a6

- joint_a7

```

###控制器切换/controllerswitching

MoveIt!可以决定哪些控制器必须启动和停止。

由于只有带有已注册的分配器插件的控制器名称才被移交给MoveIt!,因此该实施将基于其声称的资源和用于待启动控制的资源停止其他冲突控制器。

###命名空间/namespaces

所有控制器名称都以ros_control节点的名称空间作为前缀。

为此,控制器名称不应包含斜杠。如果ros_control命名空间是`/`,这是一个严格的要求。

## moveit_ros_control_interface ::MoveItMultiControllerManager

这个插件不需要进一步的配置。它轮询ROS主服务器并自动识别ros_control节点。

它用他们的命名空间产生了`moveit_ros_control_interface:: MoveItControllerManager`实例,并负责正确的委派。

### 建立

只需在您的MoveIt中设置“moveit_controller_manager”参数!启动文件(例如`ROBOT_moveit_config / launch /ROBOT_moveit_controller_manager.launch.xml`)

```

<arg name =“moveit_controller_manager”default =“moveit_ros_control_interface:: MoveItMultiControllerManager”/>

moveit_commander_cmdline.py

arm> help

Known commands:

  help                show this screen

  allow looking <true|false>       enable/disable looking around

  allow replanning <true|false>    enable/disable replanning

  constrain           clear path constraints

  constrain <name>    use the constraint <name> as a pathconstraint

  current             show the current state of theactive group

  database            display the current databaseconnection (if any)

  delete <name>       forget the joint values under the name<name>

  eef                 print the name of the endeffector attached to the current group

  execute             execute a previously computedmotion plan

  go <name>           plan and execute a motion to thestate <name>

  go rand             plan and execute a motion to arandom state

  go <dir> <dx>|      plan and execute a motion in directionup|down|left|right|forward|backward for distance <dx>

  ground              add a ground plane to theplanning scene

  id|which            display the name of the group thatis operated on

  joints              display names of the joints inthe active group

  load [<file>]       load a set of interpreted commands froma file

  pick <name>         pick up object <name>

  place <name>        place object <name>

  plan <name>         plan a motion to the state<name>

  plan rand           plan a motion to a random state

  planner <name>      use planner <name> to plan nextmotion

  record <name>       record the current joint values underthe name <name>

  rotate <x> <y> <z>  plan and execute a motion to a specifiedorientation (about the X,Y,Z axes)

  save [<file>]       save the currently known variables as aset of commands

  show                display the names and values ofthe known states

  show <name>         display the value of a state

  stop                stop the active group

  time                show the configured allowedplanning time

  time <val>          set the allowed planning time

  tolerance           show the tolerance for reaching thegoal region

  tolerance <val>     set the tolerance for reaching the goalregion

  trace <on|off>      enable/disable replanning or lookingaround

  use <name>          switch to using the group named<name> (and load it if necessary)

  use|groups          show the group names that are alreadyloaded

  vars                display the names of the knownstates

  wait <dt>           sleep for <dt> seconds

  x = y               assign the value of y to x

  x = [v1 v2...]      assign a vector of values to x

  x[idx] = val        assign a value to dimension idx of x

arm>