pluginlib
pluginlib copied to clipboard
Boilerplate Example for ROS2
Is there a simple boilerplate example of creating and using pluginlib in ROS2? I think this would help everyone in various ROS2 migrations. I know MoveIt! is full of pluginlib usage and we need more documentation on how to use it around ament.
@davetcoleman I know this is ancient and you've probably figured it out by now, but here's some examples from navigation2 I've made
https://github.com/ros-planning/navigation2/tree/master/nav2_navfn_planner
That is a planning plugin, see Cmakelists for the magic you need for that, otherwise it looks more or less as you'd expect in ROS1.
https://github.com/ros-planning/navigation2/blob/master/nav2_planner/src/planner_server.cpp
That is the action server hosting said plugin, its an incredibly simple server so its a good example of both pluginlib and action servers in ROS2
Does that meet the scope of your wants?
You can also take a look at pluginlib usage in rosbag2, like the storage or converter plugin setup:
- https://github.com/ros2/rosbag2/tree/master/rosbag2_storage_default_plugins
- https://github.com/ros2/rosbag2/tree/master/rosbag2_converter_default_plugins