Is it possible to create a "generic subscription" in ROS2 Foxy
Hello,
I'm using rclcpp
with ROS2 Foxy and I need to create a generic ROS2 Foxy subscriber whose type is available only at runtime.
I can use get_topic_names_and_types
to extract the topic type from the known topic name, but it is not possible to use it with templates to call the create_subscription
function.
Is there a way to perform this operation in C++?
This may help #q359681
OK, I found a generic subscription class in rosbag2: https://github.com/ros2/rosbag2/tree/...
Glad you made it work.