ROS2 C based dynamic typesupport example?
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
This is a good ROS Answers question, but seeing as there have been / still are some discussions about client library development in ROS 2 on ROS Discourse, you may want to take a look there as well and see whether you could draw some attention to your question here by posting in those threads.
Be sure to mention you've already posted on ROS Answers though, otherwise you may run the risk of being "reprimanded".
Post on ROS Discourse: ROS2 C based dynamic typesupport example?.
@Jan Wielemaker: if you post somewhere else, please always post a comment with the link to that "somewhere else" here, so we can keep things connected.
I planned to. As I don't have enough brownie points to to avoid the moderator I didn't have a link immediately and forgot after. Sorry. Thanks for linking the two.
I don't see any post by you held up in moderation?