G1Pilot is an open-source ROS2 package designed to provide full control of the Unitree G1 humanoid robot. It offers two flexible control modes:
Joint Controller – for precise low-level joint control
Cartesian Controller – for intuitive Cartesian-space manipulation
In addition to control capabilities, G1Pilot continuously publishes essential real-time robot states, including:
IMU data – for orientation and acceleration monitoring
Odometry – for accurate localization
Motor states – with temperature, voltage, position, and velocity feedback
With native RViz visualization support and a ready-to-use Docker environment, G1Pilot is ideal for teleoperation, robotics research, and motion analysis, enabling seamless interaction between ROS2 and the Unitree G1.
Joint Controller | Cartesian Controller |
---|---|
![]() |
![]() |
-
🎮 Dual Control Modes – Switch seamlessly between Joint and Cartesian controllers for maximum flexibility.
-
📡 Real-Time State Publishing – Continuously publishes essential robot data:
-
IMU orientation and acceleration
-
Odometry for localization
-
Detailed motor states (temperature, voltage, position, velocity)
-
-
🐳 Docker Ready – Quickly build and run the package using provided Docker scripts.
-
🔄 ROS2 Humble Support – Fully compatible with ROS2 Humble, ensuring smooth integration with modern robotics stacks.
-
🛠️ Open-Source & Extensible – Designed for researchers and developers to easily customize and extend functionality.
- For visualization, you need to install the g1pilot package in the same directory as this package.
- Be connected to the robot via WiFi or Ethernet. It's important to know which interface 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
G1Pilot provides multiple ROS2 nodes to control and monitor the Unitree G1 robot.
- 🎯 Purpose: Controls the right arm end-effector of the robot.
- 🔄 Behavior: Sends high-level Cartesian commands that are converted into joint movements via the Joint Controller.
- 🛠️ Use case: Ideal for precise end-effector manipulation in Cartesian space.
- 🎯 Purpose: Directly controls the robot’s individual joints.
- 🔄 Behavior: Receives low-level joint commands and sends them to the robot hardware for execution.
- 🛠️ Use case: Required for fine-grained motion control and as a backend for Cartesian control.
- 🎯 Purpose: Publishes a movable marker in RViz to interactively control the robot’s end-effector.
- 🛠️ Use case: Intuitive GUI control of the robot without manual command-line inputs.
- 🎯 Purpose: Publishes the complete state of the robot, including:
- IMU readings
- Odometry
- Detailed motor states (temperature, voltage, position, velocity)
- 🛠️ Use case: Used for monitoring and visualization in RViz or other tools.
- 🎯 Purpose: Enables whole-body control and locomotion, allowing the robot to move using Unitree’s built-in policy.
- 🛠️ Use case: Autonomous or manual locomotion commands for walking and navigation.
- 🎯 Purpose: Integrates a game controller (joystick) to manually control the robot.
- 🛠️ Use case: Remote teleoperation for research or demonstrations.
- L1 → Emergency Stop → The robot enters Damp Mode (safe state).
- ⬆️ D-Pad Up → Switches the robot to FSM 4, making it ready to receive commands.
- R1 → Activates Balance Mode.
- Left Joystick → Controls linear movements (forward, backward, sideways).
- Right Joystick → Controls angular rotation (turning).
Once you have the docker image running, you can run the following command to start the unitree node:
colcon build --symlink-install --packages-select g1pilot g1pilot
Then, source the workspace:
source install/setup.bash
To visualize the real robot in RViz, you can run the following command:
ros2 launch g1pilot robot_state_launcher.launch.py
To control the robot, using the joint controller or the cartesian controller, you can run the following command:
ros2 launch g1pilot controller_launcher.launch.py