[This is a cross-post from ROS answers on request from the ROS Answers Administrator]
I’m pretty new to ROS and still a bit overwhelmed I’m studying the options for a successor of rosprolog for ros2. Based on the rclpy code is wasn’t that hard to use rcl and rmw and get the library initialized and a node created. Somewhat harder was to subscribe to a topic. Eventually I managed to figure out I could dynamically load the C based .so file that defines the messages for a package, find the right function and call it to get the
rosidl_message_type_support_t instance. So far so good.
The next challenge is to actually assemble or decompose a message. I think the rosidl API dealing with dynamic message (de) serialization is the most appropriate approach. As a dynamically typed language the extra overhead of walking over the types using runtime switches is probably smaller than the cost to convert the raw byte data into the format using inside Prolog anyway.
So, I’m trying to get my head around using dynamic type support to walk over a message and create a message. I have a hard time figuring out where to start though It seems hard to find an example
Can anyone point at an example or describe the general idea to walk over a message?
Thanks — Jan