Skip to content

v1.2 - Observable Sensor Models and Dynamics Randomization

Compare
Choose a tag to compare
@cremebrule cremebrule released this 18 Feb 06:56
e439e96

robosuite 1.2.0 Release Notes

  • Highlights
  • New Features
  • Improvements
  • Critical Bug Fixes
  • Other Bug Fixes

Highlights

This release of robosuite tackles a major challenge of using simulators: real-world transfer! (Sim2Real)

We present two features to significantly improve the sim2real transferrability -- realistic sensor modeling (observables) and control over physics modeling parameters (dynamics randomization).

Observables

This standardizes and modularizes how observations are computed and gathered within a given env. Now, all observations received from the env.step() call can be modified programmatically in either a deterministic or stochastic way. Sensor realism has been increased with added support for individual sensor sampling rates, corruption, delay, and filtering. The OTS behavior (obs dict structure, default no corruption / delay / filtering) has been preserved for backwards compatibility.

Each Observable owns its own _sensor, _corrupter, _delayer, and _filter functions, which are used to process new data computed during its update() call which is called after every simulation timestep, NOT policy step! (Note, however that a new value is only computed once per sampling period, NOT at every update() call). Its functionality is described briefly described below:

  • _sensor: Arbitrary function that takes in an observation cache and computes the "raw" (potentially ground truth) value for the given observable. It can potentially leverage pre-computed values from the observation cache to compute its output. The @sensor decorator is provided to denote this type of function, and guarantees a modality for this sensor as well.
  • _corrupter: Arbitrary function that takes in the output from _sensor and outputs the corrupted data.
  • _delayer: Arbitrary function that takes no arguments and outputs a float time value (in seconds), denoting how much delay should be applied to the next sampling cycle
  • _filter: Arbitrary function that takes in the output of _corrupter and outputs the filtered data.

All of the above can either be (re-)defined at initialization or during runtime. Utility functions have been provided in the base.py environment module to easily interact with all observables owned by the environment.

Some standard corrupter and delayer function generators are provided ([deterministic / uniform / gaussian] [corruption / delay]), including dummy no-ops for standard functions. All of this can be found in observables.py, and has been heavily documented.

An example script demo'ing the new functionality can be found in demo_sensor_corruption.py.

Dynamics Randomization

Physical parameters governing the underlying physics model can now be modified in real-time via the DynamicsModder class in mjmod.py. This modder allows mid-sim randomization of the following supported properties, sorted by element group (for more information, please see Mujoco XML Reference)

Opt (Global) Parameters

  • density: Density of the medium (i.e.: air)
  • viscosity: Viscosity of the medium (i.e.: air)

Body Parameters

  • position: (x, y, z) Position of the body relative to its parent body
  • quaternion: (qw, qx, qy, qz) Quaternion of the body relative to its parent body
  • inertia: (ixx, iyy, izz) diagonal components of the inertia matrix associated with this body
  • mass: mass of the body

Geom Parameters

  • friction: (sliding, torsional, rolling) friction values for this geom
  • solref: (timeconst, dampratio) contact solver values for this geom
  • solimp: (dmin, dmax, width, midpoint, power) contact solver impedance values for this geom

Joint parameters

  • stiffness: Stiffness for this joint
  • frictionloss: Friction loss associated with this joint
  • damping: Damping value for this joint
  • armature: Gear inertia for this joint

The new DynamicsModder follows the same basic API as the other Modder classes, and allows per-parameter and per-group randomization enabling. Apart from randomization, this modder can also be instantiated to selectively modify values at runtime. Detailed information can be found on our docs page along with an informative example script.

Improvements

The following briefly describes other changes that improve on the pre-existing structure. This is not an exhaustive list, but a highlighted list of changes.

  • robosuite docs have been completely overhauled! Hopefully no more broken links or outdated APIs (#159)

  • Tuned parallel jaw grippers (PandaGripper and RethinkGripper) for improved grasp stability and significantly reduced sliding

  • Tuned default gains for teleoperation when using keyboard device

  • Added small frictionloss, damping, and armature values to all robot joints by default to improve stability and reduce no-op drift over time

  • Simulation now uses realistic values for air density and viscosity

  • tune_camera.py is more flexible: can now take string names as inputs and also modify any camera active in the simulation (e.g.: eye_in_hand!)

  • Add macros for automatically concatenating image frames from different cameras

  • Add new papers

  • Improve documentation semantics

Critical Bug Fixes

  • Fix interpolator dimension bug (#181)

  • Fixed xml object naming bug (#150)

  • Fixed deterministic action playback (however, a caveat, and a test script to test this) (#178)

Other Bug Fixes

  • Fix contact geom bug with Jaco, and a test script to test contact geoms for all robots (#180)

  • Fix OSC position default orientation and when to update orientation goals

  • Fix OSC orientation to be consistent with global coordinate axes frame of reference

  • Fix spacemouse import bug (#186)


Contributor Spotlight

A big thank you to the following community members for contributing PRs for this release!
@hermanjakobsen
@zhuyifengzju