Skip to content

getditto-shared/rmw_ditto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RMW Ditto Implementation

This package provides a Robot Operating System 2 (ROS 2) middleware (RMW) implementation for Ditto Live's edge sync capability. It enables ROS 2 to use Ditto as its underlying communication middleware, allowing for efficient data synchronization at the edge.

Overview

The RMW Ditto implementation bridges the ROS 2 middleware interface with Ditto Live's edge synchronization capabilities. It provides the necessary functionality for:

  • Topic-based publish/subscribe communication
  • Service-based request/response communication
  • QoS-aware data exchange
  • Efficient serialization and deserialization of ROS messages

Prerequisites

  • ROS 2 (Foxy or newer)
  • C++14 compatible compiler
  • Ditto Live client libraries (follow Ditto's installation instructions)

Building

  1. Clone this repository into your ROS 2 workspace:
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
git clone https://github.com/your-username/rmw_ditto.git
  1. Install dependencies:
cd ~/ros2_ws
rosdep install --from-paths src --ignore-src -r -y
  1. Build the package:
cd ~/ros2_ws
colcon build --packages-select rmw_ditto

Usage

To use the RMW Ditto implementation with ROS 2, you need to set the RMW_IMPLEMENTATION environment variable:

export RMW_IMPLEMENTATION=rmw_ditto

You can verify that the RMW implementation is being used by running:

ros2 doctor --report

Configuration

The RMW Ditto implementation looks for a configuration file at /etc/ditto/config.json by default. You can change this location by setting the DITTO_CONFIG_PATH environment variable:

export DITTO_CONFIG_PATH=/path/to/your/config.json

The configuration file should contain the necessary settings for connecting to your Ditto Live instance, including:

  • Connection endpoints
  • Authentication credentials
  • Synchronization settings
  • Network parameters

Examples

Basic Publisher/Subscriber

# Terminal 1
export RMW_IMPLEMENTATION=rmw_ditto
ros2 topic pub /test std_msgs/String "data: Hello from Ditto RMW"

# Terminal 2
export RMW_IMPLEMENTATION=rmw_ditto
ros2 topic echo /test

Service/Client

# Terminal 1
export RMW_IMPLEMENTATION=rmw_ditto
ros2 run demo_nodes_cpp add_two_ints_server

# Terminal 2
export RMW_IMPLEMENTATION=rmw_ditto
ros2 service call /add_two_ints example_interfaces/srv/AddTwoInts "{a: 2, b: 3}"

Architecture

The RMW Ditto implementation consists of the following main components:

  1. RMW Interface Implementation: Implements the standard RMW API functions required by ROS 2.
  2. Ditto Sync Client: Provides an abstraction layer for interacting with Ditto Live's edge sync capabilities.
  3. Type Support Bridge: Handles conversion between ROS 2 message types and Ditto data formats.
  4. QoS Adaptation Layer: Maps ROS 2 Quality of Service settings to Ditto's synchronization parameters.

Limitations

The current implementation has the following limitations:

  • Limited support for all ROS 2 QoS profiles
  • No support for ROS 2 parameters
  • Limited compatibility with ROS 2 security features

Contributing

Contributions to improve the RMW Ditto implementation are welcome. Please feel free to submit issues and pull requests.

License

This package is licensed under the Apache License 2.0.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published