High-fidelity quadrotor simulation built on MuJoCo with real-time IPC transport and live telemetry visualization.
Simulates a Hummingbird quadrotor with a full sensor suite (IMU, GNSS, barometer, LiDAR, infrared, camera), PD attitude/position flight controller, and zero-copy IPC via Renoir. A built-in Foxglove WebSocket bridge enables real-time visualization from any Foxglove-compatible client.
This media file is large and tracked with Git LFS. If your clone does not pull it automatically:
git lfs install
git lfs pullRuntime data path:
- MuJoCo advances rigid-body dynamics from actuator commands.
- Controller computes rotor thrust and spin commands from state estimates and target setpoint.
- Sensor subsystem publishes deterministic IMU, GNSS, barometer, LiDAR, infrared, and camera outputs.
- Renoir transport publishes sensor payloads over shared-memory channels with zero-copy semantics.
- Foxglove bridge drains transport topics and serves telemetry streams over WebSocket (
ws://0.0.0.0:8765).
Subsystem boundaries:
| Subsystem | Responsibility | Primary files |
|---|---|---|
| Simulation core | Model loading, stepping loop, CLI integration | src/main.c, model/scene.xml, model/hummingbird.xml |
| Control | Position/attitude control, actuator mapping | src/controller.c, include/controller.h |
| Sensor synthesis | Signal generation, timing, camera rendering | src/sensors/sensors.c, include/sensors/ |
| IPC transport | Renoir topic publish/subscribe integration | src/transport/transport_renoir.c, include/transport/ |
| Telemetry serving | Foxglove protocol, framing, serialization | src/foxglove/, include/foxglove/ |
| Dependency | Version | Notes |
|---|---|---|
| MuJoCo | 3.5.0+ | Installed to ~/.mujoco/mujoco |
| CMake | 3.10+ | Build system |
| GCC / Clang | C11 | Compiler |
| GLFW3 + OpenGL | — | Optional (headless mode without) |
| Rust | stable | Required for Renoir IPC |
| clang-tidy | — | Static analysis |
mkdir -p ~/.mujoco
curl -fsSL https://github.com/google-deepmind/mujoco/releases/download/3.5.0/mujoco-3.5.0-linux-x86_64.tar.gz \
| tar xz -C ~/.mujoco
mv ~/.mujoco/mujoco-3.5.0 ~/.mujoco/mujocosudo apt-get install build-essential cmake libglfw3-dev libgl-dev clang-tidyRenoir must be cloned as a sibling directory:
cd /path/to/parent
git clone git@github.com:Nil69420/renoir.git
cd renoir
cargo build --release --features c-api./build.sh # Release + IPC + Foxglove
./build.sh debug # Debug + IPC + Foxglove
./build.sh release OFF # Release, no IPC
./build.sh lint # Build + clang-tidy static analysis./run.sh all # Build + run with Foxglove bridge
./run.sh all --headless --duration 30 # Headless with Foxglove
./run.sh sim # Build + run without Foxglove
./run.sh analyze # ASan + UBSan dynamic analysis
./run.sh analyze --headless --duration 5 # ASan + UBSan targeted run
./run.sh analyze-tsan --headless --duration 5cd build
./hummingbird # Interactive viewer
./hummingbird --headless --duration 10 # Headless
./hummingbird --no-ipc # No IPC transport
./hummingbird --altitude 2.0 # Custom target altitude
./hummingbird --lidar-rays 72 # Custom LiDAR config
./hummingbird --cam-width 640 --cam-height 360 --cam-fps 8AddressSanitizer + UndefinedBehaviorSanitizer:
./run.sh analyze --headless --duration 10ThreadSanitizer:
./run.sh analyze-tsan --headless --duration 10Both sanitizer workflows build dedicated debug trees (build-analyze and build-tsan) to avoid polluting release artifacts.
When built with ENABLE_FOXGLOVE=ON (default), the simulator starts a WebSocket server on ws://0.0.0.0:8765.
Connect with Foxglove Studio:
- Open Foxglove Studio
- Open connection → WebSocket →
ws://localhost:8765 - Add panels for the published topics
| Topic | Schema | Description |
|---|---|---|
/drone/imu |
sensor_imu_t |
Accelerometer, gyroscope, magnetometer, orientation |
/drone/gnss |
sensor_gnss_t |
GPS position, velocity, fix quality |
/drone/baro |
sensor_baro_t |
Pressure, temperature, altitude |
/drone/lidar |
sensor_lidar_t |
2D range scan |
/drone/infrared |
sensor_infrared_t |
Downward-facing range |
/drone/camera/meta |
sensor_camera_meta_t |
Camera resolution, FOV metadata |
├── include/ Headers
│ ├── controller.h
│ ├── setpoint.h
│ ├── types.h
│ ├── viewer.h
│ ├── foxglove/ Foxglove bridge headers
│ ├── sensors/ Sensor system headers
│ └── transport/ IPC transport headers
├── src/
│ ├── main.c Entry point, CLI, sim loop
│ ├── controller.c PD(I) flight controller
│ ├── viewer.c GLFW/OpenGL visualization
│ ├── foxglove/ Foxglove WebSocket bridge
│ │ ├── bridge.c Bridge lifecycle + main thread
│ │ ├── proto.c Protocol message handling
│ │ ├── serialize.c JSON serializers
│ │ ├── ws.c WebSocket framing
│ │ ├── sha1.c SHA-1 (handshake)
│ │ └── base64.c Base64 (handshake)
│ ├── sensors/ Sensor simulation + noise
│ └── transport/ Renoir IPC transport
├── model/ MJCF model files
├── meshes/ 3D mesh assets
├── build.sh Build script
├── run.sh Run script
├── CMakeLists.txt
└── .github/workflows/ci.yml CI pipeline
GitHub Actions runs on every push and PR to master:
- Release — full build with IPC + Foxglove
- ASan — AddressSanitizer + UndefinedBehaviorSanitizer
- TSan — ThreadSanitizer
- Static Analysis — clang-tidy with warnings-as-errors
See repository root for license information.
