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.
cooperative_lanechange_config.hpp
Go to the documentation of this file.
1#pragma once
2
3/*
4 * Copyright (C) 2022 LEIDOS.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
7 * use this file except in compliance with the License. You may obtain a copy of
8 * the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15 * License for the specific language governing permissions and limitations under
16 * the License.
17 */
18
19#include <iostream>
20#include <vector>
21
23{
24
28 struct Config
29 {
31 std::string control_plugin_name = "pure_pursuit";
32 double minimum_speed = 2.2352;
33 double max_accel = 1.5;
38 double lateral_accel_limit = 1.5;
43 double destination_range = 0.0;
44 double lanechange_time_out = 6.0;
45 double min_timestep = 0.1;
47 double starting_fraction = 0.2;
48 double mid_fraction = 0.5;
49 double min_desired_gap = 5.0;
50 double desired_time_gap = 3.0;
53 double back_distance = 0.0;
55 std::string vehicle_id = "DEFAULT_VEHICLE_ID";
56
57 // Stream operator for this config
58 friend std::ostream &operator<<(std::ostream &output, const Config &c)
59 {
60 output << "cooperative_lanechange::Config { " << std::endl
61 << "trajectory_time_length: " << c.trajectory_time_length << std::endl
62 << "control_plugin_name: " << c.control_plugin_name << std::endl
63 << "minimum_speed: " << c.minimum_speed << std::endl
64 << "max_accel: " << c.max_accel << std::endl
65 << "minimum_lookahead_distance: " << c.minimum_lookahead_distance << std::endl
66 << "maximum_lookahead_distance: " << c.maximum_lookahead_distance << std::endl
67 << "minimum_lookahead_speed: " << c.minimum_lookahead_speed << std::endl
68 << "maximum_lookahead_speed: " << c.maximum_lookahead_speed << std::endl
69 << "lateral_accel_limit: " << c.lateral_accel_limit << std::endl
70 << "speed_moving_average_window_size: " << c.speed_moving_average_window_size << std::endl
71 << "curvature_moving_average_window_size: " << c.curvature_moving_average_window_size << std::endl
72 << "curvature_calc_lookahead_count: " << c.curvature_calc_lookahead_count << std::endl
73 << "downsample_ratio: " << c.downsample_ratio << std::endl
74 << "destination_range: " << c.destination_range << std::endl
75 << "lanechange_time_out: " << c.lanechange_time_out << std::endl
76 << "min_timestep: " << c.min_timestep << std::endl
77 << "starting_downtrack_range: " << c.starting_downtrack_range << std::endl
78 << "starting_fraction: " << c.starting_fraction << std::endl
79 << "mid_fraction: " << c.mid_fraction << std::endl
80 << "min_desired_gap: " << c.min_desired_gap << std::endl
81 << "desired_time_gap: " << c.desired_time_gap << std::endl
82 << "turn_downsample_ratio: " << c.turn_downsample_ratio << std::endl
83 << "curve_resample_step_size: " << c.curve_resample_step_size << std::endl
84 << "back_distance: " << c.back_distance << std::endl
85 << "buffer_ending_downtrack: " << c.buffer_ending_downtrack << std::endl
86 << "vehicle_id: " << c.vehicle_id << std::endl
87 << "}" << std::endl;
88 return output;
89 }
90 };
91
92} // cooperative_lanechange
Stuct containing the algorithm configuration values for cooperative_lanechange.
friend std::ostream & operator<<(std::ostream &output, const Config &c)