[Documentation] [TitleIndex] [WordIndex

Note: This tutorial assumes that you have completed the previous tutorials: Spawning Objects in Simulation Getting Started with the Hand and Arm Interface.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Simulation: Using the Gazebo interface

Description: This tutorial will get you started with our Gazebo interface.

Tutorial Level: BEGINNER

  Show EOL distros: 

Compiling the Interface for Gazebo

To compile the ROS interface with Gazebo support, you just need to add a GAZEBO environment variable:

export GAZEBO=1

Then recompile the package by running

rosmake sr_hand

You can also change this on a per compile basis:

GAZEBO=1 rosmake sr_hand

The shadowhand_virtual and shadowarm_virtual nodes are now compiled for Gazebo.

Running the Gazebo Interface

You have to see the Gazebo interface as a robot on its own: once the Gazebo interface is running, you can access it using the same commands as shown in the previous tutorial: Getting Started with the Hand and Arm Interface.

To start the hand and arm in Gazebo, you can run (you can use the other gazebo launch files in this package if you want to use the muscle hand or the arm / hand on their own):

$ roslaunch sr_hand gazebo_arm_and_hand_motor.launch

This should start Gazebo, spawn our models in it, and start the controllers for the robot. You should see the Gazebo window:

Shadow Robot's Hand and Arm in Gazebo

Using the Robot in Gazebo

As previously stated, when you start the gazebo interface, it doesn't start our interface. To start the ROS interface, just run:

$ roslaunch sr_hand sr_arm_motor.launch

You are now connected to the robot in Gazebo through our interface. You can use all the tools / code described in the other tutorials.

Tactile Sensors in Gazebo

You can use the tactile sensors in the Gazebo interface:

$ roslaunch sr_tactile_sensors sr_tactile_gazebo.launch

To see how you can interact with the tactile sensors, please go to the sr_tactile_sensors wiki page.

Running a different model of the hand

There are different models of the hand available (one finger unit, etc...). To use one of these, just prepend ONE_FINGER=1 to the previous roslaunch commands:

$ ONE_FINGER=1 roslaunch sr_hand gazebo_hand_motor.launch

NB: This should be configured by default on your system if you get it from us.

This tutorial is no longer valid under Fuerte, as Gazebo is now the default method of viewing the Robot. Please see the Running the hand and arm interface tutorial for Gazebo instructions.

Our stacks have not yet been released under Groovy, please use the Fuerte versions.

Our stacks have not yet been released under Hydro, please use the Fuerte versions.


2019-11-16 13:22