MODULE 1 · LESSON 2 OF 6 · 30 MIN

What Asimov senses

The 78 numbers the policy reads every step, the noise added to them in training, and what the robot cannot measure at all.

Every 20 ms the policy receives a list of 78 numbers and nothing else. No camera, no map, no memory of earlier steps unless those numbers carry it. This lesson opens that list.

Once the simulator is running, the What Asimov senses panel shows the 78 values the policy received on its last step, in the order it received them. Push the robot, or drag a body part, and watch them change.

SIMULATOR

Asimov 1 simulated with MuJoCo and driven by a trained policy, on your own computer.

Upright · 0.00 s

What Asimov senses

The 78 numbers the policy receives this step, in the order it receives them. Push or drag the robot and watch them change.

Waiting for the first step…

The six groups

Values What they are Scale Comes from
3 Angular velocity of the pelvis: how fast it rolls, pitches and turns × 0.25 The IMU’s gyroscope
3 Gravity direction in the pelvis’s own frame × 1 The IMU
3 The command: forward speed, sideways speed, turn rate × 1 The operator
23 Joint angles: where each joint is, relative to the default pose × 1 Joint encoders
23 Joint speeds × 0.1 Joint encoders
23 Previous actions: where the policy aimed each joint one step ago × 1 The policy itself

That is 3 + 3 + 3 + 23 + 23 + 23 = 78. The IMU, an inertial measurement unit, is a small sensor in the pelvis with a gyroscope and an accelerometer.

Two details matter later. First, the joints do not come in the order the policy outputs them. Asimov’s motors are chained together along each limb, and the observation reads them in three groups by their place on those chains: the joints nearest the body first (hip pitch and roll, waist, shoulder pitch and roll: 9 joints), then the next ones out (hip yaw, knee, shoulder yaw, elbow: 8), then the ends (ankles and wrists: 6). The panel labels each value with its joint. Second, the command is part of what the policy senses. For a standing policy all three command values stay at zero.

After 3 s of standing still under the built-in policy, the gravity direction read (−0.060, −0.003, −0.998): the pelvis was tilted about 3.6° from upright. Every joint was within 0.029 rad of the default pose except the two shoulder rolls, which rest against their stops (lesson 6 explains why).

Angles and previous actions

Two of the groups are easy to mix up. Joint angles say where each joint is, relative to the default pose: 0 means the joint is where it starts. Previous actions say where the policy aimed each joint one step earlier, in its own units: an action of 1 aims the joint 0.25 rad from the default pose (lesson 3).

Standing still, the two are not the same. A motor only pushes when its aim differs from where its joint is, and holding a crouched leg up against its weight takes a push. So the policy aims every loaded joint a little past where it sits:

default poseangle +0.006aim −0.042
Asimov’s left knee, standing still (measured, rad from the default pose). Needle: where the joint is, from joint angles. Dot: where the policy aimed it, from previous actions: −0.166 × 0.25 rad. The motor pushes across the gap with 7.1 N·m, and that holds the leg up.

Why the scales?

A neural network learns best when its inputs are of similar size, roughly between −1 and 1. Joint velocities can reach several radians per second, so cyclotron multiplies them by 0.1; the pelvis’s angular velocity is multiplied by 0.25. Joint angles are already small once they are measured from the default pose.

Exercise 2.1 · On paper

Scale the inputs

A knee swings at 5 rad/s while the pelvis pitches at 2 rad/s. What values does the policy receive for each?

Hint 1
Joint velocities are multiplied by 0.1, the pelvis’s angular velocity by 0.25.
Checkpoint: answers only
0.5 for the knee and 0.5 for the pelvis pitch rate.
Solution

5 rad/s × 0.1 = 0.5 and 2 rad/s × 0.25 = 0.5. Two very different physical quantities arrive in the same range, so neither drowns the other out.

Noise and delay in training

A real IMU and real encoders are noisy, and their readings arrive a little late. Training prepares the policy for that. In cyclotron’s velocity task every observation gets random noise on every step: up to ±0.01 on angular velocity, ±0.02 on gravity, ±0.01 rad on joint angles and ±0.5 rad/s on joint speeds (before scaling). The angular velocity may also arrive up to 1 step late, and the gravity direction up to 2 steps late.

In this module you train in an ideal simulator first, without noise and without delay. Module 2 shows what that costs.

What Asimov cannot sense

Read the table again and notice what is missing. The robot does not measure:

  • its own speed over the ground. There is no sensor for it; the IMU’s accelerometer drifts if you try to integrate it.
  • whether a foot touches the floor. Asimov’s feet have no contact sensors.
  • the floor itself: how slippery it is, or whether there is a step ahead.

The policy has to infer these from what it does sense, if it needs them at all. A walking policy, for example, has to tell from joint velocities and tilt alone whether it is moving as commanded.

What the policy sees, and what decides what happens next

Picture two moments that give the policy exactly the same 78 numbers. In the first, Asimov stands still. In the second, it stands in exactly the same pose but slides slowly forward on a polished floor, because someone nudged it a moment ago. Joint angles, joint speeds, tilt and turning rates all read the same: nothing among the 78 numbers measures sliding. Yet what happens next differs. The still robot can stay put; the sliding one needs to step.

Reinforcement learning names the two things apart:

ot≠st
SymbolMeaningUnitOn Asimov
otthe observation at step t: the 78 numbers78 numbersturning rates, gravity direction, command, joints, previous action
stthe state at step t: everything, measured or not, that decides what happens next–also the pelvis’s speed over the ground, which foot touches the floor, how slippery the floor is

An observation that holds everything needed to predict the next step has the Markov property: once you know the present, the past adds nothing. Asimov’s does not. From the 78 numbers alone you cannot tell the still robot from the sliding one; you would have to remember how it got there.

That is one more reason the previous action is an input. The policy cannot measure how fast it slides, but it knows what it asked the motors to do a step ago, and it sees how the joints actually moved. The gap between the two says something about forces it cannot see. Some policies go further and read the last few observations as well, a short memory of how they got here.

Exercise 2.2 · In the simulator

What changes when you push

Let the robot stand still, then open Push in the corner of the 3D view and push it forward at 150 N. Which of the six groups change, and which one never does?

Hint 1
Watch the gravity direction and the angular velocity first: they react within a step.
Hint 2
One group comes from the operator, not from the robot.
Checkpoint: answers only
All groups change except the command, which stays at (0, 0, 0).
Solution

The push tilts the pelvis, so the gravity direction and the angular velocity change at once. The policy answers by moving the legs, so joint angles, joint speeds and, one step later, the previous actions change too. The command does not change: nobody asked the robot to move. Everything the policy does about the push, it does because of what it senses, not because it was told.

Optional What the critic sees

During training a second network, the critic, helps the learner judge how good a situation is. The critic is only used in training, never on the robot, so it may see things the robot cannot measure. In cyclotron’s velocity task it receives 93 values: the same groups as the policy, without noise and with joint velocities unscaled, plus the pelvis’s linear velocity (3), each foot’s height (2), how long each foot has been in the air (2), whether each foot touches the ground (2) and the contact forces on the feet (6). Module 3 explains what the critic does with them.

Recap

  • The policy senses 78 numbers: pelvis angular velocity, gravity direction, command, joint angles, joint speeds and its previous action.
  • Inputs are scaled so they are of similar size; training adds noise and delay to prepare for a real robot.
  • The robot cannot sense its own speed, foot contact or the floor.
  • The previous action is the policy’s own last output; standing still it is not zero, because holding a pose against gravity needs targets a little past the joints.
  • The observation is not the full state: the 78 numbers cannot tell a still robot from a sliding one.

Sources

  1. cyclotron, velocity task: the policy's observation terms, scales, noise and lagssource/cyclotron/cyclotron/tasks/locomotion/velocity_env_cfg.py, lines 185–239 (commit d71390f)
  2. cyclotron, velocity task: the critic's observation termssource/cyclotron/cyclotron/tasks/locomotion/velocity_env_cfg.py, lines 242–280
  3. Asimov 1's IMU in the pelvis: site imu_in_pelvis with a gyro and an accelerometerrobots/asimov-1/sim-model/xmls/asimov_1.xml, lines 95 and 309–311
  4. cyclotron, velocity task: the three joint groups (slots) the observation reads joints insource/cyclotron/cyclotron/tasks/locomotion/velocity_env_cfg.py, lines 54–70
  5. Menlo Research, Asimov 1 electrical system tour: the actuators are daisy-chained on CAN buses, each leg hip pitch → hip roll → hip yaw → knee → ankle
  6. The built-in policy's action scale (0.25) and the knee's stiffness (150 N·m/rad)site/learn-sim/policies/menlo-reference/env.yaml, actions.joint_pos.scale and the knee actuator
  7. Raw actions are not clipped, in training or in this simulator, unless an export records a clipcyclotron's rsl_rl_ppo_cfg.py sets no clip_actions and Isaac Lab's default is None (isaaclab_rl/rsl_rl/rl_cfg.py, line 274); this simulator passes on the clip an export records (raw_action_clip), and none otherwise (site/src/sim/simulator.ts, runRecipe)
  8. The browser simulator's observation recipesite/learn-sim/policy-recipe.json in the denebots repository
  9. Measurement: the 78 values after 3 s at rest under the built-in policymeasurements.json, results.restObservation (scripts/measure-module-1.mjs)
  10. R. S. Sutton and A. G. Barto, Reinforcement Learning: An Introduction, 2nd edition, MIT Press, 2018Section 3.5: the Markov property; Chapter 17.3: observations and state