|
Nav2 Navigation Stack - rolling
main
ROS 2 Navigation Stack
|
Manages operations plugins to call on route tracking. More...
#include <nav2_route/include/nav2_route/operations_manager.hpp>
Public Types | |
| typedef std::vector< RouteOperation::Ptr >::const_iterator | OperationsIter |
Public Member Functions | |
| OperationsManager (nav2::LifecycleNode::SharedPtr node, std::shared_ptr< nav2_costmap_2d::CostmapSubscriber > costmap_subscriber) | |
| A constructor for nav2_route::OperationsManager. | |
| ~OperationsManager ()=default | |
| A Destructor for nav2_route::OperationsManager. | |
| OperationPtrs | findGraphOperations (const NodePtr node, const EdgePtr edge_enter, const EdgePtr edge_exit) |
| Finds the set of operations stored in the graph to trigger at this transition. More... | |
| template<typename T > | |
| void | findGraphOperationsToProcess (T &obj, const OperationTrigger &trigger, OperationPtrs &operations) |
| Finds the set of operations stored in graph objects, by event. More... | |
| void | updateResult (const std::string &name, const OperationResult &op_result, OperationsResult &result) |
| Updates manager result state by an individual operation's result. More... | |
| OperationsResult | process (const bool status_change, const RouteTrackingState &state, const Route &route, const geometry_msgs::msg::PoseStamped &pose, const ReroutingState &rerouting_info) |
| Processes the operations at this tracker state. More... | |
Protected Member Functions | |
| void | processOperationsPluginVector (const std::vector< RouteOperation::Ptr > &operations, OperationsResult &result, const NodePtr node, const EdgePtr edge_entered, const EdgePtr edge_exited, const Route &route, const geometry_msgs::msg::PoseStamped &pose) |
| Processes a vector of operations plugins, by trigger. More... | |
Protected Attributes | |
| pluginlib::ClassLoader< RouteOperation > | plugin_loader_ |
| std::unordered_map< std::string, RouteOperation::Ptr > | graph_operations_ |
| std::vector< RouteOperation::Ptr > | change_operations_ |
| std::vector< RouteOperation::Ptr > | query_operations_ |
| rclcpp::Logger | logger_ {rclcpp::get_logger("OperationsManager")} |
Manages operations plugins to call on route tracking.
Definition at line 39 of file operations_manager.hpp.
| OperationPtrs nav2_route::OperationsManager::findGraphOperations | ( | const NodePtr | node, |
| const EdgePtr | edge_enter, | ||
| const EdgePtr | edge_exit | ||
| ) |
Finds the set of operations stored in the graph to trigger at this transition.
| node | Node to check |
| edge_entered | Edge entered to check for ON_ENTER events |
| edge_exit | Edge exit to check for ON_EXIT events |
Definition at line 91 of file operations_manager.cpp.
References findGraphOperationsToProcess().
Referenced by process().


| void nav2_route::OperationsManager::findGraphOperationsToProcess | ( | T & | obj, |
| const OperationTrigger & | trigger, | ||
| OperationPtrs & | operations | ||
| ) |
Finds the set of operations stored in graph objects, by event.
| node | op_vec Operations vector to check |
| trigger | Trigger for which operations in op_vec should be included |
| operations | Output vector populated with relevant operations |
Definition at line 75 of file operations_manager.cpp.
Referenced by findGraphOperations().

| OperationsResult nav2_route::OperationsManager::process | ( | const bool | status_change, |
| const RouteTrackingState & | state, | ||
| const Route & | route, | ||
| const geometry_msgs::msg::PoseStamped & | pose, | ||
| const ReroutingState & | rerouting_info | ||
| ) |
Processes the operations at this tracker state.
| status_change | Whether something meaningful has changed |
| state | The route tracking state to check for state info |
| route | The raw route being tracked |
| pose | robot pose |
| rerouting_info | Rerouting information regarding previous partial state |
Definition at line 126 of file operations_manager.cpp.
References findGraphOperations(), processOperationsPluginVector(), and updateResult().

|
protected |
Processes a vector of operations plugins, by trigger.
| operations | Operations to trigger |
| Results | to populate from operations |
Definition at line 110 of file operations_manager.cpp.
References updateResult().
Referenced by process().


| void nav2_route::OperationsManager::updateResult | ( | const std::string & | name, |
| const OperationResult & | op_result, | ||
| OperationsResult & | result | ||
| ) |
Updates manager result state by an individual operation's result.
| name | Operations' name |
| op_result | Operations' result |
| result | Manager's result to update |
Definition at line 101 of file operations_manager.cpp.
Referenced by process(), and processOperationsPluginVector().
