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

The one concrete RunningCapabilityBase implementation, parameterized by the actual action type a given capability type is run with. More...

#include <running_capability.hpp>

Inheritance diagram for RunningCapability< ActionT >:
RunningCapabilityBase

Public Types

using Client = easyfleet_core::CapabilityClient<ActionT>
 The CapabilityClient<ActionT> specialization this instance wraps.

Public Member Functions

 RunningCapability (rclcpp::Node &node, const std::string &action_name, std::string robot_name, std::string capability_type, easyfleet_mission_manager::StatusMarkerPublisher &status)
void run (const typename ActionT::Goal &goal, std::chrono::seconds timeout)
 Sends goal and starts tracking it.
void stop () override
 Asks the in-flight goal, if any, to stop.
easyfleet::CapabilityState state () const override
void check_timeout () override
 Called periodically (from FleetSession::spin_some()) so a timeout passed to run() actually gets enforced without blocking the caller.

Detailed Description

template<typename ActionT>
class easyfleet_mission_manager::detail::RunningCapability< ActionT >

The one concrete RunningCapabilityBase implementation, parameterized by the actual action type a given capability type is run with.

Constructor & Destructor Documentation

◆ RunningCapability()

template<typename ActionT>
RunningCapability ( rclcpp::Node & node,
const std::string & action_name,
std::string robot_name,
std::string capability_type,
easyfleet_mission_manager::StatusMarkerPublisher & status )
inline
Parameters
nodeNode the underlying CapabilityClient is created on.
action_nameResolved action name to call (e.g. "/robot_1/navigation").
robot_nameRobot identity the status marker is shown above.
capability_typeCapability type, for status/log lines (e.g. "navigation").
statusStatus marker publisher run() publishes through.

Member Function Documentation

◆ check_timeout()

template<typename ActionT>
void check_timeout ( )
inlineoverridevirtual

Called periodically (from FleetSession::spin_some()) so a timeout passed to run() actually gets enforced without blocking the caller.

Implements RunningCapabilityBase.

◆ run()

template<typename ActionT>
void run ( const typename ActionT::Goal & goal,
std::chrono::seconds timeout )
inline

Sends goal and starts tracking it.

Parameters
goalGoal to send, fully typed – built by hand or via one of mission_helpers.hpp's make_*_goal() convenience overloads.
timeoutStop the goal if it hasn't finished on its own within this long, enforced by check_timeout().

◆ state()

template<typename ActionT>
easyfleet::CapabilityState state ( ) const
inlineoverridevirtual
Returns
Current state, per the last run()/its outcome.

Implements RunningCapabilityBase.

◆ stop()

template<typename ActionT>
void stop ( )
inlineoverridevirtual

Asks the in-flight goal, if any, to stop.

Implements RunningCapabilityBase.


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