SO101-Nexus
API Reference

Scene Objects

Reference for scene object types used in environments.

Scene Objects

Scene objects define what the robot interacts with. All object types live in so101_nexus_core and share the abstract SceneObject base class.

Backend Support

ClassMuJoCoManiSkill
CubeObjectYesYes
YCBObjectYesYes
MeshObjectYesNo

SceneObject (abstract)

Base class for all scene objects. Subclasses must implement __repr__(), which returns a natural-language description of the object (used in logging and debugging).

from so101_nexus_core import SceneObject

SceneObject cannot be instantiated directly. Use one of the concrete subclasses below.


CubeObject

A solid-color cube with configurable size and mass.

from so101_nexus_core import CubeObject

cube = CubeObject(half_size=0.02, mass=0.015, color="blue")
repr(cube)  # "blue cube"

Constructor Parameters

ParameterTypeDefaultDescription
half_sizefloat0.0125Half the side length of the cube (meters)
massfloat0.01Mass of the cube (kg)
colorColorName"red"Color of the cube. Must be a valid ColorName.

__repr__()

Returns "{color} cube", for example "red cube".


YCBObject

A YCB benchmark object loaded from mesh files. Assets are downloaded automatically on first use.

from so101_nexus_core import YCBObject

banana = YCBObject("011_banana")
repr(banana)  # human-readable name from YCB_OBJECTS dict

Constructor Parameters

ParameterTypeDefaultDescription
model_idstrrequiredYCB model identifier. Must be a key in YCB_OBJECTS.
mass_overridefloat | NoneNoneOverride the default mass. Uses the original mass when None.

Validation

model_id must be one of the supported YCB model IDs:

Model IDName
009_gelatin_boxGelatin box
011_bananaBanana
030_forkFork
031_spoonSpoon
032_knifeKnife
033_spatulaSpatula
037_scissorsScissors
040_large_markerLarge marker
043_phillips_screwdriverPhillips screwdriver
058_golf_ballGolf ball

__repr__()

Returns the human-readable name from the YCB_OBJECTS dictionary.


MeshObject

A custom mesh object defined by collision and visual mesh files. Only supported on the MuJoCo backend.

from so101_nexus_core import MeshObject

obj = MeshObject(
    collision_mesh_path="/path/to/collision.obj",
    visual_mesh_path="/path/to/visual.obj",
    mass=0.05,
    name="custom widget",
    scale=0.8,
)
repr(obj)  # "custom widget"

Constructor Parameters

ParameterTypeDefaultDescription
collision_mesh_pathstrrequiredPath to the collision mesh file
visual_mesh_pathstrrequiredPath to the visual mesh file
massfloatrequiredMass of the object (kg)
namestrrequiredHuman-readable name for the object
scalefloat1.0Uniform scale factor applied to the meshes

__repr__()

Returns the name provided at construction.

Backend Limitation

MeshObject is only supported in MuJoCo environments. Passing a MeshObject to a ManiSkill environment will raise an error.

On this page