Go1 Unitree Legged SDK Manual
Go1 Unitree Legged SDK Manual
md 2021/12/4
unitree_legged_sdk manual
2021.12.4
1 / 10
unitree_legged_sdk manual.md 2021/12/4
2 / 10
unitree_legged_sdk manual.md 2021/12/4
1. Introduction
The unitree_legged_sdk is mainly used for communication between PC (with Linux system) and Controller
board.
notics: support robot: Go1, not support robot: Laikago, Aliengo, A1. (Check release v3.2 for support)
There are four steps that use this software development kit (SDK) to control robot.
Communication
Dependencies
Build
Run
1.1.1 Communication
If you‘re using the PC(Raspberry in the red box below) on Go1, you can skip this section, but this is not
recommended.
Use own PC(with Ubuntu system) USB port to connect Go1's Ethernet port.
3 / 10
unitree_legged_sdk manual.md 2021/12/4
USB to Ethernet
User PC Go1
if you can recive message like "64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=xxx ms", you are
connected.
Use own PC(with Ubuntu system) Ethernet port to connect Go1's Ethernet port.
4 / 10
unitree_legged_sdk manual.md 2021/12/4
Ethernet cable
Go1 User PC
if you can recive message like "64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=xxx ms", you are
connected.
1.1.2 Dependencies
1.1.3 Build
Open the terminal in the unitree_legged_sdk folder and execute following command.
5 / 10
unitree_legged_sdk manual.md 2021/12/4
mkdir build
cd build
cmake ../
make
1.1.4 Run
Open the terminal to run the binary file in the "build/bin" folder.
Before running the low-level examples, please switch Go1's control mode to Basic mode using wireless
handle.
Connect two computers with a network cable (or USB to Ethernet hub), and set the PC's Ethernet IP address as
below.
Then open the terminal on different PC to run the binary file in the "build/bin" folder.
6 / 10
unitree_legged_sdk manual.md 2021/12/4
# UDP Client
sudo ./udp_send_test
# UDP Server
sudo ./udp_recv_test
Connect two computers with a network cable (or USB to Ethernet hub), and set the PC's Ethernet IP address as
below.
Then open the terminal and run the binary file in the "build/bin" folder.
The files in "include/unitree_legged_sdk/" defines constant, variable, class, API functions, etc.
include/unitree_legged_sdk/ description
7 / 10
unitree_legged_sdk manual.md 2021/12/4
include/unitree_legged_sdk/ description
a1_const.h aliengo_const.h
Defines the limits of the robot's 12 joint motors
go1_const.h
quadruped.h Defines robot type, control level type, leg nunber and joint number
Defines LCM class, user can send command and receive robot states data
lcm.h
on one PC through LCM object
Defines LoopFunc class, users can generate different threads for different
loop.h
objects through LoopFunc object
A "build/bin/" folder will be added to the file system after "1.1.3 Build" section, which contains executables
files generated by examples in the "example/" folder.
2. Header file
More detailed about some of the "unitree_legged_sdk" header files.
2.1 comm.h
This file is a part of Unitree robots software development kits(unitree_legged_sdk), defines common class,
such as LowState, LowCmd, HighState and HighCmd class, to store user command or robot sates data.
2.2 udp.h
This file is a part of Unitree robots software development kits(unitree_legged_sdk), defines UDP class, user can
communication between PC and Controller board through UDP object, it also can be used in other PCs. refer
to Section 3.3.1 for detailed usage
2.3 lcm.h
Defines LCM class, user can send command and receive robot states data on one PC through LCM object,
refer to Section 3.3.2 for detailed usage
3. Examples
3.1 Low-level control examples of robot
9 / 10
unitree_legged_sdk manual.md 2021/12/4
lcm_server.cpp
10 / 10