|
EasyFleet
A simple-by-default framework for multi-robot, multi-capability fleets built on ROS 2
|
Pluginlib base class for "a thing that can build a capability node by name". More...
#include <capability_factory.hpp>
Public Types | |
| using | SharedPtr = std::shared_ptr<CapabilityFactory> |
| Shared pointer to a CapabilityFactory. | |
Public Member Functions | |
| virtual std::shared_ptr< CapabilityNodeBase > | create (const std::string &capability_name, const rclcpp::NodeOptions &options) const =0 |
| Constructs and returns one capability node instance ready for the caller to configure()/activate(). | |
Pluginlib base class for "a thing that can build a capability node by name".
Not itself default-constructible-and-ready like a typical pluginlib strategy plugin, because Capability<ActionServerT> is a real rclcpp_lifecycle::LifecycleNode and its base class needs a name at construction time, not after – so instead of loading the capability node itself through pluginlib (which would force it to become default-constructible, breaking every existing use of Capability<T>), pluginlib loads this small, genuinely-default-constructible factory object, and the factory does the eager construction on Robot's behalf.
|
pure virtual |
Constructs and returns one capability node instance ready for the caller to configure()/activate().
| capability_name | Passed straight through to Capability<T>'s own constructor – the node name, the action name, and the capability identity field published on /capabilities. |
| options | Node options Robot::add_capability() has already stamped with this robot's namespace (see robot.hpp), plus whatever parameter overrides the caller supplied. |
Implemented in CapabilityFactoryFor< ActionServerT >, CapabilityFactoryFor< ManipulationFakeActionServer >, and CapabilityFactoryFor< PerceptionFakeActionServer >.