$darkmode
esmini_conf.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2023 Robert Bosch GmbH
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * SPDX-License-Identifier: Apache-2.0
17  */
22 #pragma once
23 
24 #include <map> // for map<>
25 #include <string> // for string
26 
27 #include <fable/confable.hpp> // for Confable
28 #include <fable/schema.hpp> // for Schema
29 
30 namespace cloe_esmini {
31 
39  bool is_closed_loop{true};
40 
42  double filter_dist{100.0};
43 
44  public:
45  CONFABLE_SCHEMA(ESMiniVehicleConfig) {
46  // clang-format off
47  return fable::Schema{
48  {"closed_loop", fable::Schema(&is_closed_loop, "control the esmini vehicle")},
49  {"filter_distance", fable::Schema(&filter_dist, "filter distance for ground truth data")},
50  };
51  // clang-format on
52  }
53 };
54 
60  std::string scenario{};
61 
62  bool is_headless{true};
63 
64  bool write_images{false};
65 
69  std::map<std::string, ESMiniVehicleConfig> vehicles;
70 
71  CONFABLE_SCHEMA(ESMiniConfiguration) {
72  // clang-format off
73  return fable::Schema{
74  {"headless", fable::Schema(&is_headless, "run esmini without viewer")},
75  {"write_images", fable::Schema(&write_images, "save an image for each step")},
76  {"scenario", fable::Schema(&scenario, "absolute path to open scenario file")},
77  {"vehicles", fable::Schema(&vehicles, "vehicle configuration like sensors and component mapping")},
78  };
79  // clang-format on
80  }
81 };
82 
83 } // namespace cloe_esmini
Definition: confable.hpp:98
Definition: schema.hpp:173
Definition: esmini_conf.hpp:59
std::map< std::string, ESMiniVehicleConfig > vehicles
Definition: esmini_conf.hpp:69
Definition: esmini_conf.hpp:37
double filter_dist
Only keep ground truth data within given distance.
Definition: esmini_conf.hpp:42
bool is_closed_loop
Externally controlled esmini vehicle.
Definition: esmini_conf.hpp:39