This repository provides a deployment framework for humanoid robots, supporting the use of different policies across different environments (real robots and simulation).
We decouple the controller, environment, and policy, making it easy for users to add their own policies or environments.
Experiment configurations can be organized through config files.
The main modules of ATARICtrl consist of:
- 🎮 Controller: A collection of control signals. It receives external inputs (e.g., joystick, keyboard, motion sequences) and forwards them as
ctrl_datato the pipeline. - 🤖 Environment: The execution environment (e.g., Mujoco, real robot). It processes actions provided by the policy and sends real-time sensor data as
env_datato the pipeline. - 🌐 Policy: A trained control policy (from various wbc & locomotion works). It generates actions based on information from both the environment and the controller.
Currently, ATARICtrl supports the following policy–environment combinations:
| Policy | Unitree G1 | Ref | Doc |
|---|---|---|---|
| Unitree Official | 🖥️ 🤖 | unitree_rl_gym | UnitreePolicy |
| Unitree Wo Gait | 🖥️ 🤖 | unitree_rl_lab | UnitreeWoGaitPolicy |
| Smooth | 🖥️ 🤖 | Smooth | |
| BeyondMimic | 🖥️ 🤖 | whole_body_tracking | BeyondmimicPolicy |
| BeyondMimicObject | 🖥️ 🤖 | whole_body_tracking | BeyondMimicObjectPolicy |
🖥️ means policy is ready for simulation, while 🤖 means policy has been tested on real robot.
ATARICtrl supports Ubuntu/Linux platforms, officially tested on Ubuntu.
Robot onboard PCs running Linux are also supported.
Step 1: Clone the repository and create a Python environment
git clone https://github.com/Atarilab/ATARICtrl.git
cd ATARICtrl/
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | shStep 2: Create a virtual environment and install AtariCtrl
# Create virtual environment with Python 3.11
uv venv --python 3.11
source .venv/bin/activate
# Optional, install cpu version for speed up
uv pip install torch --index-url https://download.pytorch.org/whl/cpu
# Install AtariCtrl
uv pip install -e .ATARICtrl is a plug-and-play framework. After a minimal default installation, you can selectively configure and install only the modules you need.
Step 0: [Optional] Install Robot SDK
You can skip this for sim2sim and development.
If you plan to control a real robot, install the corresponding SDK.
For example, see unitree_setup.md for Unitree robots.
Step 1: Configure modules
Edit submodule_cfg.yaml to select modules, by setting install as true.
As default,
mujoco_vieweris selected for sim2sim.
Step 2: Install modules
# Install all required modules
uv run python submodule_install.py
# Or specify modules to install with args
# uv run python submodule_install.py unitree_cppATARICtrl is a modular framework where tasks can be flexibly defined by composing configuration files.
In the following, we use the deployment on G1 as an example.
Begin your journey with unitree g1 sim2sim.
A Xbox controller is needed for control.
# run the default g1 sim2sim cfg
uv run python scripts/run_pipeline.pyYou can control the motivation using any Xbox controller:
left axesmove forward/backward/lfet/rightright axesturn left/right
Before deployment, you'd better first purchase accident insurance to cover any potential incidents that may occur during real-world operation. Policies could cause
⚠️ violent motions⚠️ when losing balance. Always verify that the emergency stop button (e.g., A for default config) works properly.
Unless you have strong sim-to-real expertise and rigorous safety measures, DO NOT run these models on real robots. They are provided for research only, and we disclaim any responsibility for harm, loss, or malfunction.
Follow our setup guide to set up the robot sdk on your computer or robot.
Open g1_cfg.py and modify the g1_real config.
Edit the env_type and net_if according to your robot sdk setup.
class g1_real(g1):
env: G1RealEnvCfg = G1RealEnvCfg(
env_type="UnitreeEnv", # For unitree_sdk2py
# env_type="UnitreeCppEnv", # For unitree_cpp, check README for more details
unitree=G1UnitreeCfg(
net_if="eth0", # note: change to your network interface
),
)Refer to official guide to prepare and start the robot.
Then start the pipeline on the real robot:
uv run python scripts/run_pipeline.py -c g1_realYour robot should move into default pos. During the preparation, put your robot on the ground.
You can control the real robot using the Unitree controller:
Abutton: Emergency stop. The robot immediately switches to damping mode. Be careful.left axesmove forward/backward/let/rightright axesturn left/right
ATARICtrl supports Vicon motion capture system for precise robot/objects localization. When Vicon is streaming from the Vicon PC, you can listen to it using the Vicon ZMQ client:
./packages/vicon_zmq_publisher/build/vicon_zmq_client --hostname <host-ip-addr>Replace <host-ip-addr> with the IP address of the Vicon PC.
To use Vicon Odometry in your configuration, set odometry_type="VICON" and configure vicon_cfg in your environment config. See g1_real_vicon for an example configuration.
💡Now you’re familiar with ATARICtrl’s config design, it’s time to experience the amazing variety of policies!
Try the out of box experience of BeyondMimic:
uv run python scripts/run_pipeline.py -c g1_beyondmimiccheck documentation BeyondmimicPolicy for more details.
g1_switch config in g1_cfg.py is equipped with Multi-Policy Pipeline.
uv run python scripts/run_pipeline.py -c g1_switchXbox Controller:
left axesmove forward/backward/left/right
right axes(left/right)turn left/right
Switch between different policies using the controller.
For deploying Motion Mimic Policies with Locomotion as backup, we built LocoMimicPipeline for multi-policy switching with interpolation,
Check g1_locomimic config in g1_cfg.py, and more fancy locomimic configs in g1_loco_mimic_cfg.py.
uv run python scripts/run_pipeline.py -c g1_locomimic_beyondmimicKeyboard control:
[to switch to MotionMimic]to switch to LocoMotion;toggle next mimic policy'toggle prev mimic policy
We also provide config files for other policies, check config_g1 for more details.
- RoboJudo: Framework
- Unitree SDK2 Python: used for implementing
UnitreeEnv. - PHC: used for implementing the
MotionCtrlmodule for OmniH2O. - UnitreeCpp: our pybind of
unitree_sdk2used inUnitreeCppEnv. - ZED Proxy: ZED Camera Odometry Service.
