Overview
The Lite3 Motion SDK is a low-level UDP motion control library responsible for direct communication with Lite3 robot firmware, implementing the deployment of Model Predictive Control (MPC) algorithms on the Lite3. Developers can read onboard perception data (joint states, IMU, contact forces, etc.) and send control commands to 12 joints. The main workflow is as follows:

Feature Positioning
Section titled “Feature Positioning”The responsibilities of the Motion SDK include:
- Receiving joint states, IMU data, and contact force information reported by the robot via UDP
- Sending 12-joint control commands to the robot via UDP
- Managing control authority handover between the SDK and the robot
- Providing auxiliary tools such as timers and trajectory planning
Project Directory Structure
Section titled “Project Directory Structure”Lite3_MotionSDK/├── include/│ ├── common/│ │ ├── basesocket.hpp # Socket base class│ │ ├── command.h # Command protocol definitions│ │ ├── udpserver.hpp # UDP server (port binding, broadcast)│ │ └── udpsocket.hpp # UDP send/receive implementation│ ├── dr_timer.h # High-precision timer (timerfd + epoll)│ ├── motionexample.h # Stand-up example interface│ ├── receiver.h # Data receiver│ ├── robot_types.h # Robot data type definitions│ └── sender.h # Command sender├── src/│ └── motionexample.cpp # Stand-up example implementation├── lib/│ ├── eigen3/ # Eigen matrix library│ ├── libdeeprobotics_legged_sdk_aarch64.so # ARM pre-compiled library│ └── libdeeprobotics_legged_sdk_x86_64.so # x86 pre-compiled library├── main.cpp # Entry example├── CMakeLists.txt # Build configuration└── LICENSEControl Principles
Section titled “Control Principles”Joint Control Model
Section titled “Joint Control Model”The Motion SDK provides 5 control parameter interfaces at the low-speed end (joint end): , , , , .
When the SDK has commands to send, the low-level controller prioritizes the SDK control commands and distributes them to the 12 joints. The target joint torque is computed from the 5 control parameters as:
The driver converts the final target joint torque into the desired current and performs closed-loop control at 20kHz.
The control workflow is shown below:

Control Parameter Usage Examples
Section titled “Control Parameter Usage Examples”| Control Mode | Description | |||||
|---|---|---|---|---|---|---|
| Position control | 3.14 | 0 | 30 | 0 | 0 | Motor output shaft stabilizes at a fixed position |
| Velocity control | 0 | 5 | 0 | 1 | 0 | Motor rotates at target velocity |
| Damping control | 0 | 0 | 0 | 1 | 0 | Pure damping, no active torque |
| Torque control | 0 | 0 | 0 | 0 | 3 | Pure feedforward torque output |
| Zero-torque control | 0 | 0 | 0 | 0 | 0 | Joint swings freely |
| Mixed control | 3.14 | 0 | 30 | 1 | 1 | Position + damping + feedforward |
Timeout Protection
Section titled “Timeout Protection”When the SDK has no commands to send, after a 1-second timeout, the low-level controller reclaims control authority and enters damping protection mode for a period before clearing joint commands. Therefore, developers must ensure continuous command delivery or proactively return control authority.
Code Resources
Section titled “Code Resources”| Resource | Description |
|---|---|
| Lite3_MotionSDK | Motion SDK repository |