Capabilities2 0.3.0
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
capabilities2_runner::EnCapRunner< ActionT > Class Template Reference

encapsulated capability runner More...

#include "encap_runner.hpp"

Inheritance diagram for capabilities2_runner::EnCapRunner< ActionT >:
Inheritance graph
[legend]
Collaboration diagram for capabilities2_runner::EnCapRunner< ActionT >:
Collaboration graph
[legend]

Public Member Functions

 EnCapRunner ()
 
virtual void init_encapsulated_action (rclcpp::Node::SharedPtr node, const runner_opts &run_config, const std::string &action_name, std::function< void(Event &)> print)
 init encapsulated action
 
virtual void stop (const std::string &bond_id, const std::string &instance_id="") override
 stop the encapsulated action server
 
virtual void handle_goal (const rclcpp_action::GoalUUID &uuid, std::shared_ptr< const capabilities2_msgs::action::Capability::Goal > goal)
 handle encap action goal
 
virtual void handle_cancel (const std::shared_ptr< rclcpp_action::ServerGoalHandle< capabilities2_msgs::action::Capability > > goal_handle)
 handle encap action cancel goal
 
virtual void handle_accepted (const std::shared_ptr< rclcpp_action::ServerGoalHandle< capabilities2_msgs::action::Capability > > goal_handle)
 handle encap action accepted
 

Private Attributes

std::shared_ptr< rclcpp_action::Server< capabilities2_msgs::action::Capability > > encap_action_
 

Detailed Description

template<typename ActionT>
class capabilities2_runner::EnCapRunner< ActionT >

encapsulated capability runner

Create an action client to run an action based capability using an encapsulated capability action this allows a system to run an action that is not a managed action

Use the generate action, and generate result functions from the action runner to implement an encapsulation strategy for child classes

Constructor & Destructor Documentation

◆ EnCapRunner()

template<typename ActionT >
capabilities2_runner::EnCapRunner< ActionT >::EnCapRunner ( )
inline

Member Function Documentation

◆ handle_accepted()

template<typename ActionT >
virtual void capabilities2_runner::EnCapRunner< ActionT >::handle_accepted ( const std::shared_ptr< rclcpp_action::ServerGoalHandle< capabilities2_msgs::action::Capability > >  goal_handle)
virtual

handle encap action accepted

Parameters
goal_handle

◆ handle_cancel()

template<typename ActionT >
virtual void capabilities2_runner::EnCapRunner< ActionT >::handle_cancel ( const std::shared_ptr< rclcpp_action::ServerGoalHandle< capabilities2_msgs::action::Capability > >  goal_handle)
virtual

handle encap action cancel goal

Parameters
goal_handle

◆ handle_goal()

template<typename ActionT >
virtual void capabilities2_runner::EnCapRunner< ActionT >::handle_goal ( const rclcpp_action::GoalUUID &  uuid,
std::shared_ptr< const capabilities2_msgs::action::Capability::Goal >  goal 
)
virtual

handle encap action goal

Parameters
uuid
goal

◆ init_encapsulated_action()

template<typename ActionT >
virtual void capabilities2_runner::EnCapRunner< ActionT >::init_encapsulated_action ( rclcpp::Node::SharedPtr  node,
const runner_opts run_config,
const std::string &  action_name,
std::function< void(Event &)>  print 
)
inlinevirtual

init encapsulated action

call in start when inheriting from EncapRunner to initialize the encapsulated action server and the base action runner this is deferred since the action client topic name is not known at this level of abstraction

Parameters
nodeshared pointer to the capabilities node. Allows to use ros node related functionalities
run_configrunner configuration loaded from the yaml file
action_nameaction name used in the yaml file, used to load specific configuration from the run_config

◆ stop()

template<typename ActionT >
virtual void capabilities2_runner::EnCapRunner< ActionT >::stop ( const std::string &  bond_id,
const std::string &  instance_id = "" 
)
inlineoverridevirtual

stop the encapsulated action server

call the parent stop and stop the encapsulated action

Member Data Documentation

◆ encap_action_

template<typename ActionT >
std::shared_ptr<rclcpp_action::Server<capabilities2_msgs::action::Capability> > capabilities2_runner::EnCapRunner< ActionT >::encap_action_
private

encap action server


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