## For instruction on writing tutorials
## http://www.ros.org/wiki/WritingTutorials
####################################
##FILL ME IN
####################################
## for a custom note with links:
## note =
## for the canned note of "This tutorial assumes that you have completed the previous tutorials:" just add the links
## note.0=
## descriptive title for the tutorial
## title = Launching a REEM Gazebo simulation
## multi-line description to be displayed in search
## description =  This tutorial describes how to open a Gazebo simulation for the REEM robot.
## the next tutorial description (optional)
## next =
## links to next tutorial (optional)
## next.0.link=[[Robots/REEM/Tutorials/play_motion]]
## next.1.link=
## what level user is this tutorial for
## level= BeginnerCategory
## keywords =
####################################
<<IncludeCSTemplate(TutorialCSHeaderTemplate)>>

<<TableOfContents(4)>>

== Indigo ==
Please follow the instructions that match your platform: [[http://wiki.ros.org/indigo/Installation|indigo/Installation]]

You will need to install the ''desktop_full'' variant.

=== Fetch the REEM stuff ===
 * Create a catkin workspace:
  . {{{
mkdir -p ~/reem-sim_ws/src && cd ~/reem-sim_ws/src
catkin_init_workspace
}}}

 * Checkout the rosinstall file
  . {{{
wstool init .
wstool merge https://raw.githubusercontent.com/pal-robotics/pal-ros-pkg/master/reem-sim-indigo.rosinstall
}}}

 * Checkout the REEM packages
  . {{{
wstool update -j8
}}}

 * Pull dependences
  . {{{
cd ..
rosdep install --from-paths src --ignore-src --rosdistro indigo -y
}}}

 * Build everything
  . {{{
catkin_make
}}}

 * Setup the ROS environment
  . {{{
. ~/reem-sim_ws/devel/setup.bash
}}}

You may want to add this line at the bottom of your ~/.bashrc file if you plan to work with REEM simulation.

== Hydro ==
Please follow the instructions that match your platform: [[hydro/Installation]]

You will need to install the ''desktop_full'' variant.

=== Fetch the REEM stuff ===
 * Create a catkin workspace:
  . {{{
mkdir -p ~/reem-sim_ws/src && cd ~/reem-sim_ws/src
catkin_init_workspace
}}}

 * Checkout the rosinstall file
  . {{{
wstool init .
wstool merge https://raw.githubusercontent.com/pal-robotics/pal-ros-pkg/master/reem-sim-hydro.rosinstall
}}}

 * Checkout the REEM packages
  . {{{
wstool update -j8
}}}

 * Pull dependences
  . {{{
cd ..
rosdep install --from-paths src --ignore-src --rosdistro hydro -y
}}}

 * Build everything
  . {{{
catkin_make
}}}

 * Setup the ROS environment
  . {{{
. ~/reem-sim_ws/devel/setup.bash
}}}

You may want to add this line at the bottom of your ~/.bashrc file if you plan to work with REEM simulation.

== Launch the simulation ==
{{{
roslaunch reem_gazebo reem_empty_world.launch
}}}
{{attachment:reem-sim.png||width="100%"}}

Note that as of 17 of February 2014 you may get some harmless known errors like:

{{{
[ERROR] [1392654852.580381429]: Couldn't open joystick /dev/input/js0. Will retry every second.
}}}
If you don't have a joystick connected.

And also this ones:

{{{
Error [ContactManager.cc:267] Filter with the same name already exists! Aborting
[ WARN] [1392654861.824167641, 2.190000000]: gazebo_ros_camera_ simulation does not support non-zero distortion parameters right now, your simulation maybe wrong.
Error [SDF.cc:788] Missing element description for [depthImageTopicName]
Error [SDF.cc:788] Missing element description for [depthImageCameraInfoTopicName]
[ WARN] [1392654863.504664112, 2.190000000]: Joint limits will not be enforced for position-controlled joints: ...
}}}
This is being worked on.

## AUTOGENERATED DO NOT DELETE
## TutorialCategory
## FILL IN THE STACK TUTORIAL CATEGORY HERE