ROS2 C based dynamic typesupport example?

Here we go. This repository contains code that uses dynamic type introspection to translate messages between the in-memory representation and a YAML representation. It can go both directions, and all it requires is that you provide the compiled shared library that contains the type support for the messages you want to deal with. For message types distributed with ROS these libraries are already provided. The functions in this code should show you how to dynamically manage types. Feel free to ask if there’s something you don’t understand.

It doesn’t do services or actions (yet), but the principle is the same since each part of a service or action is just a message.

5 Likes