

Write your own controller for a Unitree robot with SDK2
Quad, Hard
unitree_sdk2 is Unitree's C++ SDK for its current robots, with examples for high-level motion and low-level joint control.
Build the SDK on Ubuntu (x86_64 or aarch64), run the examples over Ethernet to your robot, and script sport-mode moves or read the IMU and joints. A Python wrapper (unitree_sdk2_python) also exists.
Hardware & cost: A Unitree Go2, B2, G1 or H1. Ubuntu 20.04+ with CMake and GCC.
Difficulty: Hard. Always test low-level control with the robot hung or lying down.
Agent install prompt (paste into Claude Code, Cursor or Codex): "Clone https://github.com/unitreerobotics/unitree_sdk2, install CMake/GCC per the README, build it, and walk me through running a high-level sport-mode example over my robot's network interface."
Source: unitreerobotics/unitree_sdk2 on GitHub — https://github.com/unitreerobotics/unitree_sdk2 (facts checked against the project README, Oct 2026; prices vary by region).
Quick answers
- What do you need to write your own controller for a Unitree robot with SDK2?
- A Unitree Go2, B2, G1 or H1. Ubuntu 20.04+ with CMake and GCC.
- How hard is it to write your own controller for a Unitree robot with SDK2?
- Hard. Always test low-level control with the robot hung or lying down.
How your agent drives it
Copied from the unitreerobotics/unitree_sdk2 README
- Shell
$ mkdir build cd build cmake .. make
Any coding agent that can run a shell can run these. Read the README before you run anything on a robot that moves.
Ideas to try with it
Our ideas, not the builder's claims.
- Write a tiny C++ program that makes the Go2 sit when you clap
- Build a follow-me mode on top of the high-level motion examples
- Log joint torques during a walk and plot them
1 more ideaShow fewer
- Wrap one SDK call as a tool your agent can trigger
- Last commit
- 2026-10-30
- Builder
- unitreerobotics
- Repo
- unitreerobotics/unitree_sdk2, 1,431 stars
- Built with
- Unitree Go2, Unitree G1
Unitree, 2 builds: Train a walking policy for Unitree Go2, H1 or G1 in sim · Write your own controller for a Unitree robot with SDK2
Parts notes for this device are in the Hermes Workshop catalog.
What to build next
Builds that share a board, robot or agent with this one.
Train a walking policy for Unitree Go2, H1 or G1 in simAlso built on Unitree
Try NVIDIA Isaac GR00T, an open humanoid foundation modelAlso built on Unitree
Program a robot cat or dog with Petoi OpenCatAnother robot dog
Build a 3D-printed Spot Micro with ROS and SLAMAnother robot dog
Build Stanford Pupper v3, a ~$1,000 RL-walking quadrupedAnother robot dog
Run ROS 2 Humble and Nav2 on a Mini PupperAnother robot dog