Pico-ROS is a lightweight ROS (Robot Operating System) client implementation designed for resource-constrained devices. Built on top of zenoh-pico and working in conjunction with rmw-zenoh, it provides an easy-to-use interface to ROS host from embedded systems.
-
picoros
- A lightweight ROS client implementation providing core abstractions:
- Node
- Publisher
- Subscriber
- Service server
- A lightweight ROS client implementation providing core abstractions:
-
picoserdes
- CDR serialization/deserialization for ROS messages
- Custom type generation from header files.
-
picoparams
- Parameter server implementation built using picoros and picoserdes
- Customizable parameter backend interface
- Compatible with ROS 2 parameter services
- C compiler and CMake build system
- zenoh-pico
- Micro-CDR
- rmw-zenoh (for ROS 2 integration)
git clone <repo>
cd <repo_path>
git submodule update --init --recursive
mkdir build
cd build
cmake ..
make- Custom type definitions:
-DUSER_TYPE_FILE="user_types.h" - Disable examples:
-DPICOROS_BUILD_EXAMPLES=OFF
The project includes several example applications demonstrating different features:
-
Basic Communication
talker.c: Basic publisher examplelistener.c: Basic subscriber example
-
Advanced Features
srv_add2ints.c: Service server exampleparams_server.c: Parameter server implementationodometry_publisher.c&odometry_listener.c: ROS odometry message handling
-
Ensure ROS 2 is running with
rmw_zenoh(Installation Guide) -
In separate terminals, run the example nodes:
# Terminal 1: Run publisher ./talker -m client -a <zenoh-router-address> # Terminal 2: Run subscriber ./listener -m client -a <zenoh-router-address> # Terminal 3: Run service server ./srv_add2ints -m client -a <zenoh-router-address> # Terminal 4: Run parameter server ./param_server -m client -a <zenoh-router-address>
-
Interact with nodes from ROS 2:
# Subscribe to messages ros2 topic echo /picoros/chatter # Call service ros2 service call /picoros/add2 example_interfaces/srv/AddTwoInts '{a: 1, b: 2}' # List parameters ros2 param list /picoros
The project uses Doxygen for documentation. To generate and read:
# Install dependencies:
sudo apt-get install doxygen graphviz
# Generate documentation:
cd docs
./generate.sh
# View documentation:
# Open in your default browser
xdg-open docs/generated/html/index.htmlPico-ROS is ideal for resource-constrained microcontroller-based ROS nodes and edge devices in ROS networks.
While it provides core ROS functionality, it's not intended to replace full ROS implementations like rclc or rclcpp for systems with more resources.
See the examples directory for implementation references. When adding new types, use the example_types.h as a template for the required format.
See LICENSE file for details.
