Skip to content

feat(robolab): integrate RoboLab as an RPent simulation environment - #329

Open
lizuojun04 wants to merge 3 commits into
RLinf:mainfrom
lizuojun04:feat/robolab-integration
Open

lizuojun04 wants to merge 3 commits into
RLinf:mainfrom
lizuojun04:feat/robolab-integration

Conversation

@lizuojun04

Copy link
Copy Markdown

Description

Register RoboLab as an RPent simulation environment so users can run DROID joint-position control tasks through --robot robolab, using the existing planners, observation and action tools, and RoboLab's native success evaluation.

Main Changes

  • Add robots/robolab/, reusing RPent's RobotSpec, Env/VLA RPC, process lifecycle, and run artifact interfaces, with CLI and Dashboard entry points.
  • Extend the shared Pi0.5 service with RoboLab observation encoding and a DROID policy configuration. Policy inputs are two 224×224 RGB images, eight joint/gripper state values, and the task instruction. Inference uses the upstream RLinf OpenPI implementation with 10 denoising steps and a 15-step prediction horizon.
  • Expose view_env_state, pi05_act, and execute_action. The planner can execute 1–15 actions from a prediction or send a single native eight-value action. Further actions are rejected after the environment terminates.
  • Record native success in states.json and result.json, preserving true, false, and null separately from the planner's finish status.
  • Add installation, single-task execution, and six-task evaluation scripts. Evaluation records package versions, source hashes, per-episode results, and summaries. It supports skipping completed episodes and retrying interrupted or erroneous runs while preserving earlier attempts.
  • Add English and Chinese installation, usage, evaluation, and troubleshooting documentation, with links from the READMEs.

Installation and Resources

  • .[robolab] installs policy dependencies. Isaac Sim 5.0 / Isaac Lab 2.2.0 and RoboLab use a separate simulator environment to avoid conflicts with planner dependencies.
  • script/install_robolab.sh installs a fixed RoboLab revision (b6cfcf6) outside the RPent repository and downloads its LFS assets. Virtual environments are created at the repository root.
  • On Ubuntu 22.04 x86_64, missing EGL, GLU, OpenGL, and Vulkan libraries can be installed inside the simulator environment without sudo or changes to the system NVIDIA driver.
  • Users supply model weights through --pi05-checkpoint, PI05_CHECKPOINT_PATH, or the evaluation script's --checkpoint argument. The installer does not download or convert checkpoints.
  • Runtime code does not depend on the developer's local data/, ref-repo/, or another project's checkout. Outputs default to logs/. Model weights, scene assets, virtual environments, and raw experiment artifacts are outside the submission scope.
  • Rendering and physics explicitly select a physical GPU, with multi-GPU rendering disabled. Isaac may still create small CUDA contexts on other GPUs.

The integration uses the upstream RLinf OpenPI policy. Codex database storage follows the user's configuration; RPent does not automatically override sqlite_home.

Testing

The following checks have been completed:

Check Result and Scope
Ruff 0.15.22 The 11 relevant Python files passed ruff check --preview and ruff format --check; files changed by the subsequent SQLite cleanup were checked again
Shell syntax and help RoboLab installation, graphics-library, single-task, and evaluation scripts passed syntax checks; the relevant help entry points worked
English and Chinese documentation Both sphinx-build -W --keep-going builds passed
Checkout without local assets In a temporary code copy without data/ or ref-repo/, CLI, simulator, and script help worked, as did an 18-episode dry run with an explicit external checkpoint path; omitting the checkpoint produced an argument error
Dependency consistency uv pip check passed for the local policy and simulator environments
Policy implementation consistency The seven relevant installed RLinf OpenPI files matched the hashes from the fixed upstream commit

Help and dry-run checks do not establish a complete installation on a fresh machine or real simulator execution. Under the local development constraints, no unit tests were added or run, and the repository-wide pre-commit command was not run. The relevant files were checked directly with the repository's pinned Ruff version. Full CI and regression coverage for other benchmarks remain unverified.

Manual Verification

Runtime Integration

A real integration check was completed on an NVIDIA A800 node:

Codex → RPent tools → Pi0.5 inference → RoboLab action execution → dual-camera observations and saved states → owned-process cleanup.

The bounded smoke run executed one action, changed the joint state, saved images and states, and exited both the environment and model processes. Native success remained null; this establishes integration behavior and is not counted as task success.

The subsequent single-GPU rendering configuration was also checked through real environment initialization and reset. GPU 3 was the active rendering device, and the previous additional rendering allocation of approximately 5 GiB on GPU 0 disappeared. Other GPUs still had CUDA contexts of approximately 200 MiB.

Six-Task Evaluation

Using the upstream RLinf OpenPI implementation, six tasks were evaluated serially with environment seeds 0, 1, and 2: 15 native successes out of 18 episodes, for an 83.33% success rate.

Setting Configuration
Simulator RoboLab b6cfcf6, Isaac Sim 5.0 / Isaac Lab 2.2.0
Hardware NVIDIA A800-SXM4-80GB; GPU argument set to 3
Planner Codex, gpt-6-astra, low reasoning, local login
Planner budget 400 turns and 3600 seconds per episode, excluding simulator startup
Checkpoint pi05_droid_jointpos_torch, a DROID joint-position PyTorch checkpoint
RLinf 0.4.0, commit 2348ece3df113874671478be1360ae3115b346e3
RPent OpenPI 0.2.2, commit a560f4dd8205b8423ecd4c8a0fabb5f54140b8a0
Torch / Codex CLI Torch 2.7.1+cu126 / openai-codex 0.163.0
Policy configuration pi05_droid_polaris, 10 denoising steps, a 15-step prediction horizon, two images
Randomness Fixed environment seeds; policy sampling randomness was not fixed
Task memory Empty local RPent memory for each episode

Numbers in parentheses are the simulation actions actually executed:

Task Seed 0 Seed 1 Seed 2 Success Rate
BananaInBowlTask Success (118) Success (346) Success (200) 3/3, 100%
BowlStackingLeftOnRightTask Success (271) Success (255) Failure (300) 2/3, 66.67%
BowlStackingRightOnLeftTask Success (211) Success (206) Success (204) 3/3, 100%
BananaThenRubiksCubeTask Success (276) Success (352) Success (309) 3/3, 100%
ReorientRedMugTask Success (692) Failure (900) Success (756) 2/3, 66.67%
StackYellowOnRedTask Success (563) Success (891) Failure (900) 2/3, 66.67%
Total 15/18, 83.33%

Result verification and observations:

  • All 18 episodes completed in one attempt with CLI exit code 0, no terminal agent error, no interruption, and no exhausted planner budget.
  • All three failures reached the native step limit: 300 steps for left-on-right bowl stacking seed 2, and 900 steps for red-mug reorientation seed 1 and yellow-on-red stacking seed 2.
  • Success was determined from RoboLab's native state and cross-checked against summaries, results, transcripts, and final states. All transcripts had finish: null; the statistics do not rely on the planner's completion claims.
  • The runs executed 7750 simulation actions, with 528 pi05_act calls and 11 execute_action calls. Right-on-left bowl stacking seeds 0/1 and yellow-on-red stacking seed 1 reached native success immediately after direct gripper-opening actions. No counterfactual experiment was performed to quantify the benefit of those interventions.
  • Total episode wall time was 11400.2 seconds, approximately 3 hours 10 minutes, including startup and cleanup.

Interpretation and Limits

These results evaluate RPent + Codex + Pi0.5 on the selected tasks. With only three episodes per task and a planner that adjusts action chunks and intervenes directly, they do not establish full RoboLab performance, standalone VLA performance, or superiority over the native JAX implementation. A complete normalized score is unavailable, so only native success rates and execution records are reported.

The 18 episodes preceded the GPU routing fix, deployment-path cleanup, and removal of the SQLite override. They used separate SQLite directories, and multi-GPU rendering had not yet been disabled. They therefore provide real evaluation evidence from integration development, rather than a complete rerun of the final submission. Validation of the subsequent changes is described above; the final version has not been reevaluated across all 18 episodes.

Detailed experiment records in mdnote/ include per-episode timing, source hashes, and aggregation rules. Raw images, logs, weights, and local data directories are not included in the PR.

Running the Evaluation

After obtaining a compatible external PyTorch checkpoint and completing the local Codex login, use the following commands to install the environments and preview evaluation. Select an available GPU and a fresh output directory:

bash script/install_robolab.sh

bash script/eval_robolab_subset.sh \
  --checkpoint /absolute/path/to/pi05_droid_jointpos_torch \
  --gpu 3 --model gpt-6-astra --reasoning-effort low \
  --max-turns 400 --planner-timeout-s 3600 \
  --output-dir ./logs/robolab-subset \
  --seeds 0 1 2 --dry-run

Remove --dry-run to start evaluation. The scripts do not automatically isolate Codex databases; configure Codex separately if multiple processes or machines share storage. Policy randomness and planner decisions are not fixed, so this command does not guarantee an exact replay of the recorded trajectories.

Checklist

  • The relevant code passes lint and format checks with the project's pinned Ruff version.
  • Related English and Chinese documentation has been updated.
  • Real integration verification and six-task evaluation results are provided with their scope stated.
  • Automated tests have been added or extended to cover the changes (no unit tests were added in this iteration).
  • All new and existing tests passed (the full suite was not run locally; CI confirmation is pending).

Copilot AI balanced review requested due to automatic review settings November 1, 2026 16:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@panhe1818
panhe1818 requested a review from wilburx813 November 5, 2026 07:30

.. code-block:: bash
bash script/install_robolab.sh

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is bash script/install_robolab.sh? And is better to align with other env, just add uv install command


.. code-block:: bash
export PI05_CHECKPOINT_PATH=/absolute/path/to/pi05_droid_jointpos_torch

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the ckpt is open-source, better to tell user where to get this ckpt, reference https://rpent.readthedocs.io/zh-cn/latest/rst_source/simulators/libero.html#vla


.. code-block:: bash
bash script/run_robolab.sh "$PI05_CHECKPOINT_PATH" BananaInBowlTask 0 ./logs/first-robolab

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, this script is not existed

~~~~~~~~

仿真进程从已安装的 ``robolab`` 包及其相邻的 ``assets/`` 读取资源,不读取
RPent 的 ``ref-repo/`` 或 ``data/``。另行设置 Pi0.5 检查点路径,路径可以在仓库外:

@wilburx813 wilburx813 Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why mentioned ref-repo/ and data/ here? Remove it would be better

任务记忆
--------

RoboLab 默认使用本地记忆目录。传入

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are there memory for robolab now?

return daemon, HttpRpcClient(f"http://{host}:{port}")


def _spawn_vla(args: argparse.Namespace, output_dir: Path):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please reuse the implementation of select_am / AMConfig.spawn_worker

and not args.vla_endpoint
and not (args.pi05_checkpoint or get_pi05_checkpoint_path())
):
raise ValueError("RoboLab Dashboard requires a Pi0.5 checkpoint")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's better to support use policy_backend = none in dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants