SO-ARM Starter Policy Runner#
This script allows running policy models using DDS for communication, suitable for simulation robot control.
Supported Policies#
- GR00T N1.7: NVIDIA's foundation model for humanoid robots. Refer to NVIDIA Isaac GR00T for more information.
Run GR00T N1.7 Policy with DDS communication#
Prepare Model Weights and Dependencies#
Please refer to the Environment Setup to install GR00T N1.7 dependencies.
For acquiring model weights and further details, consult the official NVIDIA Isaac GR00T Installation Guide.
Ensure the environment where you run run_policy.py has the GR00T N1.7 dependencies installed.
Ensure the PYTHONPATH Is Set#
Please refer to the Environment Setup - Set environment variables before running the scripts instructions.
Run Policy#
The policy runner supports two inference modes: PyTorch and TensorRT.
PyTorch Inference#
python -m policy.run_policy --ckpt_path <path_to_your_checkpoint>
TensorRT Inference#
Requirements: TensorRT inference requires pre-built engines generated by the Isaac GR00T deployment pipeline.
- Build TensorRT engines using the unified
build_trt_pipeline.pyscript from Isaac GR00T:
cd <i4h_root>/third_party/Isaac-GR00T
python scripts/deployment/build_trt_pipeline.py \
--model-path <path_to_your_checkpoint> \
--dataset-path <path_to_your_dataset> \
--output-dir ./egines
- Run inference with TensorRT engines:
python -m policy.run_policy \
--ckpt_path <path_to_your_checkpoint> \
--trt_engine_path <path_to_tensorrt_engine_directory> \
--trt_mode n17_full_pipeline
Command Line Arguments#
Here's a markdown table describing the command-line arguments:
| Argument | Description | Default Value |
|---|---|---|
--ckpt_path |
Checkpoint path for the policy model. | checkpoints/so-arm/checkpoint-30000 |
--task_description |
Task description text prompt for the policy. | Grip the scissors and put it into the tray |
--chunk_length |
Length of the action chunk inferred by the policy per inference step. | 16 |
--embodiment_tag |
The embodiment tag for the model (used for GR00T N1.7). | new_embodiment |
--trt_engine_path |
Path to directory containing TRT engine files. If set, uses TensorRT inference. | None |
--trt_mode |
TRT acceleration scope. | n17_full_pipeline |
--rti_license_file |
Path to the RTI license file. | Uses env RTI_LICENSE_FILE |
--domain_id |
Domain ID for DDS communication. | 0 |
--height |
Input image height for cameras. | 480 |
--width |
Input image width for cameras. | 640 |
--topic_in_room_camera |
Topic name to consume room camera RGB data. | topic_room_camera_data_rgb |
--topic_in_wrist_camera |
Topic name to consume wrist camera RGB data. | topic_wrist_camera_data_rgb |
--topic_in_soarm_pos |
Topic name to consume SOARM101 position data. | topic_soarm_info |
--topic_out |
Topic name to publish generated SOARM101 actions. | topic_soarm_ctrl |
--verbose |
Whether to print DDS communication logs. | False |
Performance Metrics#
Benchmark#
The benchmark script measures end-to-end inference latency in both PyTorch and TensorRT modes using the same GR00TN1_7_PolicyRunner used for real deployment.
- Runtime (PyTorch)
python -m policy.gr00tn1_7.benchmark \
--ckpt_path <path_to_checkpoint> \
--inference_mode pytorch
- Runtime (TensorRT)
python -m policy.gr00tn1_7.benchmark \
--ckpt_path <path_to_checkpoint> \
--inference_mode tensorrt \
--trt_engine_path <path_to_engine_dir> \
--trt_mode n17_full_pipeline
- Accuracy (compare PyTorch vs TensorRT)
python -m policy.gr00tn1_7.benchmark \
--ckpt_path <path_to_checkpoint> \
--inference_mode compare \
--trt_engine_path <path_to_engine_dir> \
--trt_mode n17_full_pipeline
Performance Results#
| Hardware | Inference Mode | Average Latency | Actions Predicted |
|---|---|---|---|
| NVIDIA RTX 5880 Ada | PyTorch | 65.05 ± 0.57 ms | 16 |
| NVIDIA RTX 5880 Ada | TensorRT | 33.69 ± 0.44 ms | 16 |