supereight
Loading...
Searching...
No Matches
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#include <se/map/map.hpp>
13#include <se/sensor/sensor.hpp>
15
16#include "reader_base.hpp"
17
18namespace se {
19
20struct AppConfig {
23 bool enable_ground_truth = false;
24
27 bool enable_rendering = true;
28
31 bool enable_gui = true;
32
36 std::string mesh_path;
37
41 std::string slice_path;
42
46 std::string structure_path;
47
53
57
62
72
79 int meshing_rate = 100;
80
83 int max_frames = -1;
84
90 std::string log_file;
91
95 void readYaml(const std::string& filename);
96
97 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
98};
99
100std::ostream& operator<<(std::ostream& os, const AppConfig& c);
101
102
103
104template<typename MapT, typename SensorT>
105struct Config {
106 struct MapT::Config map;
107 struct MapT::DataType::Config data;
108 struct SensorT::Config sensor;
112
115 Config() = default;
116
120 Config(const std::string& yaml_file);
121
122 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
123};
124
125template<typename MapT, typename SensorT>
126std::ostream& operator<<(std::ostream& os, const Config<MapT, SensorT>& c);
127
128} // namespace se
129
130#include "impl/config_impl.hpp"
131
132#endif // SE_CONFIG_HPP
Helper wrapper to allocate and de-allocate octants in the octree.
Definition bounded_vector.hpp:14
std::ostream & operator<<(std::ostream &os, const ColourData< Colour::Off >::Config &c)
Definition config.hpp:20
std::string slice_path
The path where slice meshes are saved.
Definition config.hpp:41
bool enable_rendering
Whether to show the supereight renders.
Definition config.hpp:27
std::string log_file
The file where the timing results will be written to.
Definition config.hpp:90
int rendering_rate
Render the 3D reconstruction every rendering_rate frames.
Definition config.hpp:71
std::string mesh_path
The path where meshes are saved.
Definition config.hpp:36
int tracking_rate
Perform tracking on a frame every tracking_rate frames.
Definition config.hpp:56
int max_frames
The maximum number of frames to read.
Definition config.hpp:83
bool enable_gui
Whether to show the GUI.
Definition config.hpp:31
bool enable_ground_truth
Whether to use the available ground truth camera pose.
Definition config.hpp:23
void readYaml(const std::string &filename)
Reads the struct members from the "app" node of a YAML file.
int integration_rate
Integrate a 3D reconstruction every integration_rate frames.
Definition config.hpp:61
int meshing_rate
Mesh the 3D reconstruction every meshing_rate frames.
Definition config.hpp:79
int sensor_downsampling_factor
The ratio of the input frame size over the frame size used internally.
Definition config.hpp:52
std::string structure_path
The path where structure meshes are saved.
Definition config.hpp:46
Definition config.hpp:105
AppConfig app
Definition config.hpp:111
Config()=default
Default initializes all configs.
struct SensorT::Config sensor
Definition config.hpp:108
Config(const std::string &yaml_file)
Initializes the config from a YAML file.
Reader::Config reader
Definition config.hpp:110
struct MapT::Config map
Definition config.hpp:106
struct MapT::DataType::Config data
Definition config.hpp:107
TrackerConfig tracker
Definition config.hpp:109
Definition reader_base.hpp:81
Definition tracker.hpp:22