Reactive Programming of Robots with RxROS

Book Chapter (2021)
Author(s)

Henrik Larsen (University of Copenhagen)

Gijs van der Hoorn (TU Delft - Robust Robot Systems)

Andrzej Wąsowski (University of Copenhagen)

DOI related publication
https://doi.org/10.1007/978-3-030-75472-3_2 Final published version
More Info
expand_more
Publication Year
2021
Language
English
Volume number
6
Pages (from-to)
55-83
Publisher
Springer
ISBN (print)
978-3-030-75471-6
ISBN (electronic)
978-3-030-75472-3
Downloads counter
192

Abstract

Reactive programming is an alternative to callback-based programming. This tutorial chapter first discusses the problems of asynchronous programming with callbacks and locks—the standard ROS 2 API—and then presents a way to overcome them using the reactive programming paradigm. We introduce RxROS: a new API for implementing ROS nodes, based on the paradigm of reactive programming. We demonstrate advantages on small code examples in a tutorial style using simple nodes written in RxROS for ROS 2, and show the results of performance experiments indicating that RxROS does not introduce any significant performance overhead. RxROS is available under a BSD license, with bindings for both ROS 1 and ROS 2, in both Python and C + +. The implementation of RxROS for ROS 2 is available at https://github.com/rosin-project/rxros2.