Task

The Task class is responsible for integrating a given Arena, RobotModel, and set of MujocoObjects into a single element tree that is then parsed and converted into an MjSim object. It is also responsible for placing the objects within the simulation.

Manipulation Task

class robosuite.models.tasks.ManipulationTask(mujoco_arena, mujoco_robots, mujoco_objects, visual_objects=None, initializer=None)

Creates MJCF model for a manipulation task performed, usually on a table top (or similar surface).

A manipulation task consists of one or more robots interacting with a variable number of objects placed on a table. This class combines the robot(s), the arena, and the objects into a single MJCF model.

Parameters
  • mujoco_arena (Arena) – MJCF model of robot workspace

  • mujoco_robots (list of RobotModel) – MJCF model of robot model(s) (list)

  • mujoco_objects (OrderedDict of MujocoObject) – a list of MJCF models of physical objects

  • visual_objects (OrderedDict of MujocoObject) – a list of MJCF models of visual-only objects that do not participate in collisions

  • initializer (ObjectPositionSampler) – placement sampler to initialize object positions.

Raises

AssertionError – [Invalid input object type]

merge_robot(mujoco_robot)

Adds robot model to the MJCF model.

Parameters

mujoco_robot (RobotModel) – robot to merge into this MJCF model

merge_arena(mujoco_arena)

Adds arena model to the MJCF model.

Parameters

mujoco_arena (Arena) – arena to merge into this MJCF model

merge_objects(mujoco_objects, is_visual=False)

Adds object models to the MJCF model.

Parameters
  • mujoco_objects (OrderedDict or MujocoObject) – objects to merge into this MJCF model

  • is_visual (bool) – Whether the object is a visual object or not

place_objects()

Places objects randomly until no collisions or max iterations hit.