Skip to content

Commit

Permalink
Kinetic panda moveit commander (moveit#17)
Browse files Browse the repository at this point in the history
* moveit commander

* removing ref to pr2 and minor cleanup to moveit_commander tutorial

* changing bold to code
  • Loading branch information
mlautman authored and davetcoleman committed May 15, 2018
1 parent 50efbf7 commit 55114c8
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions doc/moveit_commander/moveit_commander_tutorial.rst
Original file line number Diff line number Diff line change
@@ -1,41 +1,43 @@
MoveIt! Commander and Command Line Tool
=======================================

The `moveit_commander <http://wiki.ros.org/moveit_commander>`_ Python package offers wrappers for the functionality provided in MoveIt!. Simple interfaces are available for motion planning, computation of Cartesian paths, and pick and place.
The `moveit_commander <http://wiki.ros.org/moveit_commander>`_ Python package offers wrappers for the functionality provided in MoveIt!. Simple interfaces are available for motion planning, computation of Cartesian paths, and pick and place. The ``moveit_commander`` package also includes a command line interface, ``moveit_commander_cmdline.py``.

Prerequisites
-------------

^^^^^^^^^^^^^
If you haven't already done so, make sure you've completed the steps in `Prerequisites
<../prerequisites/prerequisites.html>`_.

Command Line Tool
-----------------
Starting Rviz and the Command Line Tool
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Open two shells and make sure you have sourced the setup files in both shells::

The **moveit_commander** package also includes a command line tool for controlling the robot.
source ~/ws_moveit/devel/setup.bash

First, launch the MoveIt! simulated environment interface: ::
Start Rviz and wait for everything to finish loading in the first shell::

roslaunch pr2_moveit_config demo.launch
roslaunch panda_moveit_config demo.launch

Now initiate the **moveit_commander** interface: ::
Now initiate the ``moveit_commander`` interface in another shell: ::

rosrun moveit_commander moveit_commander_cmdline.py

Using the MoveIt! Commander Command Line Tool
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The command below will start a command line interface tool that allows you to connect to a running instance of the move_group node. The first command you should type is: ::

use <group name>

This will connect to the move_group node for the group name you specified (in the PR2, for instance, you could connect to left_arm). You can now execute commands on that group.
This command, **current**, will show you the current state of your group: ::
This will connect to the move_group node for the group name you specified (in the Panda, for instance, you could connect to ``panda_arm``). You can now execute commands on that group.
This command, ``current``, will show you the current state of your group: ::

current

To record that state under a specific name you can simply type: ::

rec c

This will remember the current joint values of the robot group under the name c. Matlab-like syntax is available for modifying joint values. The code above copies the joint values of c into a new variable named goal. We then modify the first joint of goal to 0.2. You may need to use a different value instead of 0.2 (it needs to be within your allowed bounds and not cause collisions). The **go** command plans a motion and executes it.
This will remember the current joint values of the robot group under the name ``c``. Matlab-like syntax is available for modifying joint values. The code above copies the joint values of c into a new variable named goal. We then modify the first joint of ``goal`` to ``0.2``. You may need to use a different value instead of ``0.2`` (it needs to be within your allowed bounds and not cause collisions). The ``go`` command plans a motion and executes it.

To get the robot to move, you could type, for example: ::

Expand All @@ -44,11 +46,13 @@ To get the robot to move, you could type, for example: ::
go goal


Instead of calling **go** you could also type: ::
Instead of calling ``go`` you could also type: ::

goal[0] = 0.2
goal[1] = 0.2
plan goal
execute

This is slightly inefficient, but the advantage is that the **plan** command allows you to visualize the computed motion plan in Rviz before you actually issue the execute command.
This is slightly inefficient, but the advantage is that the ``plan`` command allows you to visualize the computed motion plan in Rviz before you actually issue the execute command.

For a list of supported commands, you can type "help".
For a list of supported commands, you can type ``help``. To exit the ``moveit_commander`` interface you can type ``quit``.

0 comments on commit 55114c8

Please sign in to comment.