# KUKA youbot机械臂与Moveit工具包（1）

#### 1. Background

后来，再寻找资料的过程中，我发现已有针对机械臂的package——Moveit，以前看论文的时候看到过，但是当时没有接触太深，没办法，到头来还是绕不过去，因此有了这篇文章。

#### 2.参考资料及前期工作

http://docs.ros.org/indigo/api/moveit_setup_assistant/html/doc/tutorial.html

##### 2.2 设置Planning Group和End Effector

Passive Joints(被动关节)，比如像有的小车的万向轮，求解器在运动规划的时候不会考虑这些关节。

#### 3. Testing

roslaunch youbot_moveit_config demo.launch

roslaunch moveit_commander moveit_commander_cmdline.py

use 命令后面跟的是我们之前设置的Group的名字，tab可以补全。go rand表示让robot去到一个工作范围内的随机位置

#### 4. 使用Arbotix在仿真中控制youbot

roslaunch ik_follow_joint_trajectory youbot_with_gripper.launch sim:=true

rosrun rviz rviz
rosrun ik_follow_joint_trajectory trajectory_demo_youbot_with_gripper.py _reset:=true

roslaunch rbx1_bring_up fake_youbot.launch
rosrun rviz rviz
rosrun ik_follow_joint_trajectory action_trajectory

#### 5. Actionlib与MoveIt Joint Controllers

MoveIt 内也有一个控制接口叫做moveit_simple_controller_manager.

moveit_simple_controller_manager - A very basic controller manager plugin. Can connect toFollowJointTrajectoryAction andGripperCommandAction servers.

https://github.com/ros-planning/moveit_plugins

youbot的controller如下

————————————————————————

2016.05更新

————————————————————————

GROUPS: Representation of a set of joints and links. This can be useful for specifying DOF to plan for, defining arms, end effectors, etc
LINKS: When a link is specified, the parent joint of that link (if it exists) is automatically included
JOINTS: When a joint is specified, the child link of that joint (which will always exist) is automatically included
CHAINS: When a chain is specified, all the links along the chain (including endpoints) are included in the group. Additionally, all the joints that are parents to included links are   also included. This means that joints along the chain and the parent joint of the base link are included in the group
SUBGROUPS: Groups can also be formed by referencing to already defined group names

• 那么结合手头的，ros by example里是舵机组成的手臂，用的是Chains。