Environments
MuJoCoReach-v1
Move the TCP to a target position using the MuJoCo backend.
MuJoCoReach-v1
Move the robot's end-effector (TCP) to a randomly sampled target position.
Overview
| Property | Value |
|---|---|
| Environment ID | MuJoCoReach-v1 |
| Backend | MuJoCo |
| Max episode steps | 512 |
| Config class | ReachConfig (extends EnvironmentConfig) |
| Task description | "Move the robot's end-effector to the target position." |
Configuration
ReachConfig extends EnvironmentConfig with the following fields:
| Field | Type | Default | Description |
|---|---|---|---|
target_radius | float | 0.02 | Radius of the visual target sphere |
target_workspace_half_extent | float | 0.15 | Half-extent of the workspace volume for target sampling |
success_threshold | float | 0.02 | Distance (m) within which the task is considered solved |
Observation Space
Default observation includes only joint positions (configurable via observations parameter on ReachConfig):
| Component | Class | Dimensions | Description |
|---|---|---|---|
| Joint positions | JointPositions | 6 | Current angle of each robot joint |
Objects
No graspable objects. The target is a visual-only sphere rendered in the scene.
Success Condition
The episode succeeds when the distance from the TCP to the target is less than success_threshold (default 0.02 m).
Example
import gymnasium as gym
import so101_nexus_mujoco
from so101_nexus_core.config import ReachConfig
env = gym.make(
"MuJoCoReach-v1",
render_mode="human",
config=ReachConfig(success_threshold=0.03),
)
obs, info = env.reset()
for _ in range(512):
action = env.action_space.sample()
obs, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
obs, info = env.reset()
env.close()