Implementation:ARISE Initiative Robosuite BinObject
| Knowledge Sources | |
|---|---|
| Domains | Robotics, Simulation, MJCF_Modeling |
| Last Updated | 2026-02-15 07:00 GMT |
Overview
Bin is a composite object that generates a four-walled open-top bin container for use as a target receptacle in robotic manipulation tasks.
Description
The Bin class extends CompositeObject to procedurally generate a rectangular bin with a flat base and four surrounding walls. The bin is constructed from five box geoms: one base and four walls positioned around the perimeter. Wall placement uses rotation quaternions generated from axis-angle conversions to orient each wall correctly, with the wall width parameter automatically derived from the bin's full dimensions.
The base geom is slightly inset from the walls by subtracting the wall thickness from its x and y dimensions, ensuring proper geometric fit. Walls can optionally be rendered as semi-translucent (RGBA alpha = 0.3) when transparent_walls is True, which is the default and helps with visual debugging of contents. When not transparent, walls can use either solid RGBA colors or realistic textures (dark wood by default, using the "WoodDark" material).
The object supports configurable friction, density (default 1000 kg/m^3), and dimensions. The base_geoms property provides access to the properly name-prefixed base geometry name, useful for detecting when objects are placed on the bin floor. All geoms are created relative to the bin's center using the locations_relative_to_center flag.
Usage
Use Bin as a target container in pick-and-place tasks, sorting tasks, or any manipulation scenario requiring objects to be placed into a receptacle. Configure bin_size and wall_thickness to match the task requirements.
Code Reference
Source Location
- Repository: ARISE_Initiative_Robosuite
- File: robosuite/models/objects/composite/bin.py
Signature
class Bin(CompositeObject):
def __init__(
self,
name,
bin_size=(0.3, 0.3, 0.15),
wall_thickness=0.01,
transparent_walls=True,
friction=None,
density=1000.0,
use_texture=True,
rgba=(0.2, 0.1, 0.0, 1.0),
):
Import
from robosuite.models.objects.composite.bin import Bin
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | Name of this Bin object |
| bin_size | tuple(3) | No | (x, y, z) full size of the bin. Default: (0.3, 0.3, 0.15) |
| wall_thickness | float | No | Thickness of bin walls. Default: 0.01 |
| transparent_walls | bool | No | If True, walls will be semi-translucent. Default: True |
| friction | tuple(3) or None | No | Friction values (sliding, torsional, rolling). Default: None |
| density | float | No | Density value for all geoms. Default: 1000.0 |
| use_texture | bool | No | If True, use realistic wood textures. Default: True |
| rgba | tuple(4) or None | No | RGBA values for geoms when not using textures. Default: (0.2, 0.1, 0.0, 1.0) |
Outputs
| Name | Type | Description |
|---|---|---|
| Bin instance | CompositeObject | Open-top bin object with base and four wall geoms |
| base_geoms | list[str] | List containing the name-prefixed base geom name |
Usage Examples
from robosuite.models.objects.composite.bin import Bin
# Create a default bin
bin_obj = Bin(name="target_bin")
# Create a larger bin with opaque walls and custom friction
bin_obj = Bin(
name="large_bin",
bin_size=(0.4, 0.4, 0.2),
wall_thickness=0.015,
transparent_walls=False,
friction=(1.0, 0.005, 0.0001),
density=800.0,
)
# Access the base geometry names for contact detection
base_names = bin_obj.base_geoms