SO101-Nexus
Environments

MuJoCoPickLift-v1

Pick up and lift an object using the MuJoCo backend.

MuJoCoPickLift-v1

Pick up an object from the table and lift it above a height threshold.

Overview

PropertyValue
Environment IDMuJoCoPickLift-v1
BackendMuJoCo
Max episode steps1024
Config classPickConfig
Task description"Pick up the {object repr}."

Observation Space

The observation is an 18-dimensional vector.

ComponentDimensionsDescription
tcp_pos3TCP position in world frame
tcp_quat4TCP orientation as quaternion
is_grasped1Whether the object is currently grasped
obj_pos3Object position
obj_quat4Object orientation as quaternion
tcp_to_obj3Vector from TCP to object

Objects

The environment supports three object types via the PickConfig:

  • CubeObject -- a simple colored cube
  • YCBObject -- an object from the YCB dataset
  • MeshObject -- a custom mesh object

Success Condition

The episode succeeds when both conditions are met:

  1. The object is grasped (is_grasped is true).
  2. The object is lifted above the lift_threshold (default 0.05 m).

Reward

The reward is a shaped sum of:

  • Reaching -- progress toward the object
  • Grasping -- bonus for successfully grasping the object
  • Lift progress -- reward proportional to lift height
  • Completion bonus -- awarded when the success condition is met

Distractors

Pass n_distractors in the config to add non-target objects to the scene. These objects are not part of the task but increase visual and physical complexity.

Example

import gymnasium as gym
import so101_nexus_mujoco

from so101_nexus_mujoco.config import PickConfig
from so101_nexus_mujoco.objects import CubeObject

env = gym.make(
    "MuJoCoPickLift-v1",
    render_mode="human",
    config=PickConfig(
        objects=[CubeObject()],
        n_distractors=2,
    ),
)

obs, info = env.reset()
for _ in range(1024):
    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