supereight
config.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2016-2019 Emanuele Vespa
3  * SPDX-FileCopyrightText: 2022 Smart Robotics Lab, Imperial College London, Technical University of Munich
4  * SPDX-FileCopyrightText: 2022 Nils Funk
5  * SPDX-FileCopyrightText: 2022 Sotiris Papatheodorou
6  * SPDX-License-Identifier: BSD-3-Clause
7  */
8 
9 #ifndef SE_CONFIG_HPP
10 #define SE_CONFIG_HPP
11 
12 
13 
14 #include "reader.hpp"
15 #include "se/map/map.hpp"
16 #include "se/sensor/sensor.hpp"
17 #include "se/tracker/tracker.hpp"
18 
19 
20 
21 namespace se {
22 
23 
24 
25 struct AppConfig {
28  bool enable_ground_truth = false;
29 
32  bool enable_rendering = true;
33 
36  bool enable_gui = true;
37 
41  std::string mesh_path;
42 
46  std::string slice_path;
47 
51  std::string structure_path;
52 
58 
61  int tracking_rate = 1;
62 
67 
76  int rendering_rate = 4;
77 
84  int meshing_rate = 100;
85 
88  int max_frames = -1;
89 
95  std::string log_file;
96 
100  void readYaml(const std::string& filename);
101 
102  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
103 };
104 
105 std::ostream& operator<<(std::ostream& os, const AppConfig& c);
106 
107 
108 
109 template<typename DataConfigT, typename SensorConfigT>
110 struct Config {
112  DataConfigT data;
113  SensorConfigT sensor;
117 
120  Config();
121 
125  Config(const std::string& yaml_file);
126 
127  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
128 };
129 
130 
131 
132 template<typename DataConfigT, typename SensorConfigT>
133 std::ostream& operator<<(std::ostream& os, const Config<DataConfigT, SensorConfigT>& c);
134 
135 
136 
137 } // namespace se
138 
139 #include "impl/config_impl.hpp"
140 
141 #endif // SE_CONFIG_HPP
Definition: reader_base.hpp:46
std::string log_file
The file where the timing results will be written to.
Definition: config.hpp:95
MapConfig map
Definition: config.hpp:111
Definition: tracker.hpp:21
SensorConfigT sensor
Definition: config.hpp:113
std::ostream & operator<<(std::ostream &os, const FieldDataConfig< se::Field::Occupancy > &c)
int max_frames
The maximum number of frames to read.
Definition: config.hpp:88
bool enable_gui
Whether to show the GUI.
Definition: config.hpp:36
Definition: config.hpp:110
TrackerConfig tracker
Definition: config.hpp:114
int rendering_rate
Render the 3D reconstruction every rendering_rate frames.
Definition: config.hpp:76
bool enable_rendering
Whether to show the supereight renders.
Definition: config.hpp:32
AppConfig app
Definition: config.hpp:116
int sensor_downsampling_factor
The ratio of the input frame size over the frame size used internally.
Definition: config.hpp:57
Definition: config.hpp:25
std::string slice_path
The path where slice meshes are saved.
Definition: config.hpp:46
int integration_rate
Integrate a 3D reconstruction every integration_rate frames.
Definition: config.hpp:66
Definition: map.hpp:30
bool enable_ground_truth
Whether to use the available ground truth camera pose.
Definition: config.hpp:28
std::string mesh_path
The path where meshes are saved.
Definition: config.hpp:41
int tracking_rate
Perform tracking on a frame every tracking_rate frames.
Definition: config.hpp:61
std::string structure_path
The path where structure meshes are saved.
Definition: config.hpp:51
DataConfigT data
Definition: config.hpp:112
int meshing_rate
Mesh the 3D reconstruction every meshing_rate frames.
Definition: config.hpp:84
void readYaml(const std::string &filename)
Reads the struct members from the "app" node of a YAML file.
Helper wrapper to allocate and de-allocate octants in the octree.
Definition: colour_utils.hpp:17
ReaderConfig reader
Definition: config.hpp:115