Skip to content

Commit

Permalink
consistency for code blocks (moveit#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlautman authored and davetcoleman committed May 15, 2018
1 parent 9c42f44 commit b8fae26
Show file tree
Hide file tree
Showing 23 changed files with 89 additions and 99 deletions.
11 changes: 5 additions & 6 deletions doc/benchmarking/benchmarking_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ The example below demonstrates how the benchmarking can be run for a Fanuc M-10i

Example
-------

An example is provided in the ``examples`` folder. The launch file requires a MoveIt! configuration package
for the Fanuc M-10iA available from `here <https://github.com/ros-planning/moveit_resources>`_.

To run:

#. Launch the Fanuc M-10iA ``demo.launch``::
#. Launch the Fanuc M-10iA ``demo.launch``: ::

roslaunch moveit_resources demo.launch db:=true

Expand All @@ -31,7 +30,7 @@ To run:

rosed moveit_ros_benchmarks demo_fanuc.launch

#. Run the benchmarks::
#. Run the benchmarks: ::

roslaunch moveit_ros_benchmarks demo_fanuc.launch

Expand All @@ -41,11 +40,11 @@ Viewing Results

The benchmarks are executed and many interesting parameters are aggregated and written to a logfile. A script (``moveit_benchmark_statistics.py``) is supplied to parse this data and plot the statistics.

Run::
Run: ::

rosrun moveit_ros_benchmarks moveit_benchmark_statistics.py <path_of_logfile>

To generate a PDF of plots::
To generate a PDF of plots: ::

python -p <plot_filename> moveit_benchmark_statistics.py <path_of_logfile>

Expand All @@ -55,7 +54,7 @@ Alternatively, upload the database file generated by ``moveit_benchmark_statisti
Parameters of the BenchmarkOptions Class
----------------------------------------

This class reads in parameters and options for the benchmarks to run from the ROS parameter server. The format of the parameters is assumed to be in the following form::
This class reads in parameters and options for the benchmarks to run from the ROS parameter server. The format of the parameters is assumed to be in the following form: ::

benchmark_config:

Expand Down
2 changes: 1 addition & 1 deletion doc/chomp_interface/chomp_interface_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Using CHOMP with your own robot
2. Adjust the line <rosparam command="load" file="$(find moveit_resources)/fanuc_moveit_config/config/chomp_planning.yaml" /> to <rosparam command="load" file="$(find jaco_moveit_config)/config/chomp_planning.yaml" />
3. Download `chomp_planning.yaml <https://github.com/ros-planning/moveit_resources/blob/master/fanuc_moveit_config/config/chomp_planning.yaml>`_ file into the config directory of your moveit config package. So into the *jaco_moveit_config/config* directory.
4. Copy the *demo.launch* file to *demo_chomp.launch*. Note that this file is also in the launch directory of the *jaco_moveit_config* package.
5. Find the lines where *move_group.launch* is included and change it to::
5. Find the lines where *move_group.launch* is included and change it to: ::

<include file="$(find jaco_moveit_config)/launch/move_group.launch">
<arg name="allow_trajectory_execution" value="true"/>
Expand Down
4 changes: 2 additions & 2 deletions doc/collision_contact/collision_contact_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ If you haven't already done so, make sure you've completed the steps in `Getting

Running the Code
----------------
Make sure you have sourced the setup files::
Make sure you have sourced the setup files: ::

source ~/ws_moveit/devel/setup.bash

Roslaunch the launch file to run the code directly from moveit_tutorials::
Roslaunch the launch file to run the code directly from moveit_tutorials: ::

roslaunch moveit_tutorials collision_contact_tutorial.launch

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ In this section, we will walk through configuring MoveIt! with the controllers o

YAML Configuration
------------------
The first file to create is a YAML configuration file (call it ``controllers.yaml`` and place it in the ``ROBOT_moveit_config/config`` directory of your MoveIt! robot config package). This will specify the controller configuration for your robot. Here's an example file for configuring a ``FollowJointTrajectory`` action controller for the ``panda_arm`` and a ``GripperCommand`` gripper controller for its ``hand``::
The first file to create is a YAML configuration file (call it ``controllers.yaml`` and place it in the ``robot_moveit_config/config`` directory of your MoveIt! robot config package). This will specify the controller configuration for your robot. Here's an example file for configuring a ``FollowJointTrajectory`` action controller for the ``panda_arm`` and a ``GripperCommand`` gripper controller for its ``hand``: ::

controller_list:
- name: panda_arm_controller
Expand Down Expand Up @@ -53,7 +53,7 @@ Create the Controller launch file
---------------------------------
Now, create the controller launch file (call it ``robot_moveit_controller_manager.launch.xml`` where ``robot`` is the name of your robot as specified when you created your MoveIt! robot config package).

Add the following lines to this file ::
Add the following lines to this file: ::

<launch>
<!-- Set the param that trajectory_execution_manager needs to find the controller plugin -->
Expand Down Expand Up @@ -83,7 +83,7 @@ You should also be able to see (using ``rostopic info topic_name``) that the top
Remapping /joint_states topic
-----------------------------

When you run a `move group node <../move_group_interface/move_group_interface_tutorial.html>`_, you may need to remap the topic /joint_states to /robot/joint_states, otherwise MoveIt! won't have feedback from the joints. To do this remapping you could make a simple launch file for your node as follows ::
When you run a `move group node <../move_group_interface/move_group_interface_tutorial.html>`_, you may need to remap the topic /joint_states to /robot/joint_states, otherwise MoveIt! won't have feedback from the joints. To do this remapping you could make a simple launch file for your node as follows: ::

<node pkg="moveit_ros_move_group" type="move_group" name="any_name" output="screen">
<remap from="joint_states" to="robot/joint_states"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Creating a constraint sampler
* In your ROBOT_moveit_config/launch/move_group.launch file, within the <node name="move_group">, add
the parameter:

::
<param name="constraint_samplers" value="YOURROBOT_moveit_constraint_sampler/YOURROBOTConstraintSamplerAllocator"/>

* Now when you launch move_group, it should default to your new constraint sampler.
33 changes: 12 additions & 21 deletions doc/getting_started/getting_started.rst
Original file line number Diff line number Diff line change
@@ -1,76 +1,67 @@
Getting Started
===============

Install ROS and Catkin
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`Install ROS Kinetic <http://wiki.ros.org/kinetic/Installation/Ubuntu>`_.
It is easy to miss steps when going through the ROS installation tutorial. If you run into errors in the next few steps, a good place to start is to go back and make sure you have installed ROS correctly.

Once you have ROS installed, make sure you have the most up to date packages:
::
Once you have ROS installed, make sure you have the most up to date packages: ::

rosdep update
sudo apt-get update
sudo apt-get dist-upgrade

Install `catkin <http://wiki.ros.org/catkin>`_ the ROS build system:
::
Install `catkin <http://wiki.ros.org/catkin>`_ the ROS build system: ::

sudo apt-get install ros-kinetic-catkin python-catkin-tools

Install MoveIt!
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The simplest way to install MoveIt! is from pre-built binaries (Debian):
::
The simplest way to install MoveIt! is from pre-built binaries (Debian): ::

sudo apt install ros-kinetic-moveit

Advanced users might want to `install MoveIt! from source <http://moveit.ros.org/install/source/>`_.

Create A Catkin Workspace
^^^^^^^^^^^^^^^^^^^^^^^^^
You will need to have a `catkin <http://wiki.ros.org/catkin>`_ workspace setup:
::
You will need to have a `catkin <http://wiki.ros.org/catkin>`_ workspace setup: ::

mkdir -p ~/ws_moveit/src

Download the Example Code
^^^^^^^^^^^^^^^^^^^^^^^^^
Within your `catkin <http://wiki.ros.org/catkin>`_ workspace, download these tutorials:
::
Within your `catkin <http://wiki.ros.org/catkin>`_ workspace, download these tutorials: ::

cd ~/ws_moveit/src
git clone https://github.com/PickNikRobotics/moveit_tutorials.git

You will also need a ``panda_moveit_config`` package to follow along with these tutorials. For now we will install from Debian but later we will learn how to make our own ``robot_moveit_config`` in the `MoveIt! Setup Assistant tutorial. <../setup_assistant/setup_assistant_tutorial.html>`_:
::
You will also need a ``panda_moveit_config`` package to follow along with these tutorials. For now we will install from Debian but later we will learn how to make our own ``robot_moveit_config`` in the `MoveIt! Setup Assistant tutorial. <../setup_assistant/setup_assistant_tutorial.html>`_: ::

sudo apt install ros-kinetic-panda-moveit-config

Build your Catkin Workspace
^^^^^^^^^^^^^^^^^^^^^^^^^^^
The following will attempt to install from Debian any package dependencies not already in your workspace:
::
The following will attempt to install from Debian any package dependencies not already in your workspace: ::

cd ~/ws_moveit/src
rosdep install -y --from-paths . --ignore-src --rosdistro kinetic

The next command will configure your catkin workspace:
::
The next command will configure your catkin workspace: ::

cd ~/ws_moveit
catkin config --extend /opt/ros/kinetic --cmake-args -DCMAKE_BUILD_TYPE=Release
catkin build

Source the catkin workspace:
::
Source the catkin workspace: ::

source ~/ws_moveit/devel/setup.bash

Optional: If you are only working on one catkin workspace at a time, you may want to add the previous command to your ``.bashrc``:
::
Optional: If you are only working on one catkin workspace at a time, you may want to add the previous command to your ``.bashrc``: ::

echo 'source ~/ws_moveit/devel/setup.bash' >> ~/.bashrc

Next Step
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`Visualize a robot with the interactive motion planning plugin for RViz <../visualization/visualization_tutorial.html>`_
`Visualize a robot with the interactive motion planning plugin for RViz <../visualization/visualization_tutorial.html>`_
54 changes: 27 additions & 27 deletions doc/ikfast/ikfast_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ Installing OpenRAVE on Ubuntu 16.04 is tricky. Here are 2 blog posts that give s
* `Stéphane Caron's Installing OpenRAVE on Ubuntu 16.04 <https://scaron.info/teaching/installing-openrave-on-ubuntu-16.04.html>`_
* `Francisco Suárez-Ruiz's Robotics Workstation Setup in Ubuntu 16.04 <https://fsuarez6.github.io/blog/workstation-setup-xenial>`_

Make sure you have these programs installed::
Make sure you have these programs installed: ::

sudo apt-get install cmake g++ git ipython minizip python-dev python-h5py python-numpy python-scipy qt4-dev-tools

You may also need the followng libraries::
You may also need the followng libraries: ::

sudo apt-get install libassimp-dev libavcodec-dev libavformat-dev libavformat-dev libboost-all-dev libboost-date-time-dev libbullet-dev libfaac-dev libglew-dev libgsm1-dev liblapack-dev liblog4cxx-dev libmpfr-dev libode-dev libogg-dev libpcrecpp0v5 libpcre3-dev libqhull-dev libqt4-dev libsoqt-dev-common libsoqt4-dev libswscale-dev libswscale-dev libvorbis-dev libx264-dev libxml2-dev libxvidcore-dev

To enable the OpenRAVE viewer you may also need to install OpenSceneGraph-3.4 from source::
To enable the OpenRAVE viewer you may also need to install OpenSceneGraph-3.4 from source: ::

sudo apt-get install libcairo2-dev libjasper-dev libpoppler-glib-dev libsdl2-dev libtiff5-dev libxrandr-dev
git clone https://github.com/openscenegraph/OpenSceneGraph.git --branch OpenSceneGraph-3.4
Expand All @@ -44,40 +44,40 @@ To enable the OpenRAVE viewer you may also need to install OpenSceneGraph-3.4 fr
make -j$(nproc)
sudo make install

For IkFast to work correctly, you *must* have the correct version of sympy installed::
For IkFast to work correctly, you *must* have the correct version of sympy installed: ::

pip install --upgrade --user sympy==0.7.1

You should *not* have mpmath installed::
You should *not* have mpmath installed: ::

sudo apt remove python-mpmath

MoveIt! IKFast Installation
---------------------------
Install the MoveIt! IKFast package either from debs or from source.

**Binary Install** ::
**Binary Install**: ::

sudo apt-get install ros-kinetic-moveit-kinematics

**Source**

Inside your catkin workspace ::
Inside your catkin workspace: ::

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

OpenRAVE Installation
----------------------

**Binary Install (only Indigo / Ubuntu 14.04)**::
**Binary Install (only Indigo / Ubuntu 14.04)**: ::

sudo apt-get install ros-indigo-openrave

Note: you have to set::
Note: you have to set: ::

export PYTHONPATH=$PYTHONPATH:`openrave-config --python-dir`

**Source Install** ::
**Source Install**: ::

git clone --branch latest_stable https://github.com/rdiankov/openrave.git
cd openrave && mkdir build && cd build
Expand All @@ -101,23 +101,23 @@ Parameters
* *MOVEIT_IK_PLUGIN_PKG* - name of the new package you just created
* *IKFAST_OUTPUT_PATH* - file path to the location of your generated IKFast output.cpp file

To make using this tutorial copy/paste friendly, set a MYROBOT_NAME environment variable with the name of your robot::
To make using this tutorial copy/paste friendly, set a MYROBOT_NAME environment variable with the name of your robot: ::

export MYROBOT_NAME="panda_arm"

First you will need robot description file that is in `Collada or OpenRAVE <http://openrave.org/docs/latest_stable/collada_robot_extensions/>`_ robot format.

If your robot is not in this format we recommend you create a ROS `URDF <http://www.ros.org/wiki/urdf/Tutorials/Create%20your%20own%20urdf%20file>`_ file.

If your robot is in `xacro <http://wiki.ros.org/xacro/>`_ format you can convert it to urdf using the following command::
If your robot is in `xacro <http://wiki.ros.org/xacro/>`_ format you can convert it to urdf using the following command: ::

rosrun xacro xacro --inorder -o "$MYROBOT_NAME".urdf "$MYROBOT_NAME".urdf.xacro

Once you have your robot in URDF format, you can convert it to Collada (.dae) file using the following command::
Once you have your robot in URDF format, you can convert it to Collada (.dae) file using the following command: ::

rosrun collada_urdf urdf_to_collada "$MYROBOT_NAME".urdf "$MYROBOT_NAME".dae

Often floating point issues arrise in converting a URDF file to Collada file, so a script has been created to round all the numbers down to x decimal places in your .dae file. Its probably best if you skip this step initially and see if IKFast can generate a solution with your default values, but if the generator takes longer than, say, an hour, try the following::
Often floating point issues arrise in converting a URDF file to Collada file, so a script has been created to round all the numbers down to x decimal places in your .dae file. Its probably best if you skip this step initially and see if IKFast can generate a solution with your default values, but if the generator takes longer than, say, an hour, try the following: ::

export IKFAST_PRECISION="5"
cp "$MYROBOT_NAME".dae "$MYROBOT_NAME".bakup.dae # create a backup of your full precision dae.
Expand All @@ -127,13 +127,13 @@ From experience we recommend 5 decimal places, but if the OpenRAVE ikfast genera

To see the links in your newly generated Collada file

You may need to install package **libsoqt4-dev** to have the display working::
You may need to install package **libsoqt4-dev** to have the display working: ::

openrave-robot.py "$MYROBOT_NAME".dae --info links

This is useful if you have a 7-dof arm and you need to fill in a --freeindex parameter, discussed later.

To test your newly generated Collada file in OpenRAVE::
To test your newly generated Collada file in OpenRAVE: ::

openrave "$MYROBOT_NAME".dae

Expand All @@ -152,7 +152,7 @@ You need to choose which sort of IK you want. See `this page <http://openrave.or

Choose Planning Group
^^^^^^^^^^^^^^^^^^^^^
If your robot has more than one arm or "planning group" that you want to generate an IKFast solution for, choose one to generate first. The following instructions will assume you have chosen one <planning_group_name> that you will create a plugin for. Once you have verified that the plugin works, repeat the following instructions for any other planning groups you have. For example, you might have 2 planning groups::
If your robot has more than one arm or "planning group" that you want to generate an IKFast solution for, choose one to generate first. The following instructions will assume you have chosen one <planning_group_name> that you will create a plugin for. Once you have verified that the plugin works, repeat the following instructions for any other planning groups you have. For example, you might have 2 planning groups: ::

<planning_group_name> = "left_arm"
<planning_group_name> = "right_arm"
Expand All @@ -163,7 +163,7 @@ To make it easy to use copy/paste for the rest of this tutorial. Set a PLANNING_

Identify Link Numbers
^^^^^^^^^^^^^^^^^^^^^
You also need the link index numbers for the *base_link* and *end_link* between which the IK will be calculated. You can count the number of links by viewing a list of links in your model::
You also need the link index numbers for the *base_link* and *end_link* between which the IK will be calculated. You can count the number of links by viewing a list of links in your model: ::

openrave-robot.py "$MYROBOT_NAME".dae --info links

Expand Down Expand Up @@ -197,15 +197,15 @@ If you have a 7 DOF arm you will need ot specify a free link::
Generate IK Solver
^^^^^^^^^^^^^^^^^^

To generate the IK solution between the manipulator's base and tool frames for a 6 dof arm, use the following command format. We recommend you name the output ikfast61\_"$PLANNING_GROUP".cpp ::
To generate the IK solution between the manipulator's base and tool frames for a 6 dof arm, use the following command format. We recommend you name the output ikfast61\_"$PLANNING_GROUP".cpp: ::

export IKFAST_OUTPUT_PATH=`pwd`/ikfast61_"$PLANNING_GROUP".cpp

For a 6 dof arm::
For a 6 dof arm: ::

python `openrave-config --python-dir`/openravepy/_openravepy_/ikfast.py --robot="$MYROBOT_NAME".dae --iktype=transform6d --baselink="$BASE_LINK" --eelink="$EEF_LINK" --savefile="$IKFAST_OUTPUT_PATH"

For a 7 dof arm, you will need to specify a free link::
For a 7 dof arm, you will need to specify a free link: ::

python `openrave-config --python-dir`/openravepy/_openravepy_/ikfast.py --robot="$MYROBOT_NAME".dae --iktype=transform6d --baselink="$BASE_LINK" --eelink="$EEF_LINK" --freeindex="$FREE_INDEX" --savefile="$IKFAST_OUTPUT_PATH"

Expand All @@ -220,31 +220,31 @@ You should consult the OpenRAVE mailing list and ROS Answers for information abo
Create Plugin
-------------

Create the package that will contain the IK plugin. We recommend you name the package "$MYROBOT_NAME"_ikfast_"$PLANNING_GROUP"_plugin. ::
Create the package that will contain the IK plugin. We recommend you name the package "$MYROBOT_NAME"_ikfast_"$PLANNING_GROUP"_plugin.: ::

export MOVEIT_IK_PLUGIN_PKG="$MYROBOT_NAME"_ikfast_"$PLANNING_GROUP"_plugin
cd ~/catkin_ws/src
catkin_create_pkg "$MOVEIT_IK_PLUGIN_PKG"

Build your workspace so the new package is detected (can be 'roscd')::
Build your workspace so the new package is detected (can be 'roscd'): ::

catkin build

Create the plugin source code::
Create the plugin source code: ::

rosrun moveit_kinematics create_ikfast_moveit_plugin.py "$MYROBOT_NAME" "$PLANNING_GROUP" "$MOVEIT_IK_PLUGIN_PKG" "$IKFAST_OUTPUT_PATH"

Or without ROS::
Or without ROS: ::

python /path/to/create_ikfast_moveit_plugin.py "$MYROBOT_NAME" "$PLANNING_GROUP" "$MOVEIT_IK_PLUGIN_PKG" "$IKFAST_OUTPUT_PATH"

Usage
-----
The IKFast plugin should function identically to the default KDL IK Solver, but with greatly increased performance. The MoveIt configuration file is automatically edited by the moveit_ikfast script but you can switch between the KDL and IKFast solvers using the *kinematics_solver* parameter in the robot's kinematics.yaml file ::
The IKFast plugin should function identically to the default KDL IK Solver, but with greatly increased performance. The MoveIt configuration file is automatically edited by the moveit_ikfast script but you can switch between the KDL and IKFast solvers using the *kinematics_solver* parameter in the robot's kinematics.yaml file: ::

rosed "$MYROBOT_NAME"_moveit_config/config/kinematics.yaml

Edit these parts::
Edit these parts: ::

<planning_group>:
kinematics_solver: <myrobot_name>_<planning_group>_kinematics/IKFastKinematicsPlugin
Expand Down
Loading

0 comments on commit b8fae26

Please sign in to comment.