Lagrange

New in v1.4 build a robot in the viewer: parts, meshes, sensors and power, then test it in a world →

Simulate the whole robot, not only its rigid bodies: its battery and motors, the heat in its parts, the air round its rotors, the weather on its sensors and the interference of its own wiring, together on the GPU. Switch any of them off.

Open source (Apache-2.0) · ROS 2 Lyrical on Ubuntu 26.04 · URDF, SDFormat, MJCF and USD as they are · a native Vulkan viewer · a deterministic CPU mode, bit for bit

Install in one command Measured against Gazebo The five-minute tutorial GitHub

Live air on the GPU. A lattice-Boltzmann box of air in 4 cm cells follows the drone; its rotors fly in it. How
Build a robot in the viewer. Parts, joints and sensors from the catalog, one click to test it in a simulator, saved as URDF. How
Weather the sensors feel. Rain, fog, snow and dust cut lidar range, veil cameras and take grip from tyres. How
Sensors with physics. Lidar returns by material and angle; 45 sensors, from a 4D imaging radar to bumpers, each with faults. All 45
Two LEDs and their driver on a board on a finned heat sink, coloured by temperature
Heat inside every part. Conduction cell by cell from each part's material, checked against OpenFOAM. How
The magnetic field of a quadcopter's battery leads, sliced through it
Its own interference. The battery leads' field, and how many degrees it turns the compass. How
A Holybro X500 V2 flying over Zurich
Real places, 40 km wide. Terrain and OpenStreetMap streamed in tiles, in double precision. How
Traffic and people. Lights, crossings with buttons, self-driving cars and walking crowds. How
A Lexus RX 450h in Nishi-Shinjuku, Tokyo
Cars with real tyres. Magic Formula tyres, OpenDRIVE, OpenSCENARIO and an Autoware interface. How
9physics domains, coupled, each with a stand-in
45sensors: 8 types and 37 built-in kinds, each with faults
12.9×real time: the sedan in the city with camera, lidar and radar1
1 799tests; models checked against closed forms and measurements2

1. Headless on a laptop (i9-13900H, RTX 4060 Laptop GPU), shared with other jobs, ±30 %: benchmarks §4–§5. 2. What is met and what is not: the validation report.

Against Gazebo, measured

Same scenes, same machine, headless, as fast as each goes; the median of five runs. The comparison has the method, the raw output, the physics accuracy, and where Lagrange is worse: a younger project, one platform, a slower camera here, many contacts on its MuJoCo backend.

Lagrange 1.3.0

Gazebo Jetty 10.5.0

AMR in a warehouse, physics only (real-time factor)

96.6

14.8

The same with 2D and 3D lidars and an IMU

54.1

12.7

One 640 × 480 camera at 30 Hz

10.7

12.3

Start-up to the first step

0.07 s

2.4 s

Peak memory, AMR with sensors

78 MB

961 MB

What it simulates

Rigid bodies

MuJoCo or Jolt: contacts, joints, force-torque sensing.

Power

Batteries, buses, motors and their drives at 100 µs; brown-outs and derating.

Heat

Lumped nodes, or conduction inside each part from its material.

Air

Rotors, drag, wind and gusts, downwash, a GPU air box and an OpenFOAM link.

Weather

Fog, rain, snow and dust, and what they do to lidars, cameras and grip.

EMI and radio

Power lines, a robot’s own wiring, compasses, CAN errors, radio links.

Sensors

Lidar, camera, thermal camera, radar, IMU, GNSS, magnetometer, barometer, and 37 more.

Vehicles and traffic

Tyres, suspension, powertrains; lanes, lights, crossings and people.

Water and cables

Buoyancy, currents and waves; tethers that sag, snag and tangle.

Why Lagrange

Turn any physics off. Every domain has a stand-in: an ideal motor, a constant ambient, ground-truth sensors, or a recording. Test your planner without the battery, or your battery without the physics.

Check every number. Each model is tested against a closed form, a published measurement or OpenFOAM, and the validation report says what is met and what is not. A measured comparison with Gazebo, MuJoCo and PyBullet says where others are better.

Bring your robot as it is. URDF, SDFormat, MJCF or USD; ROS 2 topics, ros2_control, Nav2, MoveIt 2, PX4 and ArduPilot SITL work with it.

Same run, same answer. A deterministic CPU reference mode, bit for bit, beside the GPU paths; worlds tens of kilometres wide in double precision.

Try it

On Ubuntu 26.04 (amd64), one command installs ROS 2 Lyrical and Lagrange from the latest release; nothing is built (other ways to install):

curl -fsSL https://raw.githubusercontent.com/Open-Physical-Systems/Lagrange/main/packaging/install.sh | bash

Then:

source /opt/ros/lyrical/setup.bash
lagrange amr        # the sample AMR in its warehouse, with the viewer
lagrange quad       # a quadcopter that takes off and hovers
lagrange town       # traffic lights, crossings, cars and people

or from Python, headless:

import lagrange

sim = lagrange.Simulation(lagrange.sample_robot(), world=lagrange.sample_world())
sim.step_until(2.0)
print(sim.read("body/base_link/pose"))

Where to go next

You want to

Read

See every robot and world

Robots and worlds, and the feature videos

Install it

Installing Lagrange: from source, as debs or in a container

Fly a drone, or test your own

Tutorial: a quadcopter, then Test your own drone

Load your own robot

The run file and The lagrange command

Build a robot in the viewer

The robot builder: links, joints, sensors from the catalog, Test, save as URDF

Find a sensor, add it, read it, break it

Sensors: every sensor Lagrange simulates, by robot

Drive a car, or run Autoware

Tutorial: a car in a city block, then Autoware

Heat, and a robot’s own EMI

Tutorial: heat in the parts and a robot’s own interference

Know how a number is computed

Physics reference: every model, its equations and its checks

Extend it

Writing a module, Writing a plugin