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.
motion_computation_config.hpp
Go to the documentation of this file.
1// Copyright 2020-2023 Leidos
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef MOTION_COMPUTATION__MOTION_COMPUTATION_CONFIG_HPP_
16#define MOTION_COMPUTATION__MOTION_COMPUTATION_CONFIG_HPP_
17
18#include <iostream>
19#include <vector>
20
21namespace motion_computation
22{
26struct Config
27{
28 double prediction_time_step = 0.1; // Time between predicted states (in seconds)
30 0.1; // Time between received mobility path predicted states (in seconds)
31 double prediction_period = 2.0; // Period of prediction (in seconds)
32 double cv_x_accel_noise = 9.0; // CV Model X-Axis Acceleration Noise
33 double cv_y_accel_noise = 9.0; // CV Model Y-Axis Acceleration Noise
34 double prediction_process_noise_max = 1000.0; // Maximum expected process noise; used for mapping
35 // noise to confidence in [0,1] range
37 0.95; // Percentage of initial confidence to propagate to next time step
38
39 // If true then BSM messages will be converted to ExternalObjects.
40 // If other object sources are enabled, they will be synchronized but no fusion
41 // will occur (objects may be duplicated)
43
44 // If true then PSM messages will be converted to ExternalObjects.
45 // If other object sources are enabled, they will be synchronized but no fusion
46 // will occur (objects may be duplicated)
48
49 // If true then MobilityPath messages will be converted to ExternalObjects.
50 // If other object sources are enabled, they will be synchronized but no fusion
51 // will occur (objects may be duplicated)
53
54 // If true then ExternalObjects generated from sensor data will be processed.
55 // If other object sources are enabled, they will be synchronized but no fusion
56 // will occur (objects may be duplicated)
58
59 // True if CTRV motion model should be used for the object type.
60 // False, if CV should be used for all following booleans
66
67 // Stream operator for this config
68 friend std::ostream & operator<<(std::ostream & output, const Config & c)
69 {
70 output << "motion_computation::Config { " << std::endl
71 << "prediction_time_step: " << c.prediction_time_step << std::endl
72 << "mobility_path_time_step: " << c.mobility_path_time_step << std::endl
73 << "prediction_period: " << c.prediction_period << std::endl
74 << "cv_x_accel_noise: " << c.cv_x_accel_noise << std::endl
75 << "cv_y_accel_noise: " << c.cv_y_accel_noise << std::endl
76 << "prediction_process_noise_max: " << c.prediction_process_noise_max << std::endl
77 << "prediction_confidence_drop_rate: " << c.prediction_confidence_drop_rate << std::endl
78 << "enable_bsm_processing: " << c.enable_bsm_processing << std::endl
79 << "enable_psm_processing: " << c.enable_psm_processing << std::endl
80 << "enable_mobility_path_processing: " << c.enable_mobility_path_processing << std::endl
81 << "enable_sensor_processing: " << c.enable_sensor_processing << std::endl
82 << "enable_ctrv_for_unknown_obj: " << c.enable_ctrv_for_unknown_obj << std::endl
83 << "enable_ctrv_for_motorcycle_obj: " << c.enable_ctrv_for_motorcycle_obj << std::endl
84 << "enable_ctrv_for_small_vehicle_obj: " << c.enable_ctrv_for_small_vehicle_obj
85 << std::endl
86 << "enable_ctrv_for_large_vehicle_obj: " << c.enable_ctrv_for_large_vehicle_obj
87 << std::endl
88 << "enable_ctrv_for_pedestrian_obj: " << c.enable_ctrv_for_pedestrian_obj << std::endl
89 << "}" << std::endl;
90 return output;
91 }
92};
93
94} // namespace motion_computation
95
96#endif // MOTION_COMPUTATION__MOTION_COMPUTATION_CONFIG_HPP_
Stuct containing the algorithm configuration values for motion_computation.
friend std::ostream & operator<<(std::ostream &output, const Config &c)