MODULE 1 · LESSON 3 OF 6 · 35 MIN
What Asimov does
23 joint targets, the motor controller that turns them into torque, and why you cannot balance by hand.
The policy’s output is 23 numbers, one per motor. This lesson follows them from the policy to the joints, then hands them to you.
SIMULATOR
Asimov 1 simulated with MuJoCo and driven by a trained policy, on your own computer.
Downloads 31 MB once: the physics engine, the policy runtime and the robot model.
Upright · 0.00 s
Push the pelvis for 0.15 s
Directions are relative to where the robot faces. You can also double-click the robot, or drag a body part to pull it.
An action is a target, not a force
Each of the 23 numbers is an action. cyclotron does not send it to the motor as a force. It turns it into a target angle for one joint:
| Symbol | Meaning | Unit | Asimov’s left knee, standing still (measured) |
|---|---|---|---|
| the target angle for joint : where its motor should turn it | rad | 0.409 | |
| joint ’s angle in the default pose, a slight crouch | rad | 0.450 | |
| the action scale: how far one unit of action moves the target. 0.25 for every joint in the built-in policy; in cyclotron’s walking task 0.25 except ankle roll, 0.08 | rad | 0.25 | |
| the policy’s action for joint , usually between about −1 and 1 | – | −0.166 | |
| which joint, one of the 23 | – | left knee |
The policy aims the knee 0.04 rad straighter than its default pose.
An action of 0 means “hold the default pose”; an action of 1 moves that joint’s target 0.25 rad, about 14°, away from it. cyclotron’s walking task also clips the ankle-roll target to ±0.09 rad.
Asking for angles rather than forces keeps the policy’s job manageable. Small mistakes in an angle produce small mistakes in the pose. Small mistakes in a force, on a 32 kg robot, accelerate it the wrong way until something else stops it.
The motor controller
Something still has to turn a target angle into a torque. That is a PD controller, one per joint, each with its own two gains. In the simulators it runs on every physics step, 200 times a second, and computes:
| Symbol | Meaning | Unit | Asimov’s left knee, standing still (measured) |
|---|---|---|---|
| the torque the motor applies to joint , before it is capped at the motor’s limit | N·m | −7.1 (limit ±45) | |
| the stiffness: torque per radian between target and joint. It pulls the joint towards its target like a spring | N·m/rad | 150 | |
| the joint’s target angle, from the policy | rad | 0.409 | |
| where the joint is, from its encoder | rad | 0.456 | |
| the damping: torque per rad/s of speed. It resists motion like a shock absorber, so the joint does not overshoot | N·m·s/rad | 5 | |
| how fast the joint moves | rad/s | 0.00 |
The target is a little straighter than the knee, so the motor pushes to straighten the leg: that is the torque that holds Asimov up.
The P stands for proportional, the stiffness term; the D for derivative, the damping term, which acts on the joint’s speed, the derivative of its angle.
| Motor group | Stiffness (N·m/rad) | Damping (N·m·s/rad) | Torque limit (N·m) |
|---|---|---|---|
| Hip pitch, hip roll | 150 | 5 | 45 |
| Hip yaw | 150 | 5 | 28 |
| Knee | 150 | 5 | 45 |
| Ankle pitch | 224.42 | 10.201 | 72 |
| Ankle roll | 35.20 | 1.600 | 18 |
| Waist | 65 | 5 | 40 |
| Shoulder pitch / roll / yaw | 57 / 86 / 96 | 5 | 30 / 25 / 20 |
| Elbow, wrist | 40 | 2 | 12 |
The ankles look odd because each ankle is driven by two motors through a linkage; the numbers here are what the two motors add up to at the joint. Module 2 opens that up.
Where the controller lives on Asimov
On the real robot the policy does not drive the motors directly either. Asimov’s 25 motors are chained along each limb on CAN buses, a wiring standard common in cars and robots, and are run by the robot’s motion-control computer, a Radxa CM5 on its motion control board. A program that drives Asimov, such as a trained policy, sends every joint’s target angle, and can send that joint’s gains and with it; without them the robot uses its own gain table. Menlo’s documentation calls this mode “direct PD control of joints”: one PD law per joint, each with its own gains, not one controller for the whole body. It does not say how often the PD law itself runs, or whether it is evaluated on the control board or inside each motor.
One joint at a time
Try the formula on one joint. Turn on Explore this joint, or just use any control in the panel: Asimov hangs in the air, in the 3D view, and every other joint holds its default pose. Move the target: the green needle is the joint, the orange dot its target, and the orange arc between them the error the stiffness pulls on. The formula fills in with the numbers the controller used, and the plot shows the joint following its target. Turn it off and Asimov is back on its feet, under the policy.
Exercise 3.1 · On paper
From target to torque
- The knee’s target is 0.2 rad ahead of where the knee is, and the knee is already moving towards it at 1 rad/s. What torque does the knee motor apply?
- The hip pitch target is 0.4 rad away from the hip and the hip is still. What torque does it apply?
Hint 1
Hint 2
Checkpoint: answers only
Solution
- N·m, below the knee’s limit of 45 N·m.
- N·m, but the hip pitch motor is capped at 45 N·m, so it applies 45 N·m. A target far from the joint does not make the joint move faster than the motor allows.
Exercise 3.2 · In the simulator
Stiffness and damping by feel
In One joint’s controller, pick the left knee and turn on Explore this joint.
- With the trained gains, press Jump the target by 0.3 rad and watch the plot. How does the knee get to its new target?
- Set the damping to 0 and jump again. What changes?
- Put back, set the stiffness to 20 and move the target. Where does the knee settle compared with its target, and why?
Hint 1
Hint 2
Checkpoint: answers only
Solution
- The jump creates a 0.3 rad error, so the stiffness asks for a large torque at once; as the knee speeds up, the damping term grows and brakes it, and it arrives without swinging past.
- With no damping nothing brakes the knee. It reaches the target still moving, overshoots, and the stiffness pulls it back: it oscillates until friction in the joint wears the swing down.
- Gravity pulls the lower leg with a roughly constant torque. The controller only pushes back in proportion to the error, so the knee settles where error equals that pull. With instead of 150 the same pull needs an error 7.5 times larger. This is why a stiff controller holds its pose better, and also why lesson 2’s policy aimed the loaded knee a little past where it was.
The whole loop
Every block of the loop from lesson 1 now has a name. Here it is in full. Press Next stage to pause Asimov and walk through one turn, stage by stage, for the joint you pick, with the numbers the simulator actually used. After the last stage, the next press runs the following turn, 20 ms later.
Be the policy
The panel below switches the policy off and gives you its job: one slider per joint target, sent 50 times a second through the same controller. Turn on Control the joints myself.
With all sliders at the default pose, nothing moves the targets, and the PD controllers simply hold the default pose. Asimov stands. In the measured run, holding the default pose this way stood for 20 s without falling, with the pelvis at 0.608 m.
So standing still is easy, as long as nothing happens. Now push it, at the pelvis, for 0.15 s. Holding the default pose fell at 75 N forward; it stood at 50 N. The built-in policy, which reacts to what it senses 50 times a second, did not fall up to 400 N forward and fell at 250 N backward; Push goes up to 400 N.
Exercise 3.3 · In the simulator
Catch a push by hand
Turn on Control the joints myself with all sliders at the default pose. Push the robot forward with 75 N. Then reset, push again, and this time try to keep it standing by moving the leg sliders while it tips.
Hint 1
Hint 2
Checkpoint: answers only
Solution
A push tips Asimov over in a fraction of a second. Catching it takes coordinated changes to several joints at once, hips, knees and ankles on both legs, chosen from how fast and which way the robot is tipping, and adjusted every 20 ms as the robot moves. You can move one slider at a time, a few times a second, while looking at a picture. The policy reads 78 numbers and sets all 23 targets 50 times a second.
That is why the policy is learned. Nobody can write down, joint by joint, what to do for every way the robot can be pushed. Reinforcement learning finds it by trying.
Optional Why the hold in the air?
Hold the pelvis in the air welds the pelvis to the world, so the legs hang free. It is a good way to see what a single target does: move the knee slider and watch the knee, and the torque, without the robot falling.
Recap
- An action is a joint target: .
- A PD controller per joint turns each target into torque, , capped at the motor’s limit. On Asimov it runs on the robot’s motion-control side, with the gains sent alongside each target.
- The loop: sense, decide, set targets once every 20 ms; control and physics every 5 ms.
- Holding the default pose stands, but only until something pushes it.
- Recovering from a push takes coordinated, fast changes to many joints at once: that is the policy’s job.
Sources
- cyclotron, the action: 23 joint position targets, scale 0.25, offset from the default posesource/cyclotron/cyclotron/tasks/locomotion/velocity_env_cfg.py, lines 165–177 (commit d71390f)
- cyclotron, Asimov 1's motor groups: stiffness, damping, torque limits, delaysource/cyclotron/cyclotron/assets/robots/asimov_1.py, lines 21–23 and 53–164
- The built-in policy's training settings: scale 0.25 on every joint, no clipsite/learn-sim/policies/menlo-reference/env.yaml, actions.joint_pos
- Menlo Research, Asimov 1 electrical system tour: the Radxa CM5 on the motion control board runs locomotion and actuator control; actuators are daisy-chained on CAN buses
- Menlo Research, Asimov 1 robot control: MOVE/TRAJECTORY is “direct PD control of joints”; each setpoint is applied as an instantaneous PD target
- menlo-sdk: setpoints carry optional kp and kd; without them Asimov Edge applies its own per-joint gain tabledocs/REFERENCE.md, “trajectory() and set_joints()” (menlo-sdk commit 7683801)
- This simulator's controller: PD on every 5 ms physics step with the policy's trained gains, torque capped at the model's actuator rangesite/src/sim/core/main.js, the substep loop (from humanoid-policy-viewer)
- Asimov 1's mass: the simulator's model weighs the robot at 32 kgrobots/asimov-1/sim-model/xmls/asimov_1.xml, total body mass
- Measurement: holding the default pose with no policy, and the pushes it takesmeasurements.json, results.manualDefaultPose and results.manualPush (scripts/measure-module-1.mjs)
- Measurement: the pushes the built-in policy takes when standingmeasurements.json, results.policyPush