MRPT  2.0.4
RBPF_SLAM_App.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
19 #include <atomic>
20 
21 namespace mrpt::apps
22 {
23 /** RBPF-SLAM virtual base class for application wrappers.
24  *
25  * This virtual base provides the common code to the application rbpf-slam.
26  * It can be used by users to build their own RBPF-SLAM solution.
27  *
28  * \sa mrpt::slam::CMetricMapBuilderRBPF
29  * \ingroup mrpt_apps_grp
30  */
33  virtual public mrpt::apps::BaseAppDataSource
34 {
35  public:
37 
38  /** @name Main API
39  * @{ */
40 
41  /** Initializes the application from CLI parameters. Refer to the manpage of
42  * rbpf-slam. Throws on errors.
43  */
44  void initialize(int argc, const char** argv);
45 
46  inline void initialize(int argc, char** argv)
47  {
48  initialize(argc, const_cast<const char**>(argv));
49  }
50 
51  /** Runs with the current parameter set. Throws on errors. */
52  void run();
53 
54  /** @} */
55 
56  /** @name Parameters and options. See: initialize()
57  * @{ */
58 
59  /** Populated in initialize(). Can be replaced or manipulated by the user
60  * after that and before run() to change the parameters loaded from INI
61  * file. */
63 
64  /** If enabled (default), stdin will be watched and application quits if ESC
65  * is pressed. */
66  bool quits_with_esc_key = true;
67 
68  /** @} */
69 
70  /** @name Outputs and result variables
71  * @{ */
73 
74  std::map<mrpt::system::TTimeStamp, mrpt::math::TPose3D> out_estimated_path;
75 
76  /** @} */
77 };
78 
79 /** Instance of RBPF_SLAM_App_Base to run mapping from an offline dataset file.
80  */
82 {
83  public:
85 
86  protected:
87  void impl_initialize(int argc, const char** argv) override;
88  std::string impl_get_usage() const override
89  {
90  return "rbpf-slam <config_file> [dataset.rawlog]";
91  }
92 };
93 
94 } // namespace mrpt::apps
This class implements a config file-like interface over a memory-stored string list.
Instance of RBPF_SLAM_App_Base to run mapping from an offline dataset file.
Definition: RBPF_SLAM_App.h:81
Virtual interface for applications that initialize from CLI parameters.
std::string impl_get_usage() const override
Definition: RBPF_SLAM_App.h:88
void run()
Runs with the current parameter set.
void initialize(int argc, const char **argv)
Initializes the application from CLI parameters.
Versatile class for consistent logging and management of output messages.
std::shared_ptr< mrpt::slam::CMetricMapBuilderRBPF > mapBuilder
Definition: RBPF_SLAM_App.h:72
RBPF-SLAM virtual base class for application wrappers.
Definition: RBPF_SLAM_App.h:31
const char * argv[]
mrpt::config::CConfigFileMemory params
Populated in initialize().
Definition: RBPF_SLAM_App.h:62
void initialize(int argc, char **argv)
Definition: RBPF_SLAM_App.h:46
Implementation of BaseAppDataSource for reading from a rawlog file.
const int argc
void impl_initialize(int argc, const char **argv) override
std::map< mrpt::system::TTimeStamp, mrpt::math::TPose3D > out_estimated_path
Definition: RBPF_SLAM_App.h:74
Virtual interface for offline datasets (rawlog) or live sensors.
bool quits_with_esc_key
If enabled (default), stdin will be watched and application quits if ESC is pressed.
Definition: RBPF_SLAM_App.h:66



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 7ea9b7e81 Mon May 25 11:43:10 2020 +0200 at lun may 25 11:45:15 CEST 2020