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)
orientation_success_threshold_degfloat5.73Maximum angular error in degrees for success

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

The episode succeeds when the angular error between the TCP's gaze direction and the direction to the target is less than orientation_success_threshold_deg (default 5.73 degrees).

Example

import gymnasium as gym
import so101_nexus_mujoco

from so101_nexus_core.config import LookAtConfig
from so101_nexus_mujoco.objects import CubeObject

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