ROS2 rclcpp Parameter Callback [Tutorial]

In this ROS2 tutorial I will show you how to use an rclcpp parameter callback, so you can dynamically change parameters’ values while a node is alive. With parameters you can already change the configuration of the node at runtime. But after that, any change to any parameter won’t be taken into account. With a … Read more

ROS2 rclpy Parameter Callback [Tutorial]

After starting a ROS2 node with some parameters, you want to be able to dynamically change those parameters and get notified inside your code? Well, the rclpy parameter callback is what you need to use. (if you were using ROS1 before, this is the same as dynamic_reconfigure, but better). In this tutorial I will show … Read more

ROS2 Create Custom Message (Msg/Srv)

In this tutorial you will learn how to create your own ROS2 custom message (Msg). I will also cover how to create custom services (Srv), as the configuration and the process are the same. In ROS2 the word “message” – when talking about the concept – has been replaced by “interface”. So, to create your … Read more

Build a ROS2 Data Pipeline With ROS2 Topics

In this tutorial I’ll show you how you can chain ROS2 topics and thus build a data pipeline through several nodes. This is a pretty common use case in robotics: you get some data from a sensor, and you need to pass it through several parts of your applications. Each part needs the data to … Read more

ros2 service Command Line Tool – Debug ROS2 Services

In this tutorial you’ll use the ros2 service command line tool to debug the services that you start from within your nodes – or nodes that already exist in your graph. As a reminder, a service has 2 sides: the server (unique), and the client (multiple clients possible). With topics, you can use ros2 topic … Read more

ros2 bag – Save and Replay Topic Data

In this tutorial you’ll learn how to use ROS2 bags, with the ros2 bag command line tool, in order to save and replay data from your ROS2 topics. >> Watch this video as an additional resource to this article: After watching the video, subscribe to the Robotics Back-End Youtube channel so you don’t miss the next tutorials! … Read more

Create a ROS2 package for Both Python and Cpp Nodes

In ROS2, when you create a package you have to select a build type: either ament_cmake or ament_python. This will determine whether your package is a Cpp package, or a Python package. But… How to do if you want to create a ROS2 package containing both Python nodes and Cpp nodes? Good news for you: … Read more