SO101-Nexus
Environments

MuJoCoLookAt-v1

Orient the TCP toward an object using the MuJoCo backend.

MuJoCoLookAt-v1

Orient the robot's end-effector so that it points at a target object.

Overview

PropertyValue
Environment IDMuJoCoLookAt-v1
BackendMuJoCo
Max episode steps256
Config classLookAtConfig (extends EnvironmentConfig)
Task description"Look at the {object repr}."

Configuration

LookAtConfig extends EnvironmentConfig with the following fields:

FieldTypeDefaultDescription
objectslist--List of objects to look at (supports CubeObject)
fov_degfloat | NoneNoneVertical field of view (degrees) of the wrist camera. Succeeds when the target lies within the camera's field of view (angle between the wrist-camera optical axis and the direction to the object is at most fov_deg / 2). When None, the FOV is read from the actual wrist camera at runtime, so the success band adapts to any camera configuration or a wider FOV.

Observation Space

Default observation includes only joint positions (configurable via observations parameter on LookAtConfig):

ComponentClassDimensionsDescription
Joint positionsJointPositions6Current angle of each robot joint

Objects

The environment uses CubeObject instances as gaze targets.

Success Condition

Succeeds when the target is within the wrist camera's field of view: the angle between the wrist-camera optical axis and the direction to the object is at most half the camera FOV (fov_deg / 2, or the live cam_fovy / 2 when fov_deg is None). The dense reward shapes toward dead-center (1.0 when perfectly aligned), rewarding the object being centered in the frame.

Example

import gymnasium as gym
import so101_nexus.mujoco
from so101_nexus import CubeObject, LookAtConfig

env = gym.make(
    "MuJoCoLookAt-v1",
    render_mode="human",
    config=LookAtConfig(
        objects=[CubeObject()],
    ),
)

obs, info = env.reset()
for _ in range(256):
    action = env.action_space.sample()
    obs, reward, terminated, truncated, info = env.step(action)
    if terminated or truncated:
        obs, info = env.reset()

env.close()

On this page