r2.jpg

NASA-GM Robonaut 2

ROS Software Maintainers: Stephen Hart, Paul Dinh, Ross Taylor

This page gives an introduction to the NASA-GM Robonaut 2 ROS Simulator. More information about R2 can be found at its official website.

Getting Started with R2

  1. Build the simulator stack
    rosmake nasa_r2_simulator
  2. Start up Gazebo in a desired world and spawn an R2 model (choose only one of the following commands)
    roslaunch r2_gazebo r2_empty.launch     # empty world
    roslaunch r2_gazebo r2_ISS.launch       # International Space Station (ISS)
    roslaunch r2_gazebo r2_taskboard.launch # empty world + ISS Task Board

    r2_iss_taskboard.png

Here is a picture of R2 interacting with the ISS Task Board. NOTE: Don't say we didn't warn you that the simulated ISS module leaves something to be desired when compared to the reality.

Basic Control

R2 "Ready Pose"

  • rosrun r2_controllers_gazebo r2_readypose.py
    This script will put the robot into it's home position that we call "ready pose." Note that as per the Robonaut convention, this will turn the robot 180 degrees to face the other way. Here is a screenshot of what the robot should look like after running this script:

    r2_readypose_sim.png

Arm Control Modes

  • R2 runs a dual-priority impedance controller on each of its arms. This allows users to command, at any time, either a joint position (this is joint mode), or a high-priority Cartesian pose to a specified "tool tip" (e.g., left_palm, right_index_tip, etc.) and a low-priority joint position (this is Cartesian mode). By default, the robot starts up in joint mode. To switch to Cartesian mode you can use the service call:

    rosservice call /r2_controller/set_tip_name <arm_name> <link_name>

    where "arm name" is either "left" or "right," and "link_name" can be any link name along the appropriate left or right arm chain. A common tip that is used for the left arm is "left_middle_base" representing the base of the left middle finger. To switch back to joint mode for an arm, you can use the service call:

    rosservice call /r2_controller/set_joint_mode <arm_name>

    When an arm is in joint mode, JointState messages can be used to command the joints on the following ports:

    • /r2_controller/left_arm/joint_command
    • /r2_controller/right_arm/joint_command

    When it is in Cartesian mode, PoseStamped messages can be used to set the pose of the tool tip specified with the above service call on the following ports:

    • /r2_controller/left/pose_command
    • /r2_controller/right/pose_command
    In this mode, low priority joint commands can be sent to the arms on the above topics as well. The current state of the robot's left or right tips can be subscribed to on the following ports:
    • /r2_controller/left/pose_state
    • /r2_controller/right/pose_state

Controlling the Head and Waist

  • R2's 3-DOF head can be controlled by sending JointState messages on the following port:

    • /r2_controller/neck/joint_command
    The head is a Tilt-Pan-Tilt device.

    R2's 1-DOF waist can be controlled by sending JointState messages on the following port:

    • /r2_controller/waist/joint_command

R2 Interactive Markers

  1. Launch Gazebo with an R2 model, if needed (see above)
  2. Launch RViz
    rosrun rviz rviz
  3. Launch the R2 Interactive Marker control
    rosrun r2_teleop r2_interactive_control.py
  4. In RViz, set up the appropriate configuration:
    • Under Global Options, change Fixed Frame to "/world"

    • Add Robot Model
    • Add Grid (optional)
    • Add Interactive Markers and set update topic to "/r2_interactive_control/update"

    • Select the 'Interact' option in RViz to display the Interactive Markers

      interactive_markers.png

R2 Climbing Legs

  • Also available are simulations of the R2 IVA Climbing legs. To start up a simulation of the full R2 inside a reduced model of the ISS, use the following launch script:
    roslaunch r2_gazebo r2c_full_body.launch     # R2 + IVA Legs + Reduced ISS Model
    If you are interested in just the legs on a testbed, then use the following script:
    roslaunch r2_gazebo r2c_legs.launch       # IVA Legs on Testbed Setup 
    Below are screenshots of what you should see in Gazebo using these scripts.
    • align="center"

Gazebo Plugins

The legs and full body sims use two custom gazebo plugins that are described here. The xacro files that launch and control the plugins are found in nasa_r2_simulator/r2_gazebo/urdf/gazebo_plugins.

Gazebo Interface

GazeboInterface is a (mostly) robot agnostic ROS interface to a gazebo sim that provides joint level PID control. It allows joint commands (sensor_msgs/JointState) to control the robot and provides feedback on current joint position (sensor_msgs/JointState). The ROS Topics are defined in gazebo_interface.xacro.

The gazebo interface uses robot specific settings defined in YAML files in nasa_r2_simulator/r2_gazebo/config/controllers to setup the PID loops, set the initial joint configuration, and define joint dependencies.

The joints names are fully qualified. Each limb has 7 joints (0 based), the waist has one, the neck has three, the gripper has 3

  • /r2/left_leg/joint0

The joint names are slash delimited, underscore separated words and are fully qualified, including robot name, chain name, and joint name with a 0-based index. Some examples are:

  • /r2/left_arm/joint0
  • /r2/left_leg/joint5
  • /r2/waist/joint0
  • /r2/right_arm/hand/thumb/joint1
  • /r2/right_leg/gripper/joint0

The following table defines the full chain hierarchy for the left side with number of joints. Many of the joints in the hands and grippers are dependent on other joints as defined by the YAML setting files.

chain name

# joints

waist

1

neck

3

left_arm

7

hand

thumb

4

index

4

middle

4

ring

3

little

3

left_leg

7

gripper

3

Gazebo Gripper

The gazebo gripper plugin that launches with the legs provides a grasp hack for the leg grippers. When both jaws of the gripper are in contact with an object, the object becomes attached to the foot. When the jaws release the object, the fixed connection is released.

Library Overview

The Robonaut 2 files are contained in the nasa-r2-common and nasa-r2-simulator stacks. For an outline of these files, please see the tables below.

Basic Configuration

Component

ROS package/stack

Robot model (URDF)

nasa_r2_common/r2_description

Simulation and Controller Tools

Component

ROS package/stack

Simulation (3D)

nasa_r2_simulator/r2_gazebo

Tools

nasa_r2_simulator/r2_controllers_gazebo

High-Level Capabilities

Component

ROS package/stack

Teleop

nasa_r2_common/r2_teleop

Report a Bug

Report bugs at our repo.

Wiki: Robots/Robonaut2 (last edited 2012-10-25 20:03:20 by RossTaylor)