Read the robot: joints, IMU, battery, and temperature
Before you send any command, you need to know whether the robot is alive, upright, and cool. In this lesson you listen to the G1's state for a few seconds, measure the rate instead of memorizing it, and summarize tilt, torque, and temperature, saying "sem dado" when the simulator doesn't send a field.
for i in range(op.N):
tau[i] = max(tau[i], abs(s.motor_state[i].tau_est))
temp = max(temp, max(s.motor_state[i].temperature))
Example from the repository
simulador: G1 29 motores · DDS domínio 1 em lo · 10 s · suspenso: sim
amostras em 5 s: ≈ 1000 · taxa ≈ 200 Hz
taxa dentro de 150–250 Hz: sim
inclinação máx. do tronco: 6°
maior torque estimado: 0 N·m (sem comando: motores soltos)
temperatura máx. dos motores: sem dado (o simulador manda 0)
saída: 0
simulador: fim em t = 10.0 s · robô suspenso (pés fora do chão)
Robot suspended and with no command: torso almost upright, zero torque (motors loose) and temperature with no data.
If you print max(temperature) without thinking, you see "0" and conclude the motor is cold. In the simulator the field is not filled in. Kit rule: a missing value is "no data", never a number.
04 · Practice
Measure, don't memorize.
E1 · 5 s monitor
5 min
Run the block and write down the rate and the maximum tilt.
Done when:python3 kit/monitor.py --s 5; echo "saída: $?" → taxa dentro de 150–250 Hz: sim, temperatura máx. dos motores: sem dado (o simulador manda 0) and saída: 0.
E2 · Find the "no data" in the code
5 min
Open kit/monitor.py and find the line that swaps the zero for "sem dado". In one line, write what you would do on the real robot to get the number.
Done when:grep -c "sem dado (o simulador manda 0)" kit/monitor.py → 1, and your line cites the manufacturer's manual as the source of the threshold.
05 · Lesson quiz
The explanation appears after your answer.
Question 1 of 4
Where is the G1's battery in the SDK messages?skill
Correct
The unitree_hg LowState_ has no battery; power_v belongs to the Go2. The battery is BmsState_ (soc, soh, voltages), on its own topic.
Not this one
The unitree_hg LowState_ has no battery; power_v belongs to the Go2. The battery is BmsState_ (soc, soh, voltages), on its own topic.Review: What comes in a state message
Question 2 of 4
The monitor measured about 200 Hz in the simulator. What does that say about the real robot?
Correct
In the simulator the rate comes from the 5 ms step in config.py. The robot's rate is not in the SDK code; you measure it with the monitor or with ros2 topic hz.
Not this one
In the simulator the rate comes from the 5 ms step in config.py. The robot's rate is not in the SDK code; you measure it with the monitor or with ros2 topic hz.Review: Three things to watch when reading
Question 3 of 4
All motors show temperature = 0 in the simulator. What is the right reading?
Correct
Zero here means the data is absent. Treating absence as a value is the source of a lot of false alarms (or of no alarm at all).
Not this one
Zero here means the data is absent. Treating absence as a value is the source of a lot of false alarms (or of no alarm at all).Review: Listen for 5 seconds
Question 4 of 4
With the IMU quaternion, how do you get the torso tilt?
Correct
1 − 2(x² + y²) is the cosine of the angle between the torso's vertical axis and the world's vertical; the arccosine gives the degrees.
Not this one
1 − 2(x² + y²) is the cosine of the angle between the torso's vertical axis and the world's vertical; the arccosine gives the degrees.Review: Three things to watch when reading
Quiz complete
You got {a} of {n} right. Get them all right and the lesson is marked as completed.
Choose an option. The explanation appears after your attempt.
06 · In three sentences
Fieldsrt/lowstate carries the IMU and 35 motors; the battery is BmsState_.
Rate200 Hz in the simulator, measured; the real robot's rate is measured on the real robot.
Missing dataA field that is not filled in is "sem dado", never zero.