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.
basic_autonomy.cpp File Reference
Include dependency graph for basic_autonomy.cpp:

Go to the source code of this file.

Namespaces

namespace  basic_autonomy
 
namespace  basic_autonomy::waypoint_generation
 

Functions

std::vector< PointSpeedPair > basic_autonomy::waypoint_generation::create_geometry_profile (const std::vector< carma_planning_msgs::msg::Maneuver > &maneuvers, double max_starting_downtrack, const carma_wm::WorldModelConstPtr &wm, carma_planning_msgs::msg::VehicleState &ending_state_before_buffer, const carma_planning_msgs::msg::VehicleState &state, const GeneralTrajConfig &general_config, const DetailedTrajConfig &detailed_config)
 Creates geometry profile to return a point speed pair struct for LANE FOLLOW and LANE CHANGE maneuver types. More...
 
std::vector< PointSpeedPair > basic_autonomy::waypoint_generation::create_lanefollow_geometry (const carma_planning_msgs::msg::Maneuver &maneuver, double max_starting_downtrack, const carma_wm::WorldModelConstPtr &wm, const GeneralTrajConfig &general_config, const DetailedTrajConfig &detailed_config, std::unordered_set< lanelet::Id > &visited_lanelets)
 Converts a set of requested LANE_FOLLOWING maneuvers to point speed limit pairs. More...
 
std::vector< PointSpeedPair > basic_autonomy::waypoint_generation::add_lanefollow_buffer (const carma_wm::WorldModelConstPtr &wm, std::vector< PointSpeedPair > &points_and_target_speeds, const std::vector< carma_planning_msgs::msg::Maneuver > &maneuvers, carma_planning_msgs::msg::VehicleState &ending_state_before_buffer, const DetailedTrajConfig &detailed_config)
 Adds extra centerline points beyond required message length to lane follow maneuver points so that there's always enough points to calculate trajectory (BUFFER POINTS SHOULD BE REMOVED BEFORE RETURNING FINAL TRAJECTORY) More...
 
std::vector< lanelet::BasicPoint2d > basic_autonomy::waypoint_generation::create_lanechange_geometry (lanelet::Id starting_lane_id, lanelet::Id ending_lane_id, double starting_downtrack, double ending_downtrack, const carma_wm::WorldModelConstPtr &wm, int downsample_ratio, double buffer_ending_downtrack)
 Creates a vector of lane change points using parameters defined. More...
 
std::vector< std::vector< lanelet::BasicPoint2d > > basic_autonomy::waypoint_generation::resample_linestring_pair_to_same_size (std::vector< lanelet::BasicPoint2d > &line_1, std::vector< lanelet::BasicPoint2d > &line_2)
 Resamples a pair of basicpoint2d lines to get lines of same number of points. More...
 
std::vector< PointSpeedPair > basic_autonomy::waypoint_generation::get_lanechange_points_from_maneuver (const carma_planning_msgs::msg::Maneuver &maneuver, double max_starting_downtrack, const carma_wm::WorldModelConstPtr &wm, carma_planning_msgs::msg::VehicleState &ending_state_before_buffer, const carma_planning_msgs::msg::VehicleState &state, const GeneralTrajConfig &general_config, const DetailedTrajConfig &detailed_config)
 Converts a set of requested LANE_CHANGE maneuvers to point speed limit pairs. More...
 
std::vector< double > basic_autonomy::waypoint_generation::apply_speed_limits (const std::vector< double > speeds, const std::vector< double > speed_limits)
 Applies the provided speed limits to the provided speeds such that each element is capped at its corresponding speed limit if needed. More...
 
Eigen::Isometry2d basic_autonomy::waypoint_generation::compute_heading_frame (const lanelet::BasicPoint2d &p1, const lanelet::BasicPoint2d &p2)
 Returns a 2D coordinate frame which is located at p1 and oriented so p2 lies on the +X axis. More...
 
std::vector< PointSpeedPair > basic_autonomy::waypoint_generation::constrain_to_time_boundary (const std::vector< PointSpeedPair > &points, double time_span)
 Reduces the input points to only those points that fit within the provided time boundary. More...
 
std::pair< double, size_t > basic_autonomy::waypoint_generation::min_with_exclusions (const std::vector< double > &values, const std::unordered_set< size_t > &excluded)
 Returns the min, and its idx, from the vector of values, excluding given set of values. More...
 
std::vector< double > basic_autonomy::waypoint_generation::optimize_speed (const std::vector< double > &downtracks, const std::vector< double > &curv_speeds, double accel_limit)
 Applies the longitudinal acceleration limit to each point's speed. More...
 
std::vector< carma_planning_msgs::msg::TrajectoryPlanPoint > basic_autonomy::waypoint_generation::trajectory_from_points_times_orientations (const std::vector< lanelet::BasicPoint2d > &points, const std::vector< double > &times, const std::vector< double > &yaws, rclcpp::Time startTime, const std::string &desired_controller_plugin)
 Method combines input points, times, orientations, and an absolute start time to form a valid carma platform trajectory. More...
 
std::vector< PointSpeedPair > basic_autonomy::waypoint_generation::attach_past_points (const std::vector< PointSpeedPair > &points_set, std::vector< PointSpeedPair > future_points, const int nearest_pt_index, double back_distance)
 Attaches back_distance length of points behind the future points. More...
 
std::unique_ptr< basic_autonomy::smoothing::SplineIbasic_autonomy::waypoint_generation::compute_fit (const std::vector< lanelet::BasicPoint2d > &basic_points)
 Computes a spline based on the provided points. More...
 
double basic_autonomy::waypoint_generation::compute_curvature_at (const basic_autonomy::smoothing::SplineI &fit_curve, double step_along_the_curve)
 Given the curvature fit, computes the curvature at the given step along the curve. More...
 
std::vector< carma_planning_msgs::msg::TrajectoryPlanPoint > basic_autonomy::waypoint_generation::compose_lanefollow_trajectory_from_path (const std::vector< PointSpeedPair > &points, const carma_planning_msgs::msg::VehicleState &state, const rclcpp::Time &state_time, const carma_wm::WorldModelConstPtr &wm, const carma_planning_msgs::msg::VehicleState &ending_state_before_buffer, carma_debug_ros2_msgs::msg::TrajectoryCurvatureSpeeds &debug_msg, const DetailedTrajConfig &detailed_config)
 Method converts a list of lanelet centerline points and current vehicle state into a usable list of trajectory points for trajectory planning for a Lane following maneuver. More...
 
DetailedTrajConfig basic_autonomy::waypoint_generation::compose_detailed_trajectory_config (double trajectory_time_length, double curve_resample_step_size, double minimum_speed, double max_accel, double lateral_accel_limit, int speed_moving_average_window_size, int curvature_moving_average_window_size, double back_distance, double buffer_ending_downtrack, std::string desired_controller_plugin="default")
 
GeneralTrajConfig basic_autonomy::waypoint_generation::compose_general_trajectory_config (const std::string &trajectory_type, int default_downsample_ratio, int turn_downsample_ratio)
 
std::vector< carma_planning_msgs::msg::TrajectoryPlanPoint > basic_autonomy::waypoint_generation::compose_lanechange_trajectory_from_path (const std::vector< PointSpeedPair > &points, const carma_planning_msgs::msg::VehicleState &state, const rclcpp::Time &state_time, const carma_wm::WorldModelConstPtr &wm, const carma_planning_msgs::msg::VehicleState &ending_state_before_buffer, const DetailedTrajConfig &detailed_config)
 Method converts a list of lanelet centerline points and current vehicle state into a usable list of trajectory points for trajectory planning for a Lane following maneuver. More...
 
autoware_auto_msgs::msg::Trajectory basic_autonomy::waypoint_generation::process_trajectory_plan (const carma_planning_msgs::msg::TrajectoryPlan &tp, double vehicle_response_lag)
 Given a carma type of trajectory_plan, generate autoware type of trajectory accounting for speed_lag and stopping case Generated trajectory is meant to be used in autoware.auto's pure_pursuit library using set_trajectory() function. More...
 
std::vector< double > basic_autonomy::waypoint_generation::apply_response_lag (const std::vector< double > &speeds, const std::vector< double > downtracks, double response_lag)
 Applies a specified response lag in seconds to the trajectory shifting the whole thing by the specified lag time. More...
 
bool basic_autonomy::waypoint_generation::is_valid_yield_plan (const std::shared_ptr< carma_ros2_utils::CarmaLifecycleNode > &node_handler, const carma_planning_msgs::msg::TrajectoryPlan &yield_plan)
 Helper function to verify if the input yield trajectory plan is valid. More...
 
carma_planning_msgs::srv::PlanTrajectory::Response::SharedPtr basic_autonomy::waypoint_generation::modify_trajectory_to_yield_to_obstacles (const std::shared_ptr< carma_ros2_utils::CarmaLifecycleNode > &node_handler, const carma_planning_msgs::srv::PlanTrajectory::Request::SharedPtr &req, const carma_planning_msgs::srv::PlanTrajectory::Response::SharedPtr &resp, const carma_ros2_utils::ClientPtr< carma_planning_msgs::srv::PlanTrajectory > &yield_client, int yield_plugin_service_call_timeout)
 Applies a yield trajectory to the original trajectory set in response. More...