[Documentation] [TitleIndex] [WordIndex

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.


2024-11-23 17:55