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.
WMBroadcasterConfig.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
22namespace carma_wm_ctrl
23{
24
28 struct Config
29 {
30 int ack_pub_times = 1; // The number of times it publishes Geofence Acknowledgement.
31 double max_lane_width = 4.0; // Max lane width in meters within which geofence points are associated to a lanelet as those points are guaranteed to apply to a single lane
32 double traffic_control_request_period = 1.0; //Period in seconds between traffic control requests after route selection
33 std::vector<double> intersection_coord_correction = {}; // Every element corresponds to intersection_id of every two elements (x,y) in intersection_coord_correction (id must be [0, +65535] ranges)
34 std::vector<int64_t> intersection_ids_for_correction = {}; //Every 2 element describes coordinate correction [delta_x, delta_y] for each intersection_id in intersection_ids_for_correction in same order
35 double config_limit = 6.67; //config speed limit in m/s
36 std::string vehicle_id = "CARMA";
37 std::string participant = "vehicle:car";
38
39 // Stream operator for this config
40 friend std::ostream &operator<<(std::ostream &output, const Config &c)
41 {
42 output << "WMBroadcaster::Config { " << std::endl
43 << "ack_pub_times: " << c.ack_pub_times << std::endl
44 << "max_lane_width: " << c.max_lane_width << std::endl
45 << "traffic_control_request_period: " << c.traffic_control_request_period << std::endl
46 << "intersection_coord_correction.size(): " << c.intersection_coord_correction.size() << std::endl
47 << "intersection_ids_for_correction.size(): " << c.intersection_ids_for_correction.size() << std::endl
48 << "vehicle_id: " << c.vehicle_id << std::endl
49 << "participant: " << c.participant << std::endl
50 << "config_limit: " << c.config_limit << std::endl
51 << "}" << std::endl;
52 return output;
53 }
54 };
55
56} // carma_wm_ctrl
friend std::ostream & operator<<(std::ostream &output, const Config &c)
std::vector< double > intersection_coord_correction
std::vector< int64_t > intersection_ids_for_correction