Nav2 Navigation Stack - kilted  kilted
ROS 2 Navigation Stack
Public Member Functions | List of all members
nav2_route::TriggerEvent Class Reference

A route operation to trigger an event at a node or edge. This operation is meant to be named accordingly to the event of query in the parameter file (e.g. OpenDoor, CallElevator). Thus, a single TriggerEvent plugin type can support many different operation instances calling different services. It may be set up to either trigger a single service if the service_name is set in the parameter file at launch or trigger different services depending on the service_name set in the metadata of the node or edge operation given for centralized or decentralized events by node or edge. More...

#include <nav2_route/include/nav2_route/plugins/route_operations/trigger_event.hpp>

Inheritance diagram for nav2_route::TriggerEvent:
Inheritance graph
[legend]
Collaboration diagram for nav2_route::TriggerEvent:
Collaboration graph
[legend]

Public Member Functions

 TriggerEvent ()=default
 Constructor.
 
virtual ~TriggerEvent ()=default
 destructor
 
- Public Member Functions inherited from nav2_route::RouteOperationClient< std_srvs::srv::Trigger >
 RouteOperationClient ()=default
 Constructor.
 
virtual ~RouteOperationClient ()=default
 destructor
 
virtual void configureEvent (const rclcpp_lifecycle::LifecycleNode::SharedPtr, const std::string &)
 Configure client with any necessary parameters, etc. May change or reset main_srv_name_ variable to control main service name and existence.
 
virtual void populateRequest (std::shared_ptr< typename SrvT::Request >, const Metadata *)
 Populate request with details for service, if necessary.
 
virtual OperationResult processResponse (std::shared_ptr< typename SrvT::Response >)
 Process response from service to populate a result, if necessary.
 
- Public Member Functions inherited from nav2_route::RouteOperation
 RouteOperation ()=default
 Constructor.
 
virtual ~RouteOperation ()=default
 Destructor.
 

Additional Inherited Members

- Public Types inherited from nav2_route::RouteOperation
using Ptr = std::shared_ptr< nav2_route::RouteOperation >
 
- Protected Member Functions inherited from nav2_route::RouteOperationClient< std_srvs::srv::Trigger >
void configure (const rclcpp_lifecycle::LifecycleNode::SharedPtr node, std::shared_ptr< nav2_costmap_2d::CostmapSubscriber >, const std::string &name) final
 Configure.
 
OperationResult perform (NodePtr node_achieved, EdgePtr, EdgePtr, const Route &, const geometry_msgs::msg::PoseStamped &, const Metadata *mdata) final
 The main operation to call a service of arbitrary type and arbitrary name. More...
 
std::shared_ptr< typename SrvT::Response > callService (typename rclcpp::Client< std_srvs::srv::Trigger >::SharedPtr client, std::shared_ptr< typename SrvT::Request > req, const std::chrono::nanoseconds timeout=std::chrono::nanoseconds(500ms))
 
std::string getName () override
 Get name of the plugin for parameter scope mapping. More...
 
RouteOperationType processType () final
 Indication that the adjust speed limit route operation is performed on all state changes. More...
 
- Protected Attributes inherited from nav2_route::RouteOperationClient< std_srvs::srv::Trigger >
std::string name_
 
std::string main_srv_name_
 
std::atomic_bool reroute_
 
rclcpp::Logger logger_
 
rclcpp::Client< std_srvs::srv::Trigger >::SharedPtr main_client_
 
rclcpp_lifecycle::LifecycleNode::WeakPtr node_
 
rclcpp::CallbackGroup::SharedPtr callback_group_
 
rclcpp::executors::SingleThreadedExecutor callback_group_executor_
 

Detailed Description

A route operation to trigger an event at a node or edge. This operation is meant to be named accordingly to the event of query in the parameter file (e.g. OpenDoor, CallElevator). Thus, a single TriggerEvent plugin type can support many different operation instances calling different services. It may be set up to either trigger a single service if the service_name is set in the parameter file at launch or trigger different services depending on the service_name set in the metadata of the node or edge operation given for centralized or decentralized events by node or edge.

See the Route Operation Client for more details

Definition at line 45 of file trigger_event.hpp.


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