robosuite.models.tasks package#
Submodules#
robosuite.models.tasks.manipulation_task module#
robosuite.models.tasks.task module#
- class robosuite.models.tasks.task.Task(mujoco_arena, mujoco_robots, mujoco_objects=None)#
Bases:
MujocoWorldBase
Creates MJCF model for a task performed.
A task consists of one or more robots interacting with a variable number of objects. 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 (RobotModel or list of RobotModel) – MJCF model of robot model(s) (list)
mujoco_objects (None or MujocoObject or list of MujocoObject) – a list of MJCF models of physical objects
- Raises:
AssertionError – [Invalid input object type]
- property classes_to_ids#
Returns: dict: Mapping from specific classes to {geom, site} IDs in sim
- generate_id_mappings(sim)#
Generates IDs mapping class instances to set of (visual) geom IDs corresponding to that class instance
- Parameters:
sim (MjSim) – Current active mujoco simulation object
- property geom_ids_to_classes#
Returns: dict: Mapping from geom IDs in sim to specific classes
- property geom_ids_to_instances#
Returns: dict: Mapping from geom IDs in sim to specific class instance names
- property instances_to_ids#
Returns: dict: Mapping from specific class instance names to {geom, site} IDs in sim
- 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)#
Adds object models to the MJCF model.
- Parameters:
mujoco_objects (list of MujocoObject) – objects to merge into this MJCF model
- merge_robot(mujoco_robot)#
Adds robot model to the MJCF model.
- Parameters:
mujoco_robot (RobotModel) – robot to merge into this MJCF model
- property site_ids_to_classes#
Returns: dict: Mapping from site IDs in sim to specific classes
- property site_ids_to_instances#
Returns: dict: Mapping from site IDs in sim to specific class instance names