ROS2 Package to control the Unitree G1 robot. This package provides different ways to control the robot.
Joint Controller | Cartesian Controller |
---|---|
![]() |
![]() |
- For visualization, you need to install the g1_description package in the same directory as this package.
- Be connected to the robot via WiFi or Ethernet. It's important to know which interdace you are using.
We prepare a docker image to build the package. You can use the following command to build the package, go the docker
folder and run the following command:
sh build.sh
Then, you can run the docker image with the following command:
sh run.sh
Once you have the docker image running, you can run the following command to start the unitree node:
colcon build --symlink-install --packages-select inria_unitree g1_description
Then, source the workspace:
source install/setup.bash
To visualize the real robot in RViz, you can run the following command:
ros2 run inria_unitree ros_bridge --ros-args -p interface:=<your_interface>
To control the robot, using the joint controller, you can run the following command:
ros2 run inria_unitree joint_controller --ros-args -p interface:=<your_interface>
To control the robot, using the cartesian controller, you can run the following command:
ros2 run inria_unitree cartesian_controller --ros-args -p interface:=<your_interface>
ros2 run inria_unitree interactive_marker
1.- Damp → joints relaxed so you can align the feet.
2.- Stand-up (FSM 4) → robot’s internal routine extends legs part-way.
3.- Increment SetStandHeight in small steps until mode flips 2 → 0.
This is the height at which the robot will stand.
4.- BalanceStand(0) (or SetBalanceMode(0)).
This engages the balance mode, allowing the robot to adjust its posture.
5.- Re-send the final SetStandHeight now that balance is engaged.
6.- Optionally enable continuous gait (SetBalanceMode(1)) and finally Start (FSM 200) to walk.