Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:ARISE Initiative Robosuite TransportGroup

From Leeroopedia
Knowledge Sources
Domains Robotics, Object Modeling, Task Design
Last Updated 2026-02-15 07:00 GMT

Overview

The TransportGroup class defines a group of objects for a transport task, consisting of a payload, trash, start bin, target bin, trash bin, and a lid, with state tracking for task completion.

Description

TransportGroup extends ObjectGroup to encapsulate all the objects needed for a transport manipulation task. The task involves transporting a payload from a start bin (covered by a lid) to a target bin, while also removing a piece of trash from the target bin and placing it in a dedicated trash bin.

The group creates three Bin objects (start, target, trash) with configurable size and high density (10000) to prevent tipping, plus a Lid object sized to cover the start bin. The payload and trash objects are provided externally as constructor arguments.

The class tracks geom IDs and body IDs for all components after being linked to a simulation via update_sim. It provides a rich set of properties for querying object states: positions and quaternions for the lid handle, payload, and trash; positions of the target and trash bins; and boolean checks for whether the trash is in the trash bin and whether the payload is in the target bin (using contact detection via SU.check_contact).

The get_states method returns a comprehensive dictionary of the current task state, making it easy to evaluate task progress and define reward functions.

Usage

Use this class to set up transport manipulation tasks in robosuite environments. It manages all the objects and state queries needed for a multi-step manipulation task involving lid removal, payload transport, and trash disposal.

Code Reference

Source Location

Signature

class TransportGroup(ObjectGroup):
    def __init__(self, name, payload, trash, bin_size=(0.3, 0.3, 0.15))

Import

from robosuite.models.objects.group.transport import TransportGroup

I/O Contract

Inputs

Name Type Required Description
name str Yes Name prefix prepended to all generated geom bodies
payload MujocoObject Yes Object representing the payload to be transported
trash MujocoObject Yes Object representing the trash to be removed
bin_size 3-tuple No (x, y, z) full size of the bins (default: (0.3, 0.3, 0.15))

Outputs

Name Type Description
get_states() dict Dictionary with task state including poses, positions, and contact booleans
lid_handle_pos np.ndarray (x, y, z) absolute position of the lid handle
lid_handle_quat np.ndarray (x, y, z, w) quaternion of the lid handle
payload_pos np.ndarray (x, y, z) absolute position of the payload
payload_quat np.ndarray (x, y, z, w) quaternion of the payload
trash_pos np.ndarray (x, y, z) absolute position of the trash
trash_quat np.ndarray (x, y, z, w) quaternion of the trash
target_bin_pos np.ndarray (x, y, z) absolute position of the target bin
trash_bin_pos np.ndarray (x, y, z) absolute position of the trash bin
trash_in_trash_bin bool True if trash is in contact with the trash bin base
payload_in_target_bin bool True if payload is in contact with the target bin base

Usage Examples

from robosuite.models.objects import BoxObject
from robosuite.models.objects.group.transport import TransportGroup

# Create payload and trash objects
payload = BoxObject(name="payload", size=[0.03, 0.03, 0.03], rgba=[0, 0, 1, 1])
trash = BoxObject(name="trash", size=[0.02, 0.02, 0.02], rgba=[1, 0, 0, 1])

# Create the transport group
transport = TransportGroup(
    name="task",
    payload=payload,
    trash=trash,
    bin_size=(0.3, 0.3, 0.15),
)

# After environment setup and sim initialization:
# transport.update_sim(sim)
# states = transport.get_states()
# print(f"Payload in target bin: {states['payload_in_target_bin']}")
# print(f"Trash in trash bin: {states['trash_in_trash_bin']}")

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment