'''[http://moveit.ros.org/wiki/MoveIt! MoveIt! Please visit the MoveIt! homepage for more information]'''

+

'''[http://moveit.ros.org/ MoveIt! Please visit the MoveIt! homepage for more information]'''

== Summary ==

== Summary ==

This tutorial describes how to use the Baxter Research Robot with MoveIt! the standard ROS motion planning framework.

This tutorial describes how to use the Baxter Research Robot with MoveIt! the standard ROS motion planning framework.

Line 48:

Line 48:

====Baxter Planning Groups ====

====Baxter Planning Groups ====

−

Describes the joints considered during motion planning. These are specified in the [[SRDF SRDF]] for Baxter. Baxter's SRDF includes planning groups, additional collision checking information, and default configurations. These groups are generated dynamically via Xacro

+

Describes the joints considered during motion planning. These are specified in the SRDF for Baxter. Baxter's SRDF includes planning groups, additional collision checking information, and default configurations. These groups are generated dynamically via Xacro

'''''Planning Groups'''''

'''''Planning Groups'''''

Line 102:

Line 102:

<tabs>

<tabs>

<tab title="With Electric Gripper(s)">

<tab title="With Electric Gripper(s)">

+

If you have the Rethink Electric grippers plugged into your robot, use the following to bringup MoveIt:

This tutorial will focus on the MoveIt! Rviz plugin as an introduction to some of the capabilities of MoveIt!

Baxter Planning Groups

Describes the joints considered during motion planning. These are specified in the SRDF for Baxter. Baxter's SRDF includes planning groups, additional collision checking information, and default configurations. These groups are generated dynamically via Xacro

Planning Groups

both_arms

left_arm

right_arm

left_arm

chain base -> left_gripper

left_s0

left_s1

left_e0

left_e1

left_w0

left_w1

left_w2

left_hand

left_endpoint

right_arm

chain base -> right_gripper

right_s0

right_s1

right_e0

right_e1

right_w0

right_w1

right_w2

right_hand

right_endpoint

left_hand

left_gripper

right_hand

right_gripper

The SRDF is generated dynamically at runtime and then loaded to the param server under robot_semantic_description. You can view the top level SRDF Xacro file at any time:

If you have the Rethink Electric grippers plugged into your robot, use the following to bringup MoveIt:

$ roslaunch baxter_moveit_config baxter_grippers.launch

This version will add the gripper linkages to the collision shapes. If you only have one gripper plugged in, you can always disable the missing gripper collision shape, by launching with arg <side>_electric_gripper:=false. For example:

will only give you collision shapes for the left electric gripper. By default both grippers' collision shapes are enabled.

$ roslaunch baxter_moveit_config demo_baxter.launch

This version will not add electric grippers collision shapes, and MoveIt may not give a valid trajectory if you have electric grippers plugged in.

Note:* Do not launch baxter_moveit_config demo_sim.launch with the ROS_MASTER_URI set to the robot (ie. using the robot's ros master) as this starts a new joint_state_publisher/robot_state_publisher causing the robot's internal joint_state_publisher/robot_state_publisher be preempted, essentially ceasing Baxter's ability to move the arms until reboot.

Executing a simple motion plan

You will see the goal state for the motion planning, shown for each plan group in Orange.

You can then move Baxter's arms to a planning goal by clicking and dragging the arrows (Cartesian) and rings (orientation) of the interactive markers. Kinematic/collision checking is happening simultaneously and will not allow self collisions (links will turn red), or goal states out of the reachable workspace (inability to drag and endpoint/gripper will turn red).

With a valid goal state, and assuming that the robot is in a valid start state, you are now ready to plan and execute a trajectory from your start state to the goal state.

In the bottom left you will the motion planning frame with a tabbed interface to access different tools of the MoveIt! Rviz visualizer.

Please select the Planning tab in this frame.

Click the Plan_ tab under the Commands field to plan a trajectory from your start state to the goal. You will see this solution executed in Rviz. When you are happy with the planned trajectory, click _Execute to run this trajectory on the robot.

Alternatively, if you would like to immediately execute the first plan from your current position to the goal position use the Plan and Execute button.

Another useful field in the Planning_ tab is Query. You can specify here _Select Start State_ choosing <current>, <random>, and <same as goal>, choosing these options with the _Update_ button. Also, You may _Select Goal State by clicking that button. Here again you can choose <current>, <random>, and <same as goal> for the Goal State.

Note: It is dangerous to plan from a start state other than your current joint positions. Please update the Select Start State_ option under the Query field to reflect your current position before planning. This can be done by clicking the _Select Start State:_ text, from the drop down menu select <current>, click _Update to complete this step. You will now be planning from your current position as the start state.

After trajectory execution you will see Baxter has achieved your specified Goal.

Introducing an environment representation for planning

Select the Scene Object tab from the Motion Planning frame.

We will now create a scene object in a text file to be imported into our environment.

After opening this scene you will now see the pillar inserted into your environment.

Important: You must publish your current scene so that MoveIt! knows that it will need to plan around your modified environment. Do so by selecting the Context_ tab from the Motion Planning frame. Under this tab you must click the _Publish Current Scene Button under the Planning Library field.

Similar to our previous planning we can now drag our interactive markers moving the goal state to a location on the opposite side of the pillar.

Selecting the Planning tab in the motion planning frame you can now plan a new trajectory that will avoid collision with your environment object (the pillar). The shell in which you launched demo_baxter.launch will provide information regarding which planner will be used, how long it took to find a solution, path simplification/smoothing time, and more. This will also display if your planner was unsuccessful in finding an allowable solution. This is often caused by collision with the environment during testing of the execution or invalid start/goal states. In very constrained or difficult motions, you may have to plan several times to find an acceptable solution for execution.

Upon execution the robot will avoid this 'virtual' object tracking the commanded trajectory.

That's it, you have successfully commanded Baxter using MoveIt!

Programmatic interaction for planning

There is much more information, tutorials, API documentation and more on moveit.ros.org.

The arm is not executing the trajectory

Arm not executing plan; "Unable to identify any set of controllers"

Problem Description:

Pressed plan, solution was found and a trajectory execution service request was recieved after which I got the error:
Unable to identify any set of controllers that can actuate the specified joints: [left_e0 left_e1 left_s0 left_s1 left_w0 left_w1 left_w2 right_e0 right_e1 right_s0 right_s1 right_w0 right_w1 right_w2 ]
After which nothing occurred.

If you see the following warning error in the terminal output when roslaunch-ing demo_baxter.launch:
[FATAL] [1372432489.342541284]: Parameter '~moveit_controller_manager' not specified. This is needed to identify the plugin to use for interacting with controllers. No paths can be executed.
This indicates you need to make sure you have the appropriate controller manager plugins installed. Make sure to follow the Baxter MoveIt! Installation instructions and install the required debian packages for both moveit-full and any required plugins.