Mini-ROS is a compact, single-process, multi-threaded robotics framework that brings the essential concepts of ROS to small embedded systems. It is written entirely in C++17, avoids external dependencies, and is optimized for low latency and deterministic communication.
Its purpose is to deliver a clear software structure for robotics applications without requiring a full ROS installation, which is often impractical on lightweight controllers.
Modern robots require multiple components to run concurrently—sensors, control algorithms, estimators, actuators, safety checks. In a monolithic program, this becomes unmanageable.
Mini-ROS solves this by:
- Separating logic into Nodes
- Providing standard communication patterns (topics, services)
- Avoiding the network overhead of ROS 1/2
- Remaining small, deterministic, and fast
This makes it suitable for:
- Real-time control loops
- UAVs, mobile robots, small manipulators
- Robotics projects running on Raspberry Pi, Jetson Nano, or similar hardware
Nodes communicate via named topics:
- Publishers write messages to a topic
- Subscribers receive them asynchronously
Communication uses lock-free or low-lock thread-safe queues for minimal latency.
Services allow structured, blocking communication between nodes. Example: a path planner responding with a computed trajectory.
Nodes support spin() loops or spinOnce(), handling:
- Topic callbacks
- Service callbacks
- Timer events
Included utilities:
Stopwatch→ measure callback durationsStatistics→ running average, variance, latencyThreadSafeQueue→ high-speed message passing
These make debugging and performance validation easier.
Mini-ROS uses a central MiniRosCore singleton for discovery. Once linked, nodes exchange data directly without going through the core.
Advantages:
- No serialization unless you add it
- No sockets, no DDS, no middle-layer
- Deterministic memory access
The framework is intentionally minimal. You keep full control of memory, threading, and timing.
Mini-ROS/ ├── CMakeLists.txt ├── LICENSE ├── README.md ├── examples/ │ ├── perf_demo.cpp │ ├── service_client_server.cpp │ └── talker_listener.cpp └── mini_ros/ ├── common/ │ ├── Statistics.h │ ├── Stopwatch.h │ └── ThreadSafeQueue.h └── core/ ├── IMessage.h ├── IService.h ├── MiniRosCore.cpp ├── MiniRosCore.h ├── Node.cpp ├── Node.h ├── Publisher.cpp ├── Publisher.h ├── ServiceClient.cpp ├── ServiceClient.h ├── ServiceServer.h ├── Subscriber.h └── Timer.h
- GCC ≥ 8 or Clang ≥ 6
- CMake ≥ 3.10
- Linux recommended (but works on Windows with MinGW or WSL)
git clone https://github.com/your-username/mini-ros.git
cd mini-ros
mkdir build && cd build
cmake ..
make -j4- Publish/Subscribe Demo
./examples/talker_listenerShows one node publishing data and another receiving it.
- Service Client/Server Demo
./examples/service_client_serverTests the synchronous request/response model.
- Performance Benchmark Demo
./examples/perf_demoIncludes latency and throughput statistics.