diff --git a/doc/moveit_commander/moveit_commander_tutorial.rst b/doc/moveit_commander/moveit_commander_tutorial.rst index 9f47aaa152..0200f7a234 100644 --- a/doc/moveit_commander/moveit_commander_tutorial.rst +++ b/doc/moveit_commander/moveit_commander_tutorial.rst @@ -1,33 +1,35 @@ MoveIt! Commander and Command Line Tool ======================================= -The `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 `_ 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 -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 @@ -35,7 +37,7 @@ 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: :: @@ -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``.