User guide / Scene (physics) /

Motions and training

The Motions tab

  • Control scripts: the scene's scripts, each with a button to run it with physics and stop it. The agent writes them from a description of what the robot should do.
  • Firmware: codebases that drive a robot of the scene, each with a button to run the chip in the emulator with physics. Listed only when the scene has one, described under Firmware below.
  • Trainings: each trained motion with its stage, score and the time its newest model was trained, and two buttons: play the target motion without physics, and play the trained policy under physics. Details under a trained policy shows its model. "Different assembly" means it was trained for another robot than the one in the scene.
The Motions tab of an H1 scene: under Control scripts, Wave with a play button; under Trainings, walk, requested from the prompt "walk forward a few steps", with the From video button above it
The Motions tab of an H1 scene: under Control scripts, Wave with a play button; under Trainings, walk, requested from the prompt "walk forward a few steps", with the From video button above it

A motion from a prompt or a video

Ask the agent for a motion ("make it run", "a boxing combo"), and it generates a reference motion, maps it onto the robot, and trains a policy that performs it under physics.

To start from a real movement, click From video in the Trainings section and pick the file. Use a video of one person, full body in frame, steady camera, 5 to 20 seconds. The motion is lifted from the video and the training starts from it.

An H1 boxing policy, trained from a shadow boxing video, playing in the scene

Training runs on a GPU server and takes a while; the agent watches it and tells you when a model is ready.

The Training tab

Training curves for the project's trainings: Reward, Pose err, Resets and Episode s, for the latest run or all of them.

Training curves of a walker: the mean rollout episode length reaches the ten second horizon, the pose error falls after the best exam, and the dips are the resume and a collapse the run recovered from on its own
Training curves of a walker: the mean rollout episode length reaches the ten second horizon, the pose error falls after the best exam, and the dips are the resume and a collapse the run recovered from on its own

The prompt to policy article explains the whole pipeline.

Model details

Details under a trained policy slides the Motions tab over to the policy's model; ← Trainings slides back. The picker at the top switches between the policy's trained models, and Model file downloads the file a board runs. A model trained with the full observation has no board file, and a note says so.

The model details of the qa onboard sway policy in the Motions tab: the model picker on the onboard model, the Model file button, the model facts and the network layers
The model details of the qa onboard sway policy in the Motions tab: the model picker on the onboard model, the Model file button, the model facts and the network layers

Each section has a ? icon next to its title that explains it:

SectionShows
Model factsWhat the model reads each step, how many joints it drives, its control rate, where in the clip it starts, the joints played straight from the clip, and the size of its weights
Network layersOne bar per layer, from the inputs to one output per joint, with the weights between layers as stripes
Joint freedomHow far the policy may move each joint away from the reference motion, in degrees
Reference motionThe clip the policy follows, one line per joint over one cycle
Board fitFor each board, whether the model fits its flash and memory, and the estimated time of one step against the control period

Firmware

A codebase can drive a robot of the scene in place of a control script or a policy. The agent attaches it with a mapping script between the chip's pins and buses and the robot's joints and sensors; see Firmware. The play button in the Firmware row runs the latest successful build in the browser emulator. While it runs, the row shows how fast the chip runs against real time and how often each servo pin and I2C address is driven. Open firmware opens the codebase.

The H1 scene running its ESP32 firmware: the Firmware row shows the chip's speed against real time and the output rates, with Open firmware under it
The H1 scene running its ESP32 firmware: the Firmware row shows the chip's speed against real time and the output rates, with Open firmware under it

When the firmware runs a trained policy, the scene writes the policy's model file into the chip's flash before boot, the same file a real board gets.