Skip to content

Commit e25a17f

Browse files
committed
eval: add SimplerEnv StarVLA evaluation
1 parent 46dd77c commit e25a17f

16 files changed

Lines changed: 1610 additions & 2 deletions

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ bash robot_client/shell/cpp_client_example.sh
151151

152152
### 🧪 Using model-server in simulation, using LIBERO as the example
153153

154-
See the [LIBERO simulation evaluation guide](eval/libero/README.md).
154+
See the [LIBERO simulation evaluation guide](eval/libero/README.md). To run
155+
local StarVLA GGUF models on the WidowX Bridge tasks, see the
156+
[SimplerEnv Bridge guide](eval/simpler_env/README.md).
155157

156158
### 🦾 Using model-server on real hardware, using SO-101 as the example
157159

@@ -344,6 +346,7 @@ robot.cpp/
344346
├── eval/
345347
│ ├── base_platform.py # Shared base class for real-robot platforms
346348
│ ├── libero/ # LIBERO simulation evaluation
349+
│ ├── simpler_env/ # SimplerEnv WidowX / Bridge evaluation
347350
│ └── lerobot_so101/ # SO-101 real-robot scripts and examples
348351
└── third_party/
349352
├── llama.cpp/ # ggml / llama.cpp backend
@@ -400,6 +403,7 @@ Robot.cpp's design and implementation benefit from several excellent open-source
400403
* [llama.cpp](https://github.com/ggerganov/llama.cpp): provides lightweight local inference, the GGML/GGUF ecosystem, and cross-platform backend foundations. This project continues building robot model inference capabilities on top of its engineering philosophy and low-level runtime.
401404
* [LeRobot](https://github.com/huggingface/lerobot): provides reference implementations for robot data, policy training, and real-robot integration. The SO-101 real-robot example and parts of the evaluation flow in this project are inspired by the LeRobot ecosystem.
402405
* [LIBERO](https://github.com/Lifelong-Robot-Learning/LIBERO): provides robot simulation tasks and evaluation benchmarks. The LIBERO simulation evaluation flow in this project is based on its task environments and benchmark design.
406+
* [SimplerEnv](https://github.com/simpler-env/SimplerEnv): provides real-to-sim robot evaluation environments. The StarVLA Bridge success-rate evaluation uses its WidowX task suite and official visual-matching assets.
403407
* [OpenPI](https://github.com/Physical-Intelligence/openpi): provides the pi0 policy model and related open-source implementation. The pi0 runtime, conversion, and evaluation work in this project references OpenPI's model design.
404408

405409
Thanks to these projects and communities for their contributions to robot learning and on-device inference.

README_ZH.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ bash robot_client/shell/cpp_client_example.sh
151151

152152
### 🧪 model-server在仿真平台上的使用(以LIBERO为例)
153153

154-
详见 [LIBERO 仿真评测说明](eval/libero/README_ZH.md)
154+
详见 [LIBERO 仿真评测说明](eval/libero/README_ZH.md)。在 WidowX Bridge 任务上运行
155+
StarVLA,并比较 Python checkpoint 与 GGUF 的方法见
156+
[SimplerEnv Bridge 说明](eval/simpler_env/README_ZH.md)
155157

156158
### 🦾 model-server在真机平台上的使用(以SO-101为例)
157159

@@ -345,6 +347,7 @@ robot.cpp/
345347
├── eval/
346348
│ ├── base_platform.py # 真机 platform 的统一基类
347349
│ ├── libero/ # LIBERO 仿真评测
350+
│ ├── simpler_env/ # SimplerEnv WidowX / Bridge 仿真评测
348351
│ └── lerobot_so101/ # SO-101 真机相关脚本与示例
349352
└── third_party/
350353
├── llama.cpp/ # ggml / llama.cpp 后端
@@ -401,6 +404,7 @@ robot.cpp 的设计与实现受益于多个优秀的开源项目:
401404
* [llama.cpp](https://github.com/ggerganov/llama.cpp):提供了轻量化本地推理、GGML/GGUF 生态与跨平台后端基础,本项目在其工程哲学和底层能力上继续构建机器人模型推理框架。
402405
* [LeRobot](https://github.com/huggingface/lerobot):提供了机器人数据、策略训练与真实机器人接入的参考实现,本项目的 SO-101 真机示例与部分评测流程参考了 LeRobot 生态。
403406
* [LIBERO](https://github.com/Lifelong-Robot-Learning/LIBERO):提供了机器人仿真任务与评测基准,本项目的 LIBERO 仿真评测流程基于其任务环境与 benchmark 设计。
407+
* [SimplerEnv](https://github.com/simpler-env/SimplerEnv):提供了 real-to-sim 机器人评测环境,本项目的 StarVLA Bridge 成功率评测使用其 WidowX 任务集与官方 visual-matching 资产。
404408
* [OpenPI](https://github.com/Physical-Intelligence/openpi):提供了pi0策略模型与相关开源实现,本项目的 pi0 相关 runtime、转换与评测工作参考了 OpenPI 的模型设计。
405409

406410
感谢这些项目和社区为机器人学习与端侧推理生态做出的贡献。

eval/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ The repo root [README.md](../README.md) describes the three-layer layout:
2222
eval/
2323
├── base_platform.py # Shared base class for real-robot / sim platforms
2424
├── libero/ # LIBERO sim benchmark (multi-camera, batch rollout)
25+
├── simpler_env/ # SimplerEnv WidowX / Bridge closed-loop benchmark
2526
└── lerobot_so101/ # SO-101 real-robot sync closed-loop example
2627
```
2728

@@ -30,12 +31,16 @@ eval/
3031
| Directory | Scenario | Notes |
3132
|---|---|---|
3233
| [`libero/`](libero/README.md) | Sim eval | LIBERO benchmark with C++ policy rollout and LeRobot baseline. [中文](libero/README_ZH.md) |
34+
| [`simpler_env/`](simpler_env/README.md) | Sim eval | Runs StarVLA Python and GGUF on the SimplerEnv WidowX Bridge tasks. [中文](simpler_env/README_ZH.md) |
3335
| [`lerobot_so101/`](lerobot_so101/README.md) | Real robot | SO-101 follower + single-camera observe → predict → act loop. [中文](lerobot_so101/README_ZH.md) |
3436

3537
The two examples are organized slightly differently:
3638

3739
- **SO-101** follows the standard `BasePlatform` + `RobotPolicy` + `SyncControlLoop` path—use it as the template for new real-robot platforms.
3840
- **LIBERO** implements a dedicated observation adapter under `eval/libero/policy/` (multi-camera, state packing, sim rollout) and does **not** inherit `BasePlatform`—use it as a reference for new **sim benchmarks**.
41+
- **SimplerEnv** follows the same dedicated runner pattern and implements the
42+
WidowX action transform, temporal ensemble, normalization profile, and Bridge
43+
task settings for both Python and C++ runs.
3944

4045
## Standard closed-loop data flow
4146

@@ -237,6 +242,7 @@ LIBERO’s [`ModelServerPolicy`](libero/policy/model_server.py) is an example of
237242

238243
- [SO-101 real-robot guide](lerobot_so101/README.md) · [中文](lerobot_so101/README_ZH.md)
239244
- [LIBERO sim eval](libero/README.md) · [中文](libero/README_ZH.md)
245+
- [SimplerEnv Bridge eval](simpler_env/README.md) · [中文](simpler_env/README_ZH.md)
240246
- [robot_server launch and protocol](../robot_server/README.md)
241247
- [robot_client and policy](../robot_client/README.md)
242248
- [Adding a new model runtime](../src/README.md)

eval/README_ZH.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
eval/
2525
├── base_platform.py # 真机 / 仿真 platform 的统一基类
2626
├── libero/ # LIBERO 仿真 benchmark(多相机、批量 rollout)
27+
├── simpler_env/ # SimplerEnv WidowX / Bridge 闭环 benchmark
2728
└── lerobot_so101/ # SO-101 真机同步闭环示例
2829
```
2930

@@ -33,13 +34,15 @@ eval/
3334
| 目录 | 场景 | 说明 |
3435
| ---------------------------------------------- | ---- | ------------------------------------------------------------------------------------------ |
3536
| `[libero/](libero/README_ZH.md)` | 仿真评测 | 面向 LIBERO benchmark,含 C++ policy rollout 与 LeRobot baseline 对比。[English](libero/README.md) |
37+
| `[simpler_env/](simpler_env/README_ZH.md)` | 仿真评测 | 在 SimplerEnv WidowX Bridge 任务上运行并比较 StarVLA Python 与 GGUF。[English](simpler_env/README.md) |
3638
| `[lerobot_so101/](lerobot_so101/README_ZH.md)` | 真机闭环 | SO-101 follower + 单相机的 observe → predict → act 同步控制。[English](lerobot_so101/README.md) |
3739

3840

3941
两类示例的组织方式略有不同:
4042

4143
- **SO-101** 走标准 `BasePlatform` + `RobotPolicy` + `SyncControlLoop` 路径,适合作为新增真机 platform 的模板。
4244
- **LIBERO**`eval/libero/policy/` 里实现了专用的 observation 适配(多相机、state 拼接、仿真 rollout),不继承 `BasePlatform`,适合作为新增 **仿真 benchmark** 的参考。
45+
- **SimplerEnv** 沿用专用 runner 结构,为 Python 和 C++ 实现相同的 WidowX action 变换、时序集成、normalization profile 与 Bridge 任务设置。
4346

4447
## 标准闭环数据流
4548

@@ -244,6 +247,7 @@ LIBERO 的 `[ModelServerPolicy](libero/policy/model_server.py)` 即为自定义
244247

245248
- [SO-101 真机使用说明](lerobot_so101/README_ZH.md)
246249
- [LIBERO 仿真评测说明](libero/README_ZH.md)
250+
- [SimplerEnv Bridge 仿真评测说明](simpler_env/README_ZH.md)
247251
- [robot_server 启动与协议](../robot_server/README_ZH.md)
248252
- [robot_client 与 policy](../robot_client/README.md)
249253
- [新增模型 runtime](../src/README_ZH.md)

eval/simpler_env/README.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# SimplerEnv WidowX Bridge Eval
2+
3+
This directory evaluates the robot.cpp StarVLA GGUF runtime on the SimplerEnv
4+
WidowX Bridge tasks.
5+
6+
## Protocol
7+
8+
- Four Bridge tasks with object episodes `0..23`
9+
- At most 120 steps per episode at 5 Hz
10+
- Visual-matching RGB overlay resized to 224x224 with OpenCV `INTER_AREA`
11+
- One action chunk per step with the official seven-prediction adaptive ensemble
12+
13+
A full run contains 96 rollouts. The result reports overall and per-task success
14+
rates; subset runs use `partial` coverage.
15+
16+
## Setup
17+
18+
Convert a checkpoint as described in the
19+
[StarVLA guide](../../tools/hf2gguf/starvla/README.md) and build the CUDA runtime.
20+
21+
The environment uses these revisions:
22+
23+
```text
24+
SimplerEnv: 06accaca93535902d408da4855f21cece12bceb7
25+
ManiSkill2_real2sim: ef7a4d4fdf4b69f2c2154db5b15b9ac8dfe10682
26+
```
27+
28+
```bash
29+
conda env create -f eval/simpler_env/environment.yaml
30+
conda activate robotcpp-simpler-env
31+
32+
git clone --recurse-submodules https://github.com/simpler-env/SimplerEnv \
33+
ckpts/simpler_env/source/SimplerEnv
34+
git -C ckpts/simpler_env/source/SimplerEnv checkout \
35+
06accaca93535902d408da4855f21cece12bceb7
36+
git -C ckpts/simpler_env/source/SimplerEnv submodule update --init --recursive
37+
38+
pip install -e ckpts/simpler_env/source/SimplerEnv/ManiSkill2_real2sim
39+
pip install -e ckpts/simpler_env/source/SimplerEnv
40+
```
41+
42+
Headless simulation requires a working Vulkan ICD. Run SimplerEnv's environment
43+
test first to confirm that SAPIEN can find a rendering device.
44+
45+
## Run
46+
47+
`VARIANT` accepts `oft`, `groot`, `pi_v3`, `qwen25_oft`, `qwen25_groot`,
48+
`qwen25_pi`, and `qwen25_fast`.
49+
50+
Run the full profile:
51+
52+
```bash
53+
CUDA_VISIBLE_DEVICES=0 \
54+
VARIANT=oft \
55+
OUTPUT=ckpts/starvla/results/oft/bridge.json \
56+
bash eval/simpler_env/scripts/run_model_server.sh
57+
```
58+
59+
Run one smoke episode:
60+
61+
```bash
62+
CUDA_VISIBLE_DEVICES=0 \
63+
VARIANT=groot TASK_IDS=0 EPISODE_IDS=0 \
64+
bash eval/simpler_env/scripts/run_model_server.sh
65+
```
66+
67+
The script reads three GGUF files from `ckpts/starvla/gguf/<variant>` and uses
68+
`build_cuda/bin/model-server` by default. Common overrides are `GGUF_DIR`,
69+
`SERVER_BIN`, `PYTHON`, `SIMPLER_ENV_ROOT`, `TASK_IDS`,
70+
`EPISODE_IDS`, `REPEATS`, and `OUTPUT`.
71+
72+
Each task/repeat starts a fresh model-server. Results include checkpoint
73+
identity, rollout records, success rates, and timing summaries.
74+
75+
## Latency
76+
77+
Benchmark the official PyTorch checkpoint directly:
78+
79+
```bash
80+
CUDA_VISIBLE_DEVICES=0 python -m eval.simpler_env.runners.latency_starvla \
81+
--variant oft --compile-model
82+
```
83+
84+
The runner selects the checkpoint, Qwen assets, and Bridge normalization from
85+
the StarVLA catalog. It reports policy, action unnormalization, and total
86+
latency after 5 warmup calls and 20 measured calls. Policy latency includes
87+
StarVLA's image/text preprocessing and model forward. Omit `--compile-model`
88+
for eager PyTorch. Compilation is lazy; the first FAST warmup can take several
89+
minutes and is not included in the reported measurements.
90+
91+
For the robot.cpp model-server path, use the common server benchmark:
92+
93+
```bash
94+
CUDA_VISIBLE_DEVICES=0 N_BATCH=2048 SKIP_BUILD=1 \
95+
GGUF_DIR="$PWD/ckpts/starvla/gguf/oft" \
96+
bash robot_server/test/test_server_latency.sh starvla linux-cuda starvla-bridge
97+
```

eval/simpler_env/README_ZH.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# SimplerEnv WidowX Bridge 评测
2+
3+
本目录使用 robot.cpp 的 StarVLA GGUF runtime 运行 SimplerEnv WidowX Bridge 任务。
4+
5+
## 评测设置
6+
7+
- 四个 Bridge 任务,每个任务包含 object episode `0..23`
8+
- 每个 episode 最多 120 步,控制频率 5 Hz
9+
- visual-matching RGB overlay 使用 OpenCV `INTER_AREA` 缩放到 224x224
10+
- 每步预测一个 action chunk,并对最近七次预测做自适应集成
11+
12+
完整评测包含 96 个 rollout。结果文件同时记录总体和各任务成功率;子集运行会标记为
13+
`partial` coverage。
14+
15+
## 安装
16+
17+
先按 [StarVLA 转换说明](../../tools/hf2gguf/starvla/README.md) 生成 GGUF,并完成 CUDA
18+
构建。
19+
20+
SimplerEnv 使用以下 revision:
21+
22+
```text
23+
SimplerEnv: 06accaca93535902d408da4855f21cece12bceb7
24+
ManiSkill2_real2sim: ef7a4d4fdf4b69f2c2154db5b15b9ac8dfe10682
25+
```
26+
27+
```bash
28+
conda env create -f eval/simpler_env/environment.yaml
29+
conda activate robotcpp-simpler-env
30+
31+
git clone --recurse-submodules https://github.com/simpler-env/SimplerEnv \
32+
ckpts/simpler_env/source/SimplerEnv
33+
git -C ckpts/simpler_env/source/SimplerEnv checkout \
34+
06accaca93535902d408da4855f21cece12bceb7
35+
git -C ckpts/simpler_env/source/SimplerEnv submodule update --init --recursive
36+
37+
pip install -e ckpts/simpler_env/source/SimplerEnv/ManiSkill2_real2sim
38+
pip install -e ckpts/simpler_env/source/SimplerEnv
39+
```
40+
41+
无头运行需要可用的 Vulkan ICD。请先运行 SimplerEnv 自带的环境测试,确认 SAPIEN 能找到
42+
渲染设备。
43+
44+
## 运行
45+
46+
`VARIANT` 支持:
47+
48+
```text
49+
oft groot pi_v3 qwen25_oft qwen25_groot qwen25_pi qwen25_fast
50+
```
51+
52+
完整运行:
53+
54+
```bash
55+
CUDA_VISIBLE_DEVICES=0 \
56+
VARIANT=oft \
57+
OUTPUT=ckpts/starvla/results/oft/bridge.json \
58+
bash eval/simpler_env/scripts/run_model_server.sh
59+
```
60+
61+
快速检查一个 episode:
62+
63+
```bash
64+
CUDA_VISIBLE_DEVICES=0 \
65+
VARIANT=groot TASK_IDS=0 EPISODE_IDS=0 \
66+
bash eval/simpler_env/scripts/run_model_server.sh
67+
```
68+
69+
脚本默认从 `ckpts/starvla/gguf/<variant>` 读取三个 GGUF,并使用
70+
`build_cuda/bin/model-server`。常用覆盖项包括 `GGUF_DIR``SERVER_BIN``PYTHON`
71+
`SIMPLER_ENV_ROOT``TASK_IDS``EPISODE_IDS``REPEATS``OUTPUT`
72+
73+
每个 task/repeat 会启动新的 model-server。结果包含 checkpoint 标识、rollout 明细、成功率
74+
和各阶段耗时。
75+
76+
## 延迟测试
77+
78+
直接测试官方 PyTorch checkpoint:
79+
80+
```bash
81+
CUDA_VISIBLE_DEVICES=0 python -m eval.simpler_env.runners.latency_starvla \
82+
--variant oft --compile-model
83+
```
84+
85+
runner 会根据 StarVLA catalog 选择 checkpoint、Qwen 资源和 Bridge 归一化配置。默认先预热
86+
5 次,再统计 20 次推理,并分别报告 policy、action 反归一化和总耗时。policy 耗时包含
87+
StarVLA 的图像/文本预处理和模型 forward。去掉 `--compile-model` 即可测试 eager
88+
PyTorch。`torch.compile` 为惰性编译;FAST 第一次预热可能需要几分钟,这部分不会计入
89+
最终统计。
90+
91+
robot.cpp model-server 使用统一的服务端测试脚本:
92+
93+
```bash
94+
CUDA_VISIBLE_DEVICES=0 N_BATCH=2048 SKIP_BUILD=1 \
95+
GGUF_DIR="$PWD/ckpts/starvla/gguf/oft" \
96+
bash robot_server/test/test_server_latency.sh starvla linux-cuda starvla-bridge
97+
```

eval/simpler_env/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""SimplerEnv evaluation integration."""

eval/simpler_env/environment.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: robotcpp-simpler-env
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python=3.10
6+
- pip
7+
- ffmpeg
8+
- pip:
9+
- numpy==1.24.4
10+
- scipy==1.11.4
11+
- opencv-python==4.11.0.86
12+
- opencv-python-headless==4.11.0.86
13+
- setuptools<81
14+
- transforms3d
15+
- matplotlib
16+
- mediapy
17+
- tyro
18+
- msgpack
19+
- websockets
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Policies used by the SimplerEnv runners."""

0 commit comments

Comments
 (0)