PR2 robot

../../_images/pr2.png

The MORSE model of the Willow Garage’s PR2 robot.

The PR2 uses the armature_actuator for control of the armatures.

Model Info

The model is imported from a Collada file that is generated from the PR2 URDF file. The .dae file can be found at: $MORSE_ROOT/data/robots/pr2/pr2.dae The imported .blend file can be found at: $MORSE_ROOT/data/robots/pr2/pr2_25_original.blend

The URDF to Collada converter changed all the object names, so these were remapped to the original URDF names. A renamed version of the PR2 model can be found at: $MORSE_ROOT/data/robots/pr2/pr2_25_rename.blend , this file includes the script that is used to rename all the objects.

A model with MORSE integration for the armature can be found at (This is the model that you probably want to use in MORSE): $MORSE_ROOT/data/robots/pr2/pr2_25_morse.blend.

TODO

Configuration parameters for PR2 robot

You can :

You can set these properties in your scripts with <component>.properties(<property1>=..., <property2>=...).

  • NoGravity (bool, default: False)
    Indicate if we want to consider the gravity for this robot If true, the behaviour is less realistic as the simulator will automatically compensate it. This setting is useful for non-realistic model flying or submarine robot
  • GroundRobot (bool, default: False)
    Indicate if the robot is a ground robot, i.e. basically if it has no way to control its position on the Z axis, nor this X and Y rotation axis

Services for PR2 robot

  • get_armatures() (blocking)

    Returns a list of all the armatures on the PR2 robot.

  • get_configurations() (blocking)

    Returns the configurations of a component (parsed from the properties).

    • Return value

      a dictionary of the current component’s configurations

  • get_properties() (blocking)

    Returns the properties of a component.

    • Return value

      a dictionary of the current component’s properties

  • get_torso() (blocking)

    Returns the z-translation of the torso.

  • get_torso_minmax() (blocking)

    Returns the minimum an maximum z-translation that the torso can make from the base. Returns a list [min,max]

  • grasp(grab, obj_name) (blocking)

    Grasp near object.

    • Parameters
      • grab: set to True to take an object and False to release it.
      • obj_name: when None, the robot will just grasp the nearest object without any consideration for the object name.
  • set_property(prop_name, prop_val) (blocking)

    Modify one property on a component

    • Parameters

      • prop_name: the name of the property to modify (as shown the documentation)
      • prop_val: the new value of the property. Note that there is no checking about the type of the value so be careful
    • Return value

      nothing

  • set_torso() (blocking)

    MORSE Service that sets the z-translation of the torso to original_z + height.

Examples

The following examples show how to use this component in a Builder script:

from morse.builder import *

# creates a new instance of the robot
pr2 = PR2()

# place your component at the correct location
pr2.translate(<x>, <y>, <z>)
pr2.rotate(<rx>, <ry>, <rz>)

# define one or several communication interface, like 'socket'
pr2.add_interface(<interface>)

env = Environment('empty')

Other sources of examples

(This page has been auto-generated from MORSE module morse.robots.pr2.)