EasyFleet
A simple-by-default framework for multi-robot, multi-capability fleets built on ROS 2
Loading...
Searching...
No Matches
CapabilityFactoryFor< ActionServerT > Class Template Reference

Boilerplate-free CapabilityFactory for any Capability<ActionServerT>. More...

#include <capability_factory.hpp>

Inheritance diagram for CapabilityFactoryFor< ActionServerT >:
CapabilityFactory

Public Member Functions

std::shared_ptr< CapabilityNodeBasecreate (const std::string &capability_name, const rclcpp::NodeOptions &options) const override
 Constructs and returns one capability node instance ready for the caller to configure()/activate().

Additional Inherited Members

Public Types inherited from CapabilityFactory
using SharedPtr = std::shared_ptr<CapabilityFactory>
 Shared pointer to a CapabilityFactory.

Detailed Description

template<typename ActionServerT>
class easyfleet_core::CapabilityFactoryFor< ActionServerT >

Boilerplate-free CapabilityFactory for any Capability<ActionServerT>.

A concrete backend needs nothing beyond one line to become plugin-loadable – see the .cpp of any capability implementation for the matching PLUGINLIB_EXPORT_CLASS registration:

PLUGINLIB_EXPORT_CLASS(
Boilerplate-free CapabilityFactory for any Capability<ActionServerT>.
Definition capability_factory.hpp:73
Pluginlib base class for "a thing that can build a capability node byname".
Definition capability_factory.hpp:40

Member Function Documentation

◆ create()

template<typename ActionServerT>
std::shared_ptr< CapabilityNodeBase > create ( const std::string & capability_name,
const rclcpp::NodeOptions & options ) const
inlineoverridevirtual

Constructs and returns one capability node instance ready for the caller to configure()/activate().

Parameters
capability_namePassed straight through to Capability<T>'s own constructor – the node name, the action name, and the capability identity field published on /capabilities.
optionsNode options Robot::add_capability() has already stamped with this robot's namespace (see robot.hpp), plus whatever parameter overrides the caller supplied.
Returns
The newly constructed capability node, through its CapabilityNodeBase interface.

Implements CapabilityFactory.


The documentation for this class was generated from the following file: