GitHub - Pico-ROS/Pico-ROS-software at fdce759aaf9200a0da9a805fd0da049e4e7fdf39 · GitHub
Skip to content

About

Pico ROS client libraries

Resources

Stars

82 stars

Watchers

5 watching

Forks

Latest commit

 

History

40 Commits

Folders and files

Repository files navigation

Pico-ROS

Overview

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.

Features

Core Components

  1. picoros

    • A lightweight ROS client implementation providing core abstractions:
      • Node
      • Publisher
      • Subscriber
      • Service server
  2. picoserdes

    • CDR serialization/deserialization for ROS messages
    • Custom type generation from header files.
  3. picoparams

    • Parameter server implementation built using picoros and picoserdes
    • Customizable parameter backend interface
    • Compatible with ROS 2 parameter services

Getting Started

Prerequisites

Building the Project

git clone <repo>
cd <repo_path>
git submodule update --init --recursive
mkdir build
cd build
cmake ..
make

Build Options

  • Custom type definitions: -DUSER_TYPE_FILE="user_types.h"
  • Disable examples: -DPICOROS_BUILD_EXAMPLES=OFF

Examples

The project includes several example applications demonstrating different features:

  • Basic Communication

    • talker.c: Basic publisher example
    • listener.c: Basic subscriber example
  • Advanced Features

    • srv_add2ints.c: Service server example
    • params_server.c: Parameter server implementation
    • odometry_publisher.c & odometry_listener.c: ROS odometry message handling

Running the Examples

  1. Ensure ROS 2 is running with rmw_zenoh (Installation Guide)

  2. 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>
  3. 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

Documentation

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.html

Use Cases

Pico-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.

Using in your project

See the examples directory for implementation references. When adding new types, use the example_types.h as a template for the required format.

License

See LICENSE file for details.

About

Pico ROS client libraries

Resources

Stars

82 stars

Watchers

5 watching

Forks

Releases

Packages

Contributors

Languages