Go to the documentation of this file.
10 #include <gtest/gtest.h>
13 #include <test_mrpt_common.h>
19 const std::string& ini_filename,
const std::string& rawlog_filename,
22 using namespace std::string_literals;
24 const auto ini_fil = mrpt::UNITTEST_BASEDIR +
25 "/share/mrpt/config_files/kf-slam/"s + ini_filename;
28 const auto rawlog_fil =
29 mrpt::UNITTEST_BASEDIR +
"/share/mrpt/datasets/"s + rawlog_filename;
37 const char*
argv[] = {
"kf-slam",
ini_fil.c_str(), rawlog_fil.c_str()};
44 "MappingApplication",
"logOutput_dir",
53 catch (
const std::exception& e)
60 TEST(KFSLAMApp, EKF_SLAM_3D)
63 "EKF-SLAM_6D_test.ini",
"kf-slam_6D_demo.rawlog",
65 using namespace std::string_literals;
66 c.
write(
"MappingApplication",
"SHOW_3D_LIVE",
false);
67 c.
write(
"MappingApplication",
"SAVE_3D_SCENES",
true);
71 TEST(KFSLAMApp, EKF_SLAM_2D)
74 "EKF-SLAM_test_2d.ini",
"kf-slam_demo.rawlog",
76 using namespace std::string_literals;
77 c.
write(
"MappingApplication",
"SHOW_3D_LIVE",
false);
78 c.
write(
"MappingApplication",
"SAVE_3D_SCENES",
true);
82 TEST(KFSLAMApp, EKF_SLAM_3D_data_assoc_JCBB_Maha)
85 "EKF-SLAM_6D_test_datassoc.ini",
"kf-slam_6D_demo_DA.rawlog",
87 using namespace std::string_literals;
88 c.
write(
"RangeBearingKFSLAM",
"data_assoc_method",
"assocJCBB");
89 c.
write(
"RangeBearingKFSLAM",
"data_assoc_metric",
"metricMaha");
91 c.
write(
"MappingApplication",
"SHOW_3D_LIVE",
false);
92 c.
write(
"MappingApplication",
"SAVE_3D_SCENES",
false);
96 TEST(KFSLAMApp, EKF_SLAM_3D_data_assoc_NN_Maha)
99 "EKF-SLAM_6D_test_datassoc.ini",
"kf-slam_6D_demo_DA.rawlog",
101 using namespace std::string_literals;
102 c.
write(
"RangeBearingKFSLAM",
"data_assoc_method",
"assocNN");
103 c.
write(
"RangeBearingKFSLAM",
"data_assoc_metric",
"metricMaha");
105 c.
write(
"MappingApplication",
"SHOW_3D_LIVE",
false);
106 c.
write(
"MappingApplication",
"SAVE_3D_SCENES",
false);
void run()
Runs with the current parameter set.
void write(const std::string §ion, const std::string &name, enum_t value, const int name_padding_width=-1, const int value_padding_width=-1, const std::string &comment=std::string())
EXPECT_TRUE(mrpt::system::fileExists(ini_fil))
const std::string ini_fil
std::function< void(mrpt::config::CConfigFileBase &)> config_changer_t
std::string getTempFileName()
Returns the name of a proposed temporary file name.
bool fileExists(const std::string &fileName)
Test if a given file (or directory) exists.
This class allows loading and storing values and vectors of different types from a configuration text...
void initialize(int argc, const char **argv)
Initializes the application from CLI parameters.
EKF-SLAM application wrapper class.
void setMinLoggingLevel(const VerbosityLevel level)
Set the minimum logging level for which the incoming logs are going to be taken into account.
EXPECT_LT(out.final_rmse, 3.0)
double loc_error_wrt_gt
Average localization error, when supplied with a ground-truth file.
mrpt::config::CConfigFileMemory params
Populated in initialize().
void generic_kf_slam_test(const std::string &ini_filename, const std::string &rawlog_filename, config_changer_t cfg_changer)
TEST(KFSLAMApp, EKF_SLAM_3D)
std::string exception_to_str(const std::exception &e)
Builds a nice textual representation of a nested exception, which if generated using MRPT macros (THR...
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Sun Jul 19 15:15:43 UTC 2020 | |