Nav2 Navigation Stack - kilted  kilted
ROS 2 Navigation Stack
Public Types | Public Member Functions | List of all members
nav2_route::EdgeCostFunction Class Referenceabstract

A plugin interface to score edges during graph search to modify the lowest cost path (e.g. by distance, maximum speed, regions prefer not to travel blocked by occupancy, or using arbitrarily defined user metadata stored in the edge and nodes of interest.) More...

#include <nav2_route/include/nav2_route/interfaces/edge_cost_function.hpp>

Inheritance diagram for nav2_route::EdgeCostFunction:
Inheritance graph
[legend]

Public Types

using Ptr = std::shared_ptr< nav2_route::EdgeCostFunction >
 

Public Member Functions

 EdgeCostFunction ()=default
 Constructor.
 
virtual ~EdgeCostFunction ()=default
 Virtual destructor.
 
virtual void configure (const rclcpp_lifecycle::LifecycleNode::SharedPtr node, const std::shared_ptr< tf2_ros::Buffer > tf_buffer, std::shared_ptr< nav2_costmap_2d::CostmapSubscriber > costmap_subscriber, const std::string &name)=0
 Configure the scorer, but do not store the node. More...
 
virtual bool score (const EdgePtr edge, const RouteRequest &route_request, const EdgeType &edge_type, float &cost)=0
 Main scoring plugin API. More...
 
virtual std::string getName ()=0
 Get name of the plugin for parameter scope mapping. More...
 
virtual void prepare ()
 Prepare for a new cycle, by resetting state, grabbing data to use for all immediate requests, or otherwise prepare for scoring.
 

Detailed Description

A plugin interface to score edges during graph search to modify the lowest cost path (e.g. by distance, maximum speed, regions prefer not to travel blocked by occupancy, or using arbitrarily defined user metadata stored in the edge and nodes of interest.)

Definition at line 39 of file edge_cost_function.hpp.

Member Function Documentation

◆ configure()

virtual void nav2_route::EdgeCostFunction::configure ( const rclcpp_lifecycle::LifecycleNode::SharedPtr  node,
const std::shared_ptr< tf2_ros::Buffer >  tf_buffer,
std::shared_ptr< nav2_costmap_2d::CostmapSubscriber costmap_subscriber,
const std::string &  name 
)
pure virtual

◆ getName()

virtual std::string nav2_route::EdgeCostFunction::getName ( )
pure virtual

◆ score()

virtual bool nav2_route::EdgeCostFunction::score ( const EdgePtr  edge,
const RouteRequest route_request,
const EdgeType &  edge_type,
float &  cost 
)
pure virtual

Main scoring plugin API.

Parameters
edgeThe edge pointer to score, which has access to the start/end nodes and their associated metadata and actions

Implemented in nav2_route::TimeScorer, nav2_route::StartPoseOrientationScorer, nav2_route::SemanticScorer, nav2_route::PenaltyScorer, nav2_route::GoalOrientationScorer, nav2_route::DynamicEdgesScorer, nav2_route::DistanceScorer, and nav2_route::CostmapScorer.


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