These repositories are dependent on each other as per the following graph
Klepsydra ROS 2 executor soon available as open source
Our own ring buffer lock-free executor for ROS 2 is based on Klepsydra’s main product, the SDK. This performance has never been seen in an executor before.
Klepsydra is based in lock-free programming. This kind of programming is the high-level wrapper of the atomic operations in the processor, in particular the so-call compare-and-swap or CAS operation. It was invented back in the 70s, but it didn’t really become popular until the early 90s, when it was implemented in higher-level languages and then it really took off when Java included it in the early 2010s.
Lock-free programming consists of attempting repeatedly to write data in a small piece of memory until the data is in a consistent state. This is usually depicted as a plane trying to land in a busy airport. If the runway is busy, it flies away and then tries it once and again until success.
Our first lock free executor implementation for ROS 2 is built on top of the event loop. Every ROS 2 publisher, also called advertiser, is connected to a ring-buffer producer. The timers are connected as well to the schedulers in the event loop. Lastly, the ROS 2 subscribers are connected to the single threaded consumers.
Our event loop follows a similar design pattern to NodeJS Event Emiter. Although Klepsydra implementation is completely different, the behaviour is the same as all the events happen in one thread. Since the timers and subscriptions are single threaded, there is no need to use any locks.More info
- Comparative Benchmarking of CPU Impact for Classical and Lock-free Map Collection Implementations in Multi-threaded Environments: 13/07/2023
- ROS 2 executor
- Klepsydra SDK Workshop: 05/01/2023
- Klepsydra Community Edition changes license to Apache 2.0: 18/01/2023
- Klepsydra SDK Community Edition Release 7.0: 19/01/2023
The first repository to install is kpsr-core:
git clone https://github.com/klepsydra-technologies/kpsr-core.git
Then follow the installation instruction provided in the readme file.
This repository contains:
- Core API definition classes
- Basic in-memory communication API
- High performance in-memory communication API
- Code generation tools
- ROS, DDS, ZMQ and Socket middleware bindings
- Asynchronous state machine development framework.
The API of Klepsydra is split into two:
- Application API. Which is used by application or functional code that is independent of the underlying middleware or communication frameworks.
- Composition Code. Which is used to assemble or wire up the application.
This approach of two APIs is reflected in the API docs. It is based in the concepts of:
Some of our code was inspired in the Spring Framework for Java.
Klepsydra Robotics Toolkit
This repository provides ROS-independent and high-performance enhancements to applications using ROS, MAVROS and specially OpenCV.
git clone https://github.com/klepsydra-technologies/kpsr-robotics.git
Then follow the installation instruction provided in the readme file.This repository contains:
- ROS independent Geometry messages
- ROS independent Lidar messages
- OpenCV high performance in-memory communications.
- ROS, DDS and ZMQ middleware bindings
Klepsydra SDK Tutorial
This repository contains a comprehensive tutorial of Klepsydra for ROS and for DDS. It can be used as a template project for new Klepsydra development projects.
git clone https://github.com/klepsydra-technologies/kpsr-tutorial.git
- Code generation examples
- ROS and DDS binding tutorials
- Unit test examples
Klepsydra Robotic Toolkit Tutorial
This repository contains a step-by-step guide to build high performance vision applications based on Klepsydra and OpenCV.
git clone https://github.com/klepsydra-technologies/kpsr-vision-ocv-tutorial.git
- Basic Klepsydra vision services
- High performance composition examples
- Unit test examples