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.
bsm_generator_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 {
30 double bsm_generation_frequency = 10.0; // Rate (in Hz) at which a BSM is generated
31 double bsm_id_change_period = 300.0; // BSM id change period (in sec)
32 bool bsm_id_rotation_enabled = true; // Flag to enable/disable rotation of BSM ID during vehicle operations
33 int bsm_message_id = 0; // Value is converted to a 4 element array of uint8_t where each byte of the parameter becomes one element of the array
34 double vehicle_length = 5.0; // Vehicle length (in meters)
35 double vehicle_width = 2.0; // Vehicle width (in meters)
36
37
38 // Stream operator for this config
39 friend std::ostream &operator<<(std::ostream &output, const Config &c)
40 {
41 output << "bsm_generator::Config { " << std::endl
42 << "bsm_generation_frequency: " << c.bsm_generation_frequency << std::endl
43 << "bsm_id_change_period: " << c.bsm_id_change_period << std::endl
44 << "bsm_id_rotation_enabled: " << c.bsm_id_rotation_enabled << std::endl
45 << "bsm_message_id: " << c.bsm_message_id << std::endl
46 << "vehicle_length: " << c.vehicle_length << std::endl
47 << "vehicle_width: " << c.vehicle_width << std::endl
48 << "}" << std::endl;
49 return output;
50 }
51 };
52
53} // bsm_generator
Stuct containing the algorithm configuration values for bsm_generator.
friend std::ostream & operator<<(std::ostream &output, const Config &c)