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.
platooning_tactical_plugin_config.h
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
25{
26 double trajectory_time_length = 6.0; // Trajectory length in seconds
27 double curve_resample_step_size = 1.0; // Curve re-sampling step size in m
28 int default_downsample_ratio = 36.0; // Amount to downsample input lanelet centerline data.
29 int turn_downsample_ratio = 20.0; // Amount to downsample input lanelet centerline data if the lanelet is marked as a turn
30 // Corresponds to saving each nth point.
31 double minimum_speed = 2.2352; // Minimum allowable speed in m/s
32 double max_accel = 3; // Maximum allowable longitudinal acceleration in m/s^2
33 double max_accel_multiplier = 0.85; // Multiplier of max_accel to bring the value under max_accel
34 double lat_accel_multiplier = 0.50; // Multiplier of lat_accel to bring the value under lat_accel TODO: needs to be tuned
35 double lateral_accel_limit = 2.5; // Maximum allowable lateral acceleration m/s^2
36 int speed_moving_average_window_size = 5; // Size of the window used in the moving average filter to smooth both the speed profile
37 int curvature_moving_average_window_size = 9; // Size of the window used in the moving average filter to smooth the curvature profile
38 // computed curvature and output speeds
39 double back_distance = 20; // Number of meters behind the first maneuver that need to be included in points for curvature calculation
40 bool enable_object_avoidance = true; // Activate object avoidance logic
41 bool publish_debug = false; // True if debug publishing will be enabled
43 std::string desired_controller_plugin = "platoon_control";
44
45 friend std::ostream& operator<<(std::ostream& output, const PlatooningTacticalPluginConfig& c)
46 {
47 output << "PlatooningTacticalPluginConfig { " << std::endl
48 << "trajectory_time_length: " << c.trajectory_time_length << std::endl
49 << "curve_resample_step_size: " << c.curve_resample_step_size << std::endl
50 << "default_downsample_ratio: " << c.default_downsample_ratio << std::endl
51 << "turn_downsample_ratio: " << c.turn_downsample_ratio << std::endl
52 << "minimum_speed: " << c.minimum_speed << std::endl
53 << "max_accel: " << c.max_accel << std::endl
54 << "max_accel_multiplier: " << c.max_accel_multiplier << std::endl
55 << "lat_accel_multiplier: " << c.lat_accel_multiplier << std::endl
56 << "lateral_accel_limit: " << c.lateral_accel_limit << std::endl
57 << "speed_moving_average_window_size: " << c.speed_moving_average_window_size << std::endl
58 << "curvature_moving_average_window_size: " << c.curvature_moving_average_window_size << std::endl
59 << "back_distance: " << c.back_distance << std::endl
60 << "enable_object_avoidance: " << c.enable_object_avoidance << std::endl
61 << "publish_debug: " << c.publish_debug << std::endl
62 << "buffer_ending_downtrack: " << c.buffer_ending_downtrack << std::endl
63 << "desired_controller_plugin: " << c.desired_controller_plugin << std::endl
64 << "}" << std::endl;
65 return output;
66 }
67};
Stuct containing the algorithm configuration values for the PlatooningTacticalPlugin.
friend std::ostream & operator<<(std::ostream &output, const PlatooningTacticalPluginConfig &c)