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
| Property | Value |
|---|---|
| Environment ID | MuJoCoLookAt-v1 |
| Backend | MuJoCo |
| Max episode steps | 256 |
| Config class | LookAtConfig (extends EnvironmentConfig) |
| Task description | "Look at the {object repr}." |
Configuration
LookAtConfig extends EnvironmentConfig with the following fields:
| Field | Type | Default | Description |
|---|---|---|---|
objects | list | -- | List of objects to look at (supports CubeObject) |
orientation_success_threshold_deg | float | 5.73 | Maximum angular error in degrees for success |
Observation Space
Default observation includes only joint positions (configurable via observations parameter on LookAtConfig):
| Component | Class | Dimensions | Description |
|---|---|---|---|
| Joint positions | JointPositions | 6 | Current 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()