Skip to content

Scenario template

Terminal window
simulo create mybot --type scenario

A headless, scripted scene with no learning: no task, no reward, no trainer. Build a world, step it, shut it down. Use this when you want to script a deterministic simulation rather than train a policy — scene construction, a hand-written controller, or a physical plausibility check.

cartpole = simulo.Asset.from_registry("simulo/robot/cartpole:v1")
class MybotScenario(simulo.Scenario):
def build(self, scene: simulo.Scene) -> None:
scene.add(simulo.Terrain.plane(name="ground"), at="/", per_environment=False)
scene.add(simulo.Light.dome(name="light", ...), at="/", per_environment=False)
self.robot = simulo.Robot(asset=cartpole, initial_pose=simulo.Pose.identity())
scene.add(self.robot, at="/World/Robot")
def on_start(self) -> None: ... # after build() and runtime init
def on_step(self) -> None: ... # every simulation step
def on_shutdown(self) -> None: ... # cleanup
app = simulo.App("mybot") # runs on the default Simulo runtime
@app.job(system=simulo.SystemType.TIER_1, timeout=30 * 60)
def simulate(num_steps: int = 1000, num_envs: int = 4) -> dict:
simulo.run(MybotScenario, device="cuda", headless=True, max_steps=num_steps, num_envs=num_envs)
return {"steps": num_steps, "num_envs": num_envs}

No @app.entrypointsimulate is the app’s only job, so simulo run maps --num-steps/--num-envs straight onto its own parameters.

  • MybotScenario.build — populate the scene: terrain, lights, robots, assets. Robots you add here are automatically replicated across num_envs parallel environments.
  • on_start / on_step / on_shutdown — your own simulation logic: setup, a per-step control law (a scripted sine sweep, a hand-written controller), and any final logging or saving.
  • simulate — step count, environment count, resources.
Terminal window
simulo run app.py --num-steps 1000 --num-envs 4
Terminal window
simulo logs --follow # watch the deterministic sim step — no reward printed
simulo result # {"steps": 1000, "num_envs": 4}