Protocol
The robot talks protobuf over UDP. You send commands, it sends back telemetry.
Message |
Direction |
Port |
Rate |
|---|---|---|---|
RobotCommand |
You → Robot |
8888 |
Send at ≥10 Hz |
RobotState |
Robot → You |
(any) |
100 Hz |
Generate Python bindings:
protoc --python_out=. proto/asimov_command.proto
Files
proto/asimov_command.proto- The protobuf definitionsproto/asimov_command.pb.c- Generated C code (nanopb)
RobotCommand
Send this to port 8888 to control the robot.
Control Mode
Field |
What to put |
|---|---|
|
Which mode you want (see table below) |
Velocity Commands
Only matter when mode = MOVE.
Field |
Range |
Direction |
|---|---|---|
|
-0.5 to 1.0 m/s |
+ forward |
|
-0.3 to 0.3 m/s |
+ left |
|
-1.0 to 1.0 rad/s |
+ counter-clockwise |
Control Flags
Field |
What it does |
|---|---|
|
Must be |
|
Set |
|
Your timestamp (for latency tracking) |
Control Modes
Value |
Name |
What happens |
|---|---|---|
0 |
|
Motors go soft, safe default |
1 |
|
Stands up over 2 seconds |
2 |
|
Balances in place |
3 |
|
Walks using vx, vy, vyaw |
4 |
|
Plays back recorded motion |
Deadman Switch
You must send commands at least every 100ms. If the robot doesn’t hear from you, it assumes something’s wrong and disables the motors. This is intentional.
Typical Sequence
Send
enable=true, mode=DAMP- motors on but softSend
mode=STAND- robot stands up (~2 seconds)Send
mode=START- robot balances in placeSend
mode=MOVE, vx=0.3- robot walks forwardSend
mode=DAMP- robot goes soft, sits down
stateDiagram-v2
[*] --> DAMP : power on
DAMP --> STAND : stand
STAND --> START : start
START --> MOVE : move
MOVE --> DAMP : damp / e-stop
START --> DAMP : damp / e-stop
STAND --> DAMP : damp / e-stop
RobotState (Telemetry)
The robot sends this back to you at 100 Hz.
Timing
Field |
What it is |
|---|---|
|
Robot’s clock (microseconds since boot) |
|
Packet counter (use to detect drops) |
Robot State
Field |
What it means |
|---|---|
|
What mode the robot is in (0-4) |
|
Are motors powered? |
|
Is E-stop active? |
Joint Data
12 motors, indexed 0-11.
Field |
Unit |
What it is |
|---|---|---|
|
rad |
Joint angles |
|
rad/s |
Joint velocities |
|
A |
Motor current |
|
°C |
Motor temperature (watch for >80°C) |
IMU
Field |
Unit |
What it is |
|---|---|---|
|
rad/s |
Angular velocity [x, y, z] in body frame |
|
- |
Which way is down (normalized) |
Power
Field |
What it means |
|---|---|
|
Pack voltage (40-54V normal) |
|
State of charge |
|
Bitmask of problems (see below) |
Error Flags
Bit |
What’s wrong |
|---|---|
0 |
CAN communication lost |
1 |
Motor too hot (>80°C) |
2 |
Overcurrent |
3 |
IMU communication lost |
4 |
Battery low (<42V) |
5 |
Battery critical (<40V) |
6 |
E-stop active |
7 |
Policy took too long |