---
title: MuJoCoPickLift-v1
description: 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

| Property | Value |
|----------|-------|
| Environment ID | `MuJoCoPickLift-v1` |
| Backend | MuJoCo |
| Max episode steps | 1024 |
| Config class | `PickConfig` |
| Task description | "Pick up the \{object repr\}." |

## Demo Rollout

Recorded PickLift teleoperation rollout, shown from both stored camera streams.

### Overhead camera

<video
  controls
  muted
  playsInline
  width="100%"
  aria-label="MuJoCo PickLift overhead camera rollout"
>
  <source
    src="https://huggingface.co/datasets/johnsutor/MuJoCoPickLift/resolve/main/videos/observation.images.overhead/chunk-000/file-000.mp4"
    type="video/mp4"
  />
  Open the
  <a href="https://huggingface.co/spaces/lerobot/visualize_dataset?path=%2Fjohnsutor%2FMuJoCoPickLift%2Fepisode_0">
    PickLift episode viewer
  </a>
  instead.
</video>

### Wrist camera

<video
  controls
  muted
  playsInline
  width="100%"
  aria-label="MuJoCo PickLift wrist camera rollout"
>
  <source
    src="https://huggingface.co/datasets/johnsutor/MuJoCoPickLift/resolve/main/videos/observation.images.wrist/chunk-000/file-000.mp4"
    type="video/mp4"
  />
  Open the
  <a href="https://huggingface.co/spaces/lerobot/visualize_dataset?path=%2Fjohnsutor%2FMuJoCoPickLift%2Fepisode_0">
    PickLift episode viewer
  </a>
  instead.
</video>

[Open the dataset](https://huggingface.co/datasets/johnsutor/MuJoCoPickLift) or
[inspect episode 0 in the LeRobot viewer](https://huggingface.co/spaces/lerobot/visualize_dataset?path=%2Fjohnsutor%2FMuJoCoPickLift%2Fepisode_0).

## Observation Space

The observation is a 24-dimensional vector.

| Component | Dimensions | Description |
|-----------|------------|-------------|
| `joint_pos` | 6 | Current angle of each robot joint |
| `tcp_pos` | 3 | TCP position in world frame |
| `tcp_quat` | 4 | TCP orientation as quaternion |
| `is_grasped` | 1 | Whether the object is currently grasped |
| `obj_pos` | 3 | Object position |
| `obj_quat` | 4 | Object orientation as quaternion |
| `tcp_to_obj` | 3 | Vector 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

```python
import gymnasium as gym
import so101_nexus.mujoco
from so101_nexus import CubeObject, PickConfig

env = gym.make(
    "MuJoCoPickLift-v1",
    render_mode="human",
    config=PickConfig(
        objects=[
            CubeObject(color="blue"),
            CubeObject(color="green"),
            CubeObject(color="yellow"),
        ],
        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()
```

## Train a policy

Train a PPO policy for this task on the GPU-parallel Warp backend (`WarpPickLift-v1`) in Colab:

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/johnsutor/so101-nexus/blob/main/examples/ppo_warp_colab.ipynb)

Set `ENV_ID = "WarpPickLift-v1"` in the notebook's environment cell. See [Training with PPO](/docs/training/ppo) for the local CLI workflow.
