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.
helper_functions.cpp File Reference
#include <algorithm>
#include <basic_autonomy/helper_functions.hpp>
Include dependency graph for helper_functions.cpp:

Go to the source code of this file.

Namespaces

namespace  basic_autonomy
 
namespace  basic_autonomy::waypoint_generation
 

Functions

int basic_autonomy::waypoint_generation::get_nearest_point_index (const std::vector< lanelet::BasicPoint2d > &points, const carma_planning_msgs::msg::VehicleState &state)
 Returns the nearest point (in terms of cartesian 2d distance) to the provided vehicle pose in the provided l. More...
 
int basic_autonomy::waypoint_generation::get_nearest_point_index (const std::vector< PointSpeedPair > &points, const carma_planning_msgs::msg::VehicleState &state)
 Returns the nearest point (in terms of cartesian 2d distance) to the provided vehicle pose in the provided list. More...
 
int basic_autonomy::waypoint_generation::get_nearest_index_by_downtrack (const std::vector< lanelet::BasicPoint2d > &points, const carma_wm::WorldModelConstPtr &wm, double target_downtrack)
 Returns the nearest "less than" point to the provided vehicle pose in the provided list by utilizing the downtrack measured along the route NOTE: This function compares the downtrack, provided by routeTrackPos, of each points in the list to get the closest one to the given point's downtrack. Therefore, it is rather costlier method than comparing cartesian distance between the points and getting the closest. This way, however, the function correctly returns the end point's index if the given state, despite being valid, is farther than the given points and can technically be near any of them. More...
 
void basic_autonomy::waypoint_generation::split_point_speed_pairs (const std::vector< PointSpeedPair > &points, std::vector< lanelet::BasicPoint2d > *basic_points, std::vector< double > *speeds)
 Helper method to split a list of PointSpeedPair into separate point and speed lists. More...
 
int basic_autonomy::waypoint_generation::get_nearest_index_by_downtrack (const std::vector< PointSpeedPair > &points, const carma_wm::WorldModelConstPtr &wm, const carma_planning_msgs::msg::VehicleState &state)
 Overload: Returns the nearest point to the provided vehicle pose in the provided list by utilizing the downtrack measured along the route NOTE: This function compares the downtrack, provided by routeTrackPos, of each points in the list to get the closest one to the given point's downtrack. Therefore, it is rather costlier method than comparing cartesian distance between the points and getting the closest. This way, however, the function correctly returns the end point's index if the given state, despite being valid, is farther than the given points and can technically be near any of them. More...
 
int basic_autonomy::waypoint_generation::get_nearest_index_by_downtrack (const std::vector< lanelet::BasicPoint2d > &points, const carma_wm::WorldModelConstPtr &wm, const carma_planning_msgs::msg::VehicleState &state)
 Overload: Returns the nearest point to the provided vehicle pose in the provided list by utilizing the downtrack measured along the route NOTE: This function compares the downtrack, provided by routeTrackPos, of each points in the list to get the closest one to the given point's downtrack. Therefore, it is rather costlier method than comparing cartesian distance between the points and getting the closest. This way, however, the function correctly returns the end point if the given state, despite being valid, is farther than the given points and can technically be near any of them. More...