RoboJuDo has two environments for unitree robots:
UnitreeEnv: Based onunitree_sdk2py.- Support both
UnitreeH1andUnitreeG1. - May endure performance issues on
UnitreeG1due to limited computing power.
- Support both
UnitreeCppEnv: Based on UnitreeCpp- Support
UnitreeG1. - Can be deployed onboard
UnitreeG1pc2. It is much faster and stable.
- Support
Choose the above Env&SDK options you want to use.
- Follow the instuction to install the official SDK:
unitree_sdk2py - verify with
if any error, check installation of
python -c "from robojudo.environment import UnitreeEnv"unitree_sdk2py
As the setup of UnitreeCpp :
- Install the Unitree official C++ SDK:
unitree_sdk2Note: It is recommended to use the default installation path.
- and then install the
unitree_cpppackage: For simple setup,unitree_cppis included in RoboJuDo, just run:python submodule_install.py unitree_cpp
⭐ make sure
unitree_sdk2is installed first - verify with
if any error, check installation of
python -c "from robojudo.environment import UnitreeCppEnv"unitree_sdk2and thenunitree_cpp.
We provide two deployment options:
- Deploy the policy on the real robot.
- Deploy the policy on your workstation and control the robot via a wired Ethernet connection.
Run the policy directly on the robot.
- Clone our repository and setup the environment on the robot’s onboard computer: see Basic Setup.
- check 🛠️SDK Installation for Unitree SDK setup.
Since the G1 has limited computing resources, you need to run UnitreeCppEnv.
Usually, the robot's network interface is eth0 (for G1). You don't need to modify the config. If you find it doesn't work. see network configuration for help
Run the policy on your computer and control the robot via Ethernet.
Both UnitreeEnv and UnitreeCppEnv are supported.
After setup install, connect your robot via Ethernet, then check network configuration.
Refer to official guide to connect and find the robot's network interface.
Then edit config to update the env_type and net_if accordingly:
For example:
Option 1: Open g1_cfg.py and modify the g1_real config.
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=UnitreeEnvCfg.UnitreeCfg(
net_if="eth0", # note: change to your network interface
robot="g1",
msg_type="hg",
),
)Option 2: Go to g1_real_env_cfg.py and update the global config for g1.
class G1RealEnvCfg(G1EnvCfg, UnitreeEnvCfg):
env_type: str = UnitreeEnvCfg.model_fields["env_type"].default
# ====== ENV CONFIGURATION ======
unitree: UnitreeEnvCfg.UnitreeCfg = UnitreeEnvCfg.UnitreeCfg(
net_if="eth0", # EDIT HERE
robot="g1",
msg_type="hg",
)