Environments
MuJoCoMove-v1
Move the TCP in a specified direction using the MuJoCo backend.
MuJoCoMove-v1
Move the robot's end-effector in a cardinal direction by a fixed distance.
Overview
| Property | Value |
|---|---|
| Environment ID | MuJoCoMove-v1 |
| Backend | MuJoCo |
| Max episode steps | 256 |
| Config class | MoveConfig (extends EnvironmentConfig) |
| Task description | "Move the end-effector {direction} by {distance:.2f} m." |
Configuration
MoveConfig extends EnvironmentConfig with the following fields:
| Field | Type | Default | Description |
|---|---|---|---|
direction | Literal["up", "down", "left", "right", "forward", "backward"] | -- | Direction of movement |
target_distance | float | 0.10 | Distance to move in meters |
success_threshold | float | 0.01 | Distance (m) within which the task is considered solved |
Observation Space
Default observation includes only joint positions (configurable via observations parameter on MoveConfig):
| Component | Class | Dimensions | Description |
|---|---|---|---|
| Joint positions | JointPositions | 6 | Current angle of each robot joint |
Objects
No objects are present. The goal position is computed at episode start from the initial TCP position offset by direction * target_distance.
Success Condition
The episode succeeds when the distance from the TCP to the target is less than success_threshold (default 0.01 m).
Example
import gymnasium as gym
import so101_nexus_mujoco
from so101_nexus_core.config import MoveConfig
env = gym.make(
"MuJoCoMove-v1",
render_mode="human",
config=MoveConfig(direction="up", target_distance=0.10),
)
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()