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.
route_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
22namespace route
23{
24
28 struct Config
29 {
30 double max_crosstrack_error = 2.0; // (Meters) Max cross track tolerance error
31 double destination_downtrack_range = 10.0; // (Meters) Tracks how far a stop must be from the end to be accepted as a completed route
32 double route_spin_rate = 10.0; // (Hz) Spin rate of the Route node
33 int cte_max_count = 4; // Max number of consecutive timesteps outside of the route allowable before triggering a LEFT_ROUTE event
34 std::string route_file_path = "NULL"; // Path to the directory that contains the route file(s) for CARMA
35
36 // Stream operator for this config
37 friend std::ostream &operator<<(std::ostream &output, const Config &c)
38 {
39 output << "route::Config { " << std::endl
40 << "max_crosstrack_error: " << c.max_crosstrack_error << std::endl
41 << "destination_downtrack_range: " << c.destination_downtrack_range << std::endl
42 << "route_spin_rate: " << c.route_spin_rate << std::endl
43 << "cte_max_count: " << c.cte_max_count << std::endl
44 << "route_file_path: " << c.route_file_path << std::endl
45 << "}" << std::endl;
46 return output;
47 }
48 };
49
50} // route
Struct containing the algorithm configuration values for the route node.
std::string route_file_path
double destination_downtrack_range
friend std::ostream & operator<<(std::ostream &output, const Config &c)
double route_spin_rate
double max_crosstrack_error