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.
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.
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.
AssertionError – [Invalid input object type]
Adds robot model to the MJCF model.
mujoco_robot (RobotModel) – robot to merge into this MJCF model
Adds arena model to the MJCF model.
mujoco_arena (Arena) – arena to merge into this MJCF model
Adds object models to the MJCF model.
mujoco_objects (OrderedDict or MujocoObject) – objects to merge into this MJCF model
is_visual (bool) – Whether the object is a visual object or not
Places objects randomly until no collisions or max iterations hit.