FALCON Deployment Guide
July 16, 2025 ยท View on GitHub
This folder provides seamless sim2sim/sim2real deployment scripts for both Unitree G1 (H1, H1-2) and Booster T1. The key idea is to simulate the real robot's state publisher and command receiver in Mujoco:
|
Table of Contents
Pre-Configuration
Here, we use config/g1/g1_29dof.yaml. Before testing sim2sim/sim2real, check the ROBOT_TYPE, SDK_TYPE, and INTERFACE in the .yaml file:
ROBOT_TYPE: 'g1_29dof' # Robot name, "t1_29dof", "g1_29dof"...
ROBOT_SCENE: "../humanoidverse/data/robots/g1/scene_29dof_freebase.xml" # Robot scene, for Sim2Sim
ASSET_ROOT: "../humanoidverse/data/robots/g1" # Robot Asset Root
DOMAIN_ID: 0 # Domain id
# IP Interface
# For sim2sim, 'lo' is for linux and 'lo0' is for mac.
# For sim2real, this needs to be specified according to your host ip, e.g., 'en0'
INTERFACE: "lo"
SDK_TYPE: "unitree" # SDK type, "unitree", "booster"
MOTOR_TYPE: "serial" # Motor type, "serial" or "parallel"
USE_JOYSTICK: 0 # Simulate Unitree WirelessController using a gamepad (0: disable, 1: enable)
JOYSTICK_TYPE: "xbox" # support "xbox" and "switch" gamepad layout; Unitree WirelessController is "xbox" layout.
Installation
Prebuild environment
- OS (Ubuntu 22.04 LTS)
- CPU (aarch64 and x86_64)
- Compiler (gcc version 11.4.0)
Create a conda env
conda create -n fcreal python=3.10
conda activate fcreal
Install Pinocchio for Inverse Kinematics
conda install pinocchio=3.2.0 -c conda-forge
Install unitree_sdk2_python for Unitree G1 deployment
git clone https://github.com/unitreerobotics/unitree_sdk2_python.git
cd unitree_sdk2_python
pip install -e .
Install booster_robotics_sdk for Booster T1 deployment
Note that the official booster_robotics_sdk does not provide state publisher and command receiver, so I improve the repo a bit and add them in my forked repo. Also booster sdk is NOT supported on Mac OS yet.
git clone https://github.com/hang0610/booster_robotics_sdk
# Install python package for building python binding locally
pip3 install pybind11
pip3 install pybind11-stubgen
# Build & Install
mkdir build
cd build
cmake .. -DBUILD_PYTHON_BINDING=on
make
sudo make install
Install others
cd sim2real
pip install -r requirements.txt
Deployment
Important
For sim2sim, you need to start Mujoco and then launch the policy, but for sim2real, you only need to launch the policy.
Make sure you read the keyboard and joystick control protocol in sim2real/rl_policy/base_policy.py.
All the deployment scripts are running under sim2real, so do cd sim2real first.
TEST with G1_29DoF Locomotion
G1 29DoF Locomotion
Here, we fix the upper body target joint angles to the default, and the policy only outputs the lower body action.
1. Start Mujoco Env (ONLY for Sim2Sim)
python sim_env/base_sim.py \
--config=config/g1/g1_29dof.yaml
2. Launch the Policy
python rl_policy/dec_loco/dec_loco.py \
--config=config/g1/g1_29dof.yaml \
--model_path=models/dec_loco/g1_29dof.onnx
https://github.com/user-attachments/assets/dc2d8821-6361-49a8-93cd-fb443bd63c39
Here are some keyboard shortcuts:
Keyboard Shortcuts in Mujoco
7: raise elastic band height8: lower elastic band height9: toggle elastic bandbackspace: reset simulation
Keyboard Shortcuts in Policy Terminal
]: start using policy actionso: stop using policy action and set actions to zero=: switch between standing and steppingw: increase linear velocity inxdirections: decrease linear velocity inxdirectiona: increase linear velocity inydirectiond: decrease linear velocity inydirectionq: decrease angular velocity inzdirectione: increase angular velocity inzdirectionz: set velocity to zero1: increase base height (if the policy allows)2: decrease base height (if the policy allows)5: decrease kp scale by 0.016: increase kp scale by 0.014: decrease kp scale by 0.17: increase kp scale by 0.10: reset kp scale to 1.0
G1 29DoF FALCON
1. Start Mujoco Env (ONLY for Sim2Sim)
python sim_env/loco_manip.py \
--config=config/g1/g1_29dof_falcon.yaml
2. Launch the Policy
python rl_policy/loco_manip/loco_manip.py \
--config=config/g1/g1_29dof_falcon.yaml \
--model_path=models/falcon/g1_29dof.onnx
https://github.com/user-attachments/assets/273b52c1-0248-40e5-b218-e078e74b322d
T1 29DoF FALCON
1. Start Mujoco Env (ONLY for Sim2Sim)
python sim_env/loco_manip.py \
--config=config/t1/t1_29dof_falcon.yaml
2. Luanch the Policy
python rl_policy/loco_manip/loco_manip.py \
--config=config/t1/t1_29dof_falcon.yaml \
--model_path=models/falcon/t1_29dof.onnx
https://github.com/user-attachments/assets/e35ff90e-428b-41ea-8cac-64d9906c78e8
Sim2Real Tips
Caution
FALCON is a strong policy trained for robust locomotion and manipulation. Before deploying to real robots, ensure:
Network Configuration
- Set correct
INTERFACEin config file (e.g., 'en0', 'eth0') - Verify network connectivity between computer and robot
- Check firewall settings if using specific ports
Testing Protocol
- Always do sim2sim before real-robot deployment
- Start with small kp, kd gains
- Ensure robot feet touch the ground before running falcon policies
Emergency Control
- Keyboard: Press 'o' to stop policy actions
- Joystick: Press 'B+Y' to stop policy actions
Real-time Inference
unitree_sdk2_pythoncan not guarantee real-time inference on Jetson Orin inside of Unitree G1 asunitree_sdk2_pythonis fully written in python, whilebooster_robotics_sdkworks fine as its backend is written in cpp with a pybinding wrapper.- It's recommended to use
unitree_sdk2for real-time onboard inference on Unitree G1. Please check this repo for the pybinding wrapper I wrote forunitree_sdk2.
I recommend you to use unitree_sdk2 for real-time inference onboard. I have written a pybinding wrapper for it. Please check this repo (currently no README for this pybinding wrapper, but will update soon).
Acknowledgement
We thank the following open-sourced repos that we build upon: