PyRoboSimulator
AI-native world simulation engine for robotics, agents, and ROS 2 — a pip-installable Rust core for multi-agent state/physics plus a FastAPI simulation service with realistic sensors and a real MuJoCo physics backend.
What it is
PyRoboSimulator is two separately-installed pieces under one name:
- A pip-installable Rust core (
pip install pyrobosimulator) exposingWorld,Agent,AgentType,Mission,NarrativeEngine,ROS2Bridge, andStorageEngine. It provides real multi-agent state, gravity, forward-Euler integration, and pairwise collision detection, plus a RocksDB-backed event log. - A FastAPI backend service run from source in
backend/. It provides the simulation loop (SimulationEngine), procedural world generation (ScenarioBuilder), realistic RGB/Depth/Lidar/Thermal sensors, a REST API, and the pluggable physics backends (MuJoCo, Gazebo, Isaac Sim).
The two are not interchangeable — read What it is not before copying any example.
Features
- Multi-agent physics (pip core) —
World.step(dt)applies gravity to every agent and integrates;Agent.apply_force(), velocity clamping,World.detect_collisions()(O(n²) pairwise). - RocksDB event log (pip core) —
StorageEngineis a real on-disk append-only store keyed byworld_id. - Simulation loop (backend) — configurable timestep (default 16 ms @ 60 Hz), AABB collision, boundary conditions, deterministic seeding.
- Sensors (backend) — RGB camera, depth, Lidar point clouds, and thermal cameras with per-agent configuration.
- Real MuJoCo backend — loads real MJCF/URDF models, steps real dynamics, and extracts body/joint/contact/sensor state.
- World generation — built-in parking-lot, warehouse, and urban-street scenarios; procedural obstacle placement; reproducible seeds.
- REST API — simulation CRUD, status, results, and SSE streaming; JWT auth with bcrypt; OpenAPI docs at
/docs. - Agent behavior (backend) — behavior trees, A*/NavMesh pathfinding with RVO avoidance, multi-layer agent memory, and multi-agent messaging.
- Narrative + learning (backend) — Claude-backed NLP→scenario conversion, curriculum learning, and fleet learning.
Who it's for / Use cases
- Autonomous-vehicle algorithm testing — scripted urban scenarios with many agents to exercise collision avoidance.
- Multi-robot coordination — warehouse fleets, formation control, and communication testing.
- Sensor-fusion research — synchronized RGB/depth/Lidar/thermal streams per agent.
- RL / imitation-learning experiments — procedural environments with deterministic seeds.
- Service integration — drive simulations over the REST API instead of embedding the engine.
What it is not
pip install pyrobosimulatordoes not includeSimulationEngineorScenarioBuilder. Those live only in thebackend/service; install from source to use them.NarrativeEngine.generate_from_eventsis not implemented in the Rust core — it raisesNotImplementedErrorby design. Use the Claude-backed path inbackend/src/narratives/narrative_converter.py.- Gazebo and Isaac Sim backends are not real integrations.
initialize()raisesEnvironmentErrorimmediately; only MuJoCo is a working physics backend. Using either requires infrastructure (ROS 2 / Omniverse + NVIDIA GPU) not present in a typical dev or CI environment. - Backend database and cache are still in-memory for simulations/users. The PostgreSQL/Redis integration is partially wired, not fully load-bearing.
- The published performance benchmarks are not backed by a committed, reproducible benchmark suite — treat them as unverified historical claims.
- Not a certified or production-verified simulator. Development status is Alpha.
Project status
Alpha (Development Status 3), version 0.12.1, matching the latest PyPI release. The Rust core (World/Agent/StorageEngine, real gravity, integration, collision detection, RocksDB storage) and the MuJoCo backend are implemented and unit-tested; Gazebo/Isaac Sim are stubs that fail fast. The backend suite runs ~882 passing / 33 failing / 1 erroring tests at ~75% measured line coverage; remaining failures are pre-existing and unrelated to the physics/simulator work. mypy (strict) still reports a large backlog that is not CI-gating, and the frontend has had a TypeScript error sweep but not a full quality audit. See ROADMAP_HONEST.md.
Installation
pip install pyrobosimulator
This installs only the Rust core (Python 3.10+).
The backend service is run from source:
git clone https://github.com/Mullassery/PyRoboSimulator.git
cd PyRoboSimulator/backend
pip install -e ".[dev]"
uvicorn src.main:app --reload
Add the optional MuJoCo physics backend with pip install -e ".[physics]".
Quick start
Rust core (from the pip package):
from pyrobosimulator import World, Agent, AgentType
world = World("demo")
robot = Agent("robot-1", AgentType.Robot)
robot.set_position(0.0, 0.0, 10.0)
robot.set_mass(1.0)
world.add_agent(robot)
for _ in range(100): # 1 simulated second at 10 ms
world.step(0.01)
print(world.get_agent(robot.id()).position())
print("collisions:", world.detect_collisions())
Backend service (run from source — see Installation; SimulationEngine is not in the pip package):
from pyrobosimulator import SimulationEngine
engine = SimulationEngine(num_agents=100, duration=60.0, timestep=0.016)
engine.run()
summary = engine.get_summary()
print(summary["collision_count"], summary["goal_reached_count"])
Usage
# Start the API, then create a simulation
curl -X POST http://localhost:8000/api/v1/simulations \
-H "Content-Type: application/json" \
-d '{"scenario": "parking_lot", "num_agents": 50, "duration": 30.0}'
Key backend endpoints: POST/GET/PUT/DELETE /api/v1/simulations, .../{id}/start|stop|status|results|agents|summary|stream (SSE), plus GET /health, /ready, /metrics. Full list in backend/docs/.
Documentation
- backend/README.md — backend service setup
- VISION.md — product vision
- ROADMAP_HONEST.md — implemented vs planned, honest caveats
- backend/docs/DEPLOYMENT.md — Docker / Kubernetes / local dev
- backend/docs/SCHEMA.md — database schema
- backend/docs/UE5_INTEGRATION.md — rendering integration
- backend/docs/OSS_COMPLIANCE.md — dependency license audit
- examples/ — example scripts
- CHANGELOG.md — notable changes
Contributing
See CONTRIBUTING.md. Bug reports and feature requests: GitHub Issues; questions: GitHub Discussions.
Part of the robotics & autonomy family
PyRoboSimulator is one of six complementary, composable tools in the Mullassery robotics & autonomy family. Together they form a single stack: perceive → map → simulate → learn → debug → coordinate the fleet.
| Tool | Role | What it does |
|---|---|---|
| PyRoboVision | Perception | Multi-object tracker (Kalman filter + Hungarian algorithm) and trajectory predictor for robot perception. |
| PyTerrainMap | Mapping / SLAM | Fuses multi-robot terrain observations into a spatial-temporal store, with H3 spatial indexing and SLAM. |
| PyRoboSimulator | Simulation | This project — world simulator for autonomous systems, with a FastAPI backend. |
| PyRoboFrames | Learning data | Rust-backed ML dataloader for robot-learning datasets (native LeRobot format, Apple Silicon hardware video decode). |
| PyRoboReplay | Mission forensics | Forensic-debugging and causal-analysis engine for autonomous robot mission replay. |
| SyncFleet | Fleet coordination | Rust + SQLite, peer-to-peer state sync for robotics fleets — mutual-TLS 1.3, version-vector replication, mDNS discovery; conflict resolution on the roadmap. |
Each works standalone, but they're complementary by design. Browse all projects →
License
Apache License 2.0 — see LICENSE.
Metadata
Release files for pyrobosimulator 0.12.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pyrobosimulator-0.12.3.tar.gz | 634.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyrobosimulator-0.12.3-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 3.5 MB
Release files / pyrobosimulator-0.12.3.tar.gz
| Download URL | pyrobosimulator-0.12.3.tar.gz |
|---|---|
| Size | 634.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28b4731cc23eb6945ef180ac1e979cae42aca4c598fceb8af45c2e7142769843
|
|
BLAKE2b-256 checksum How to use checksums |
e3158f3534b70152cff7bf67db5f08ac64d4027a68f31ffac5949bcf9bd05d04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / pyrobosimulator-0.12.3-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | pyrobosimulator-0.12.3-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.9 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8fcb2d939664bc702a9bbd1718c158039b9d66d2e02523cfe3980f4d85076d32
|
|
BLAKE2b-256 checksum How to use checksums |
40370b152efc0f4a790a1c34c42224321cd8b6a4940d8ae2fa42fc9efca56caf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for pyrobosimulator 0.12.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.