Files
go1_pro_sdk/fast_lowcmd_cpp/README.md
2026-07-26 21:19:22 +08:00

1012 B

fast_lowcmd_cpp

Native CPython extension for the Go1 PRO LowCmd hot path.

It keeps the implementation separate from the main go1_pro_sdk package until the robot-side timing and byte-equivalence checks are stable.

Build

cd /root/go1_pro_sdk/fast_lowcmd_cpp
PYTHONPATH=/root/go1_pro_sdk python3 setup.py build_ext --inplace

On the Mac conda environment:

cd /Users/chenyouyuan/cyy_ws/go1_pro_sdk/fast_lowcmd_cpp
PYTHONPATH=/Users/chenyouyuan/cyy_ws/go1_pro_sdk conda run -n free_dog_sdk python setup.py build_ext --inplace

Test

PYTHONPATH=.:.. python3 -m pytest test_fast_lowcmd.py

Benchmark

PYTHONPATH=.:.. python3 benchmark_fast_lowcmd.py

API

from fast_lowcmd import FastLowCmdBuilder

builder = FastLowCmdBuilder()
packet = builder.build_encrypted_servo12(q, kp=28.0, kd=0.7)
damping_packet = builder.build_encrypted_damping()

The generated bytes are expected to match the Python SDK exactly for the tested packet forms.