MODULE 1 · BUILD · 120 MIN

Build: a standing policy

Turn the lessons into a training task in cyclotron, train it, look at it, and export it for the Test.

You now know every block of the loop. This page puts them together as a training task in cyclotron and trains it. The task is called Asimov1-Stand-Ideal-v0: standing still, in an ideal simulator. Flat ground, no pushes, no sensor noise, no motor delay and no randomised physics. Module 2 adds all of those back.

Every command on this page was run while writing it, on the machine listed under Sources. Where a number comes from that run, the page says so.

Where you start: Asimov without a policy

Before training anything, see what the policy has to add. Once the simulator is running, try the three choices in Without a policy. Each one puts Asimov back on its feet first.

SIMULATOR

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

Upright · 0.00 s

Without a policy

Each choice puts Asimov back on its feet first.

  • Motors off: every joint goes limp. Asimov's pelvis drops below 0.35 m 0.56 s after it is stood up.
  • Hold the default pose: every motor holds the default crouch. Asimov stands, but a push of 75 N at the pelvis topples it: the motors resist like springs, but nothing changes the pose to catch the fall.
  • The built-in policy: Menlo’s walking policy took every forward push up to 400 N in the same test.

A policy is what turns 23 motors into a robot that keeps its balance. The one you build on this page learns to stand; Module 2 teaches it to take a push.

The code

This page starts from cyclotron as Menlo Research publishes it, at commit 27df328 on main. The finished task, exactly as this page writes it, is on the branch course/module-1 of the course’s copy of cyclotron, at commit d71390f. Write it yourself first. If you get stuck, read the finished file from the branch:

git remote add denebots https://github.com/Dene33/cyclotron.git
git fetch denebots course/module-1
git show denebots/course/module-1:source/cyclotron/cyclotron/tasks/stand/stand_env_cfg.py

Or switch to the whole branch with git switch -c course-module-1 denebots/course/module-1.

What you need

  • cyclotron installed, with its Python environment active (Module 0). Run every command from the cyclotron folder.
  • An NVIDIA GPU, your own or a rented one. Cohort participants can use the course’s cloud GPU.

The plan

A task in cyclotron is five small pieces. You will write all five, in a new folder, by changing the walking task rather than starting from nothing:

Piece What it says File
Environment config What the robot senses, does and is scored on tasks/stand/stand_env_cfg.py
Play variant The same, set up for watching instead of training same file
Runner config How PPO trains it tasks/stand/agents/rsl_rl_ppo_cfg.py
Gym registration The task’s names tasks/stand/__init__.py
Experiment entry Lets export find the task from a checkpoint hub.py

All paths are under source/cyclotron/cyclotron/. cyclotron finds the new folder by itself: every package under tasks/ is imported at start-up.

1. The environment config

Create tasks/stand/stand_env_cfg.py. It starts from the walking task, Asimov1VelocityEnvCfg, and takes out what a standing policy in an ideal simulator does not need. The five sections follow the lessons.

"""Standing in an ideal simulator: Module 1 of the RL crash course."""

from isaaclab.utils import configclass

from cyclotron.tasks.locomotion.velocity_env_cfg import Asimov1VelocityEnvCfg


@configclass
class Asimov1StandIdealEnvCfg(Asimov1VelocityEnvCfg):
    def __post_init__(self):
        super().__post_init__()

        # 1. The robot: flat ground, motors without delay.
        self.scene.terrain.terrain_type = "plane"
        self.scene.terrain.terrain_generator = None
        for actuator in self.scene.robot.actuators.values():
            actuator.min_delay = 0
            actuator.max_delay = 0

        # 2. What it senses: the same 78 values as the walking policy, so the
        # result runs in the browser, but without sensor noise or lag.
        self.observations.policy.enable_corruption = False
        self.observations.policy.base_ang_vel.params["max_lag"] = 0
        self.observations.policy.projected_gravity.params["max_lag"] = 0

        # 3. What it is asked to do: always stand still.
        self.commands.twist.ranges.lin_vel_x = (0.0, 0.0)
        self.commands.twist.ranges.lin_vel_y = (0.0, 0.0)
        self.commands.twist.ranges.ang_vel_z = (0.0, 0.0)
        self.commands.twist.rel_standing_envs = 1.0
        self.commands.twist.heading_command = False

        # 4. The reward: drop the terms that only score walking.
        self.rewards.air_time = None
        self.rewards.foot_clearance = None
        self.rewards.foot_swing_height = None
        self.rewards.heading_drift = None

        # 5. No pushes and no randomised physics. The starting pose and joint
        # offsets stay random: doing nothing already stands, so the policy
        # must start from poses that need balancing.
        self.events.push_robot = None
        self.events.foot_friction = None
        self.events.qpos0_rand = None
        self.events.base_com = None
        self.events.pd_gains_rand = None

Each change maps to a lesson:

  1. The robot (lesson 3). Flat ground instead of the walking task’s cobblestones, and motor delay set to zero.
  2. What it senses (lesson 2). The same 78 inputs, in the same order, so the policy can run in the browser on the Test page. Only the noise and the observation lag are switched off.
  3. The command (lesson 2). Always zero: “stand still”.
  4. The reward (lesson 4). The walking task’s 20 terms minus the 4 that only score walking (foot air time, foot clearance, swing height and heading drift), leaving 16.
  5. Episodes and starts (lesson 6). The 70° fall and the 20 s timeout stay as they are, inherited. So do the random starting poses and joint offsets: lesson 3 showed that holding the default pose already stands, so the policy has to start from poses that need balancing. Everything Module 2 is about is switched off: pushes, random foot friction, random default pose, random centre of mass and random motor gains.

Make every change in __post_init__, after super().__post_init__(). That is where the walking task’s settings already exist and can be edited one by one.

Below the first class, add the play variant: 16 robots, endless episodes and perfect starting poses, so you watch the policy and not the random starts.

@configclass
class Asimov1StandIdealEnvCfg_PLAY(Asimov1StandIdealEnvCfg):
    def __post_init__(self):
        super().__post_init__()
        self.scene.num_envs = 16
        self.episode_length_s = int(1e9)
        self.events.reset_robot_joints.params["position_range"] = (0.0, 0.0)
        self.events.reset_robot_joints.params["velocity_range"] = (0.0, 0.0)
        self.events.reset_base.params["pose_range"] = {k: (0.0, 0.0) for k in self.events.reset_base.params["pose_range"]}
        self.events.reset_base.params["velocity_range"] = {k: (0.0, 0.0) for k in self.events.reset_base.params["velocity_range"]}

2. The runner config

Create tasks/stand/agents/rsl_rl_ppo_cfg.py, and an empty tasks/stand/agents/__init__.py next to it. The runner inherits the walking task’s PPO settings, including the network and 24 steps per robot per iteration; the number of robots, 4,096, comes from the environment config. It changes three things.

from isaaclab.utils import configclass

from cyclotron.tasks.locomotion.agents.rsl_rl_ppo_cfg import Asimov1PPORunnerCfg


@configclass
class Asimov1StandIdealPPORunnerCfg(Asimov1PPORunnerCfg):
    # A new experiment name: runs land in logs/rsl_rl/asimov1_stand_ideal/.
    experiment_name = "asimov1_stand_ideal"
    run_name = "ppo"
    # Standing is a smaller problem than walking; this is a starting point, not a tuned value.
    max_iterations = 1500
    # A checkpoint every 50 iterations, to watch training progress afterwards.
    save_interval = 50

The experiment name must be new. It names the log folder, and export uses it to find the task again.

3. Register the task

Create tasks/stand/__init__.py. It gives the task its two names, one for training and one for watching:

"""Asimov-1 standing tasks for the RL crash course, Module 1."""

import gymnasium as gym

from . import agents

gym.register(
    id="Asimov1-Stand-Ideal-v0",
    entry_point="isaaclab.envs:ManagerBasedRLEnv",
    disable_env_checker=True,
    kwargs={
        "env_cfg_entry_point": f"{__name__}.stand_env_cfg:Asimov1StandIdealEnvCfg",
        "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:Asimov1StandIdealPPORunnerCfg",
    },
)

gym.register(
    id="Asimov1-Stand-Ideal-Play-v0",
    entry_point="isaaclab.envs:ManagerBasedRLEnv",
    disable_env_checker=True,
    kwargs={
        "env_cfg_entry_point": f"{__name__}.stand_env_cfg:Asimov1StandIdealEnvCfg_PLAY",
        "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:Asimov1StandIdealPPORunnerCfg",
    },
)

Then, in hub.py, add one line to EXPERIMENT_TASKS:

    "asimov1_stand_ideal": "Asimov1-Stand-Ideal-v0",

4. A smoke train

Before spending hours of GPU time, run a short training that only checks the task builds and trains:

./cyclotron.sh --train --task Asimov1-Stand-Ideal-v0 --headless --num_envs 256 --max_iterations 100

256 robots for 100 iterations. On the verification machine this took 161 s from start to finish, about 1.5 s per iteration; Isaac Sim’s start-up is part of that. The run folder appears under logs/rsl_rl/asimov1_stand_ideal/, with checkpoints at iterations 0, 50 and 99.

After 100 iterations the robots are not standing yet. In the verification run, episodes lasted 38.7 steps on average, about 0.8 s, out of a possible 1,000. A crash would have meant something was wrong; a poor policy after 100 iterations means nothing.

5. The real run

./cyclotron.sh --train --task Asimov1-Stand-Ideal-v0 --headless

This uses the task’s own settings: 4,096 robots and 1,500 iterations. Watch it with TensorBoard while it runs:

tensorboard --logdir logs/rsl_rl/asimov1_stand_ideal

The curves to watch are Train/mean_episode_length and Train/mean_reward. Module 3 explains the others.

On the verification machine’s RTX 4060 Laptop GPU the run took 3,894 s, about 65 minutes: 2.6 s per iteration. This is what it logged:

Episode length (s)0102005001,0001,500Reward per episode05010005001,0001,500Exploration noise σ00.5105001,0001,500
The reference run of Asimov1-Stand-Ideal-v0, by training iteration, as TensorBoard logged it (Train/mean_episode_length, Train/mean_reward and Policy/mean_std). The orange dots are the checkpoints the scrubber in lesson 5 loads.
  • Episode length jumps between iterations 100 and 150, from under 1 s to about 10 s. After that it wanders between about 6 and 12 s.
  • Reward climbs with it, and keeps climbing until about iteration 800 (from 49 at iteration 150 to 91). Episodes are not getting longer then, so the policy is earning more for each step it stands.
  • Exploration noise falls from 0.99 to 0.16: the policy grows sure of what works, so it tries less around it.

Why does the episode length stay near 10 s and not reach the full 20 s? Because it is an average over the episodes that ended recently. Every new episode starts from a random pose with joints up to 0.5 rad out (lesson 6), and some of those starts are hard or impossible to catch. Those episodes end within a second, a new one starts, and it may end quickly too, so falls are counted far more often than robots that stand for the full 20 s. An average of 10 s does not mean robots fall halfway through.

The real check is the simulator. The final policy, iteration 1,499, stands for the full 20 s in this browser simulator from the default pose. It takes a backward push of 125 N at the pelvis and falls at 150 N; forward, even 50 N, the smallest push tried, topples it. Nothing in this task ever pushed it; the Test page measures that properly, and Module 2 trains for it. Lesson 5’s scrubber plays checkpoints of this run, so you can watch it learn.

6. Watch it

./cyclotron.sh --play --task Asimov1-Stand-Ideal-Play-v0 --num_envs 4 --headless --video --video_length 100

This plays the latest checkpoint of the latest run and records 100 steps (2 s) to videos/play/ inside the run folder, then exits. Leave out --headless --video --video_length 100 to watch in Isaac Sim’s window instead, on a machine with a screen. On the verification machine the recording took 38 s.

7. Export it

./cyclotron.sh --export --checkpoint logs/rsl_rl/asimov1_stand_ideal/<run>/model_1499.pt

Replace <run> with your run’s folder name, and the checkpoint with the one you want. Export writes policy.onnx and env.yaml, with other files, to exported/ inside the run folder, and checks that the exported policy gives the same actions as the checkpoint. On the verification run it took 35 s and the largest difference was 4.2 × 10⁻⁷.

policy.onnx and env.yaml are the two files the Test page needs.

Recap

  • A task is five pieces: environment config, play variant, runner config, registration and experiment entry.
  • Asimov1-Stand-Ideal-v0 is the walking task with zero commands, no walking reward terms, no noise, no delay, no pushes and no randomised physics, but with random starting poses.
  • Smoke-train first, then train for real, watch, and export.
  • Next: the Test page loads your export and pushes it.

Sources

  1. cyclotron, designing your own task (the five pieces of a task, the smoke train, the constraints)docs/designing-your-own-task.md (commit d71390f)
  2. cyclotron, the velocity task this task derives fromsource/cyclotron/cyclotron/tasks/locomotion/velocity_env_cfg.py
  3. cyclotron, the PPO runner configuration it inheritssource/cyclotron/cyclotron/tasks/locomotion/agents/rsl_rl_ppo_cfg.py, lines 59–93
  4. Measurement: Asimov with every motor off, from standing, and holding the default pose with no policymeasurements.json, results.noPolicy, results.manualDefaultPose and results.manualPush (scripts/measure-module-1.mjs)
  5. Verification of this guide, 17 November 2026: smoke train, play and export on cyclotron commit d71390f (branch course/module-1 of github.com/Dene33/cyclotron, on Menlo Research's main at 27df328)NVIDIA GeForce RTX 4060 Laptop GPU (8 GB); Isaac Sim 5.1, Isaac Lab 0.54.4, RSL-RL 5.0.1
  6. The full run, 17 November 2026: 4,096 robots, 1,500 iterations, 3,894 s; the same task code as commit d71390f, trained from a development branch of cyclotronrun asimov1_stand_ideal/2026-11-17_14-06-27_ppo, TensorBoard Train/mean_episode_length, Train/mean_reward and Policy/mean_std; site/src/content/learn/en/module-1/training-curves.json
  7. Measurement: the full run's final policy in this simulatormeasurements.json, results.checkpoints, stand-ideal-1499 (scripts/measure-module-1.mjs)