API Reference
Core Package Public API surface of so101_nexus.
so101_nexus provides shared types, configuration classes, scene objects, observation components, asset helpers, and the environment registry. The MuJoCo backend lives under so101_nexus.mujoco and is registered by importing it.
Name Definition ColorNameLiteral["red", "orange", "yellow", "green", "blue", "purple", "black", "white", "gray"]ColorConfigColorName | list[ColorName]ControlModeLiteral["pd_joint_pos", "pd_joint_delta_pos", "pd_joint_target_delta_pos"]ObsModeLiteral["state", "visual"]MoveDirectionLiteral["up", "down", "left", "right", "forward", "backward"]YcbModelIdLiteral union of 10 YCB object IDs (see Assets and Geometry )
Name Type Description SO101_JOINT_NAMEStuple[str, ...]Ordered joint names for the SO-101 arm DIRECTION_VECTORSdict[MoveDirection, tuple]Maps direction names to unit vectors COLOR_MAPdict[str, list[float]]Maps color names to RGBA values YCB_OBJECTSdict[str, str]Maps YCB model IDs to human-readable names ROBOT_CAMERA_PRESETSdict[str, RobotCameraPreset]Named camera mounting presets for SO-100 and SO-101 ASSETS_DIRPathRoot directory for bundled assets SO_ARM100_DIRPathAsset directory for the SO-100 arm SO101_DIRPathAsset directory for the SO-101 arm (URDF/XML retained for teleop calibration; the MuJoCo backend loads the menagerie MJCF)
All configuration classes have sensible defaults. See Configuration Classes for full reference.
Class Purpose RenderConfigRender camera resolution (visualization only, not observations) RobotConfigRest pose, grasp force threshold, velocity threshold RobotCameraPresetNamed preset combining camera mounting parameters RewardConfigReward component weights with a compute() method EnvironmentConfigBase environment parameters (spawn region, obs mode, episode length) PickConfigExtends EnvironmentConfig for pick/lift tasks PickAndPlaceConfigExtends EnvironmentConfig for pick-and-place tasks TouchConfigExtends PickConfig for touch-an-object tasks LookAtConfigExtends EnvironmentConfig for look-at tasks MoveConfigExtends EnvironmentConfig for directional move tasks
See Observations for conceptual overview and Configuration Classes for full parameter reference.
Class Type Description ObservationAbstract base Base class for all observation components JointPositionsState (6-dim) Current joint angles EndEffectorPoseState (7-dim) TCP position + quaternion orientation TargetOffsetState (3-dim) Vector from gripper to goal GazeDirectionState (3-dim) Unit vector toward target GraspStateState (1-dim) Binary grasp flag ObjectPoseState (7-dim) Object position + quaternion orientation ObjectOffsetState (3-dim) Vector from gripper to object TargetPositionState (3-dim) Absolute goal position WristCameraCamera RGB image from wrist-mounted camera OverheadCameraCamera RGB image from stationary overhead camera
See Scene Objects for full reference.
Class Description SceneObjectAbstract base for all scene objects CubeObjectA colored cube with configurable size and mass YCBObjectA YCB benchmark object loaded from mesh assets MeshObjectA custom mesh object (MuJoCo only)
Function Signature Description sample_color(colors: ColorConfig, rng: Generator | None = None) -> list[float]Resolve a ColorConfig to an RGBA list, sampling uniformly if given a list of colors
Function Returns Description get_so101_simulation_dir()PathPath to SO-101 SO101/ assets (URDF/XML, retained for teleop calibration) get_so101_mujoco_model_dir()PathDirectory of the vendored menagerie MJCF (loaded by the MuJoCo backend) get_so101_mujoco_model_path()PathPath to the menagerie so101.xml (loaded by the MuJoCo backend) get_so100_simulation_dir()PathPath to SO-100 simulation assets
See Assets and Geometry for full reference.
Function Description ensure_ycb_assets(model_id)Download and cache YCB assets, return cache path get_ycb_mesh_dir(model_id)Path to mesh directory for a YCB model get_ycb_collision_mesh(model_id)Path to collision.obj get_ycb_visual_mesh(model_id)Path to visual.obj get_mujoco_ycb_rest_pose(verts)Rest orientation and spawn height for MuJoCo
Function Description all_registered_env_ids()Returns all registered Gymnasium environment IDs
See Environment Registry for details on how registration works.
The optional so101_nexus.processors subpackage provides LeRobot-style action and observation processor steps and a Gym wrapper that emits LeRobot-shaped observations. It requires the teleop extra (pip install so101-nexus[teleop]). See LeRobot Processors for the full reference.