Embedded Motion Control 2013/Simulator: Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
Line 4: Line 4:


# Open a terminal ''(ctrl-alt-t)''
# Open a terminal ''(ctrl-alt-t)''
# Navigate to the ''jazz_gazebo'' ROS package: <pre>roscd jazz_gazebo</pre>
# Navigate to the ''jazz_gazebo'' ROS package: <pre>roscd jazz_gazebo</pre>
# And build and compile it and its dependencies: <pre>rosmake</pre>
# And build and compile the jazz simulator and other necessary packages: <pre>rosmake jazz_gazebo gazebo_map_spawner</pre>


Furthermore, Gazebo needs to know where to find the robot description (located in ''jazz_description'') which includes its meshes, textures, kinematic chain, etc, and where to find the plugins for the controllers and sensors. This information can be set in the environment variables ''GAZEBO_PLUGIN_PATH'' and ''GAZEBO_MODEL_PATH'':
Furthermore, Gazebo needs to know where to find the robot description (located in ''jazz_description'') which includes its meshes, textures, kinematic chain, etc, and where to find the plugins for the controllers and sensors. This information can be set in the environment variables ''GAZEBO_PLUGIN_PATH'' and ''GAZEBO_MODEL_PATH'':

Revision as of 22:48, 31 August 2013

Installation

If you followed all steps specified on the installation page , you will already have downloaded the simulator Gazebo and our specific Jazz simulator. To be able to use the Jazz simulator, you first have to compile the downloaded ROS packages:

  1. Open a terminal (ctrl-alt-t)
  1. Navigate to the jazz_gazebo ROS package:
    roscd jazz_gazebo
  2. And build and compile the jazz simulator and other necessary packages:
    rosmake jazz_gazebo gazebo_map_spawner

Furthermore, Gazebo needs to know where to find the robot description (located in jazz_description) which includes its meshes, textures, kinematic chain, etc, and where to find the plugins for the controllers and sensors. This information can be set in the environment variables GAZEBO_PLUGIN_PATH and GAZEBO_MODEL_PATH:

  1. Open a terminal (ctrl-alt-t)
  2. Open .bashrc:
    gedit ~/.bashrc
  3. Add the following lines:
    export GAZEBO_PLUGIN_PATH=~/ros/general/jazz_gazebo/lib:~/ros/general/tue_gazebo_plugins/lib:$GAZEBO_PLUGIN_PATH
    export GAZEBO_MODEL_PATH=~/ros/general/jazz_description:$GAZEBO_MODEL_PATH

Usage

  1. Start Gazebo:
    gazebo
  2. Spawn the maze:
    rosrun gazebo_map_spawner spawn_maze
  3. Spawn Jazz:
    roslaunch jazz_gazebo jazz.launch

Notice that the Jazz robot is spawned in the Gazebo world. The Gazebo GUI shows how the world actually is. We can also visualize how the robot perceives it through its sensors, by using the ROS tool [ http://ros.org/wiki/rviz Rviz ]. You can start RViz with a pre-defined config showing most of Jazz' sensors using:

rosrun jazz_visualization rviz

... Some more explanation ...

Troubleshoot

Gazebo does not stop gracefully upon exit or interrupt (ctrl-c)

You may get the warning:

Warning [gazebo_main.cc:59] escalating to SIGKILL on server

when stopping Gazebo. This is a known bug and has no consequences, other than that it takes a bit longer to kill Gazebo.