Hardware
What |
How many |
Interface |
|---|---|---|
Leg motors |
12 |
CAN (buses 0-1) |
IMU |
1 |
I2C bus 8 |
The arms, torso, hands, and head are defined but not enabled yet.
Motors
30 DOF total, but only the legs (12 motors) are enabled right now.
Part |
Motors |
CAN Bus |
|---|---|---|
Left Leg |
6 |
0 |
Right Leg |
6 |
1 |
Left Arm |
6 |
2 (disabled) |
Right Arm |
6 |
3 (disabled) |
Torso |
2 |
4 (disabled) |
Hands + Head |
4 |
5 (disabled) |
Left Leg (CAN Bus 0)
ID |
Name |
CAN ID |
Joint |
Min |
Max |
Max Torque |
|---|---|---|---|---|---|---|
0 |
|
|
Hip flexion/extension |
-120° |
+57° |
120 Nm |
1 |
|
|
Hip abduction/adduction |
-45° |
+45° |
90 Nm |
2 |
|
|
Hip rotation |
-45° |
+45° |
60 Nm |
3 |
|
|
Knee flexion/extension |
0° |
+86° |
70 Nm |
4 |
|
|
Ankle dorsi/plantarflexion |
-70° |
+70° |
30 Nm |
5 |
|
|
Ankle inversion/eversion |
-70° |
+70° |
30 Nm |
Right Leg (CAN Bus 1)
ID |
Name |
CAN ID |
Joint |
Min |
Max |
Max Torque |
|---|---|---|---|---|---|---|
6 |
|
|
Hip flexion/extension |
-57° |
+120° |
120 Nm |
7 |
|
|
Hip abduction/adduction |
-45° |
+45° |
90 Nm |
8 |
|
|
Hip rotation |
-45° |
+45° |
60 Nm |
9 |
|
|
Knee flexion/extension |
-86° |
0° |
70 Nm |
10 |
|
|
Ankle dorsi/plantarflexion |
-70° |
+70° |
30 Nm |
11 |
|
|
Ankle inversion/eversion |
-70° |
+70° |
30 Nm |
Note: Left and right leg angles are mirrored. Left knee extends positive, right knee extends negative.
Control Gains
The RL policy uses these PD gains:
Joint Type |
Kp (N·m/rad) |
Kd (N·m·s/rad) |
|---|---|---|
Hip Pitch |
257.4 |
5.0 |
Hip Roll |
394.8 |
5.0 |
Hip Yaw |
135.4 |
5.0 |
Knee |
130.3 |
5.0 |
Ankle Pitch |
93.2 |
5.0 |
Ankle Roll |
93.2 |
5.0 |
Action Scaling
Policy outputs get scaled before becoming motor commands:
Joint |
Offset (rad) |
Scale |
|---|---|---|
Hip Pitch |
0.0 |
0.140 |
Hip Roll |
0.0 |
0.068 |
Hip Yaw |
0.0 |
0.133 |
Knee |
0.0 |
0.173 |
Ankle Pitch |
0.0 |
0.116 |
Ankle Roll |
0.0 |
0.116 |
CAN Buses
6 CAN buses, but only 0 and 1 are enabled (legs).
Bus |
Thread |
CPU |
Motors |
Status |
|---|---|---|---|---|
CAN0 |
|
6 |
Left leg (0-5) |
Enabled |
CAN1 |
|
5 |
Right leg (6-11) |
Enabled |
CAN2 |
|
5 |
Left arm (12-17) |
Disabled |
CAN3 |
|
5 |
Right arm (18-23) |
Disabled |
CAN4 |
|
6 |
Torso (24-25) |
Disabled |
CAN5 |
|
6 |
Hands + Head (26-29) |
Disabled |
Protocol
500 kbps, standard SocketCAN.
Command Frame (Host → Motor)
Byte |
Field |
Type |
Description |
|---|---|---|---|
0-3 |
|
float |
Target position (rad) |
4-7 |
|
float |
Target velocity (rad/s) |
8-11 |
|
float |
Feedforward torque (Nm) |
12-13 |
|
uint16 |
Position gain (scaled) |
14-15 |
|
uint16 |
Velocity gain (scaled) |
Feedback Frame (Motor → Host)
Byte |
Field |
Type |
Description |
|---|---|---|---|
0-3 |
|
float |
Measured position (rad) |
4-7 |
|
float |
Measured velocity (rad/s) |
8-11 |
|
float |
Phase current (A) |
12-13 |
|
int16 |
Motor temp (0.1°C units) |
14-15 |
|
uint16 |
Motor error flags |
Update Rates
Bus |
Rate |
|---|---|
CAN0-1 |
200 Hz |
CAN2-5 |
250 Hz (disabled) |
IMU
BNO085 on I2C bus 8. Runs at 500 Hz with built-in 9-DOF sensor fusion.
Thing |
Value |
|---|---|
Sensor |
BNO085 |
Bus |
|
Address |
0x4A |
Rate |
500 Hz |
Protocol |
SHTP via official CEVA SH2 library |
What It Outputs
Field |
Type |
Unit |
Description |
|---|---|---|---|
|
float |
- |
Orientation quaternion [w,x,y,z] |
|
float |
rad/s |
Angular velocity in body frame |
|
float |
m/s² |
Linear acceleration (gravity removed) |
|
float |
- |
Normalized gravity vector pointing DOWN (0,0,-1 when upright) |
Calibration
BNO085 handles calibration internally using Dynamic Calibration Data (DCD). No manual calibration required.
Error Recovery
The driver automatically recovers from I2C errors and sensor resets:
I2C failure → HAL sends soft reset, sensor reinitializes
SH2_RESET event → Driver re-enables all configured sensors
Coordinate Frames
All frames follow ROS REP-103: X forward, Y left, Z up (right-handed).
Body Frame
Z (up)
│
│ X (forward)
│ /
│ /
│ /
└──────── Y (left)
Top-down view:
X (forward)
▲
│
┌─────┼─────┐
│ │ │
Y ◄───┼─────●─────┼ (robot facing up)
│ │
│ L R │
└───┼───┼───┘
│ │
legs
IMU → Body Frame
The IMU is mounted so its axes align with the body frame.
IMU Output |
Body Frame |
Description |
|---|---|---|
|
ωx |
Roll rate (rotation about X) |
|
ωy |
Pitch rate (rotation about Y) |
|
ωz |
Yaw rate (rotation about Z) |
|
gx |
Gravity X component |
|
gy |
Gravity Y component |
|
gz |
Gravity Z component |
Joint Sign Conventions
Hip Pitch: + = leg forward - = leg backward
Hip Roll: + = leg outward + = leg outward
Hip Yaw: + = toe outward + = toe outward
Knee: + = extend - = extend ← MIRRORED!
Ankle Pitch: + = toe up + = toe up
Ankle Roll: + = sole outward + = sole outward
Left/Right Mirroring
The legs are mirrored about the sagittal plane:
Joint |
Left Leg (+) |
Right Leg (+) |
|---|---|---|
Hip Pitch |
Leg forward |
Leg forward |
Hip Roll |
Leg outward (left) |
Leg outward (right) |
Hip Yaw |
Toe points left |
Toe points right |
Knee |
Extend (straighten) |
Flex (bend) |
Ankle Pitch |
Toe up |
Toe up |
Ankle Roll |
Sole faces left |
Sole faces right |
Key point: Knee signs are opposite! Left knee extends positive, right knee extends negative.
For symmetric standing: L_Knee = -R_Knee
Source Files
File |
What it does |
|---|---|
|
Motor IDs, limits, gains |
|
CAN bus interface |
|
BNO085 driver |
|
500 Hz IMU thread |