Carma-platform v4.2.0
CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication.
arbitrator::CostFunction Class Referenceabstract

Generic interface representing a means of computing cost for plans in the search graph. More...

#include <cost_function.hpp>

Inheritance diagram for arbitrator::CostFunction:
Inheritance graph
Collaboration diagram for arbitrator::CostFunction:
Collaboration graph

Public Member Functions

virtual double compute_total_cost (const carma_planning_msgs::msg::ManeuverPlan &plan)=0
 Compute the cost of a given maneuver plan. More...
 
virtual double compute_cost_per_unit_distance (const carma_planning_msgs::msg::ManeuverPlan &plan)=0
 Compute the unit cost over distance of a given maneuver plan. More...
 
virtual ~CostFunction ()
 Virtual destructor provided for memory safety. More...
 

Detailed Description

Generic interface representing a means of computing cost for plans in the search graph.

Definition at line 29 of file cost_function.hpp.

Constructor & Destructor Documentation

◆ ~CostFunction()

virtual arbitrator::CostFunction::~CostFunction ( )
inlinevirtual

Virtual destructor provided for memory safety.

Definition at line 49 of file cost_function.hpp.

49{};

Member Function Documentation

◆ compute_cost_per_unit_distance()

virtual double arbitrator::CostFunction::compute_cost_per_unit_distance ( const carma_planning_msgs::msg::ManeuverPlan &  plan)
pure virtual

Compute the unit cost over distance of a given maneuver plan.

Parameters
planThe plan to evaluate
Returns
double The total cost divided by the total distance of the plan

Implemented in arbitrator::CostSystemCostFunction, and arbitrator::FixedPriorityCostFunction.

◆ compute_total_cost()

virtual double arbitrator::CostFunction::compute_total_cost ( const carma_planning_msgs::msg::ManeuverPlan &  plan)
pure virtual

Compute the cost of a given maneuver plan.

Parameters
planThe plan to evaluate
Returns
double The total cost

Implemented in arbitrator::CostSystemCostFunction, and arbitrator::FixedPriorityCostFunction.


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