Go to the documentation of this file.
10 #include <gtest/gtest.h>
14 #include <test_mrpt_common.h>
21 const std::string& ini_filename,
const std::string& rawlog_filename,
24 using namespace std::string_literals;
26 const auto ini_fil = mrpt::UNITTEST_BASEDIR +
27 "/share/mrpt/config_files/rbpf-slam/"s + ini_filename;
30 const auto rawlog_fil =
31 mrpt::UNITTEST_BASEDIR +
"/share/mrpt/datasets/"s + rawlog_filename;
39 const char*
argv[] = {
"rbpf-slam",
ini_fil.c_str(), rawlog_fil.c_str()};
45 "MappingApplication",
"logOutput_dir",
48 "MappingApplication",
"SHOW_PROGRESS_IN_WINDOW",
false);
51 app.
params.
write(
"MappingApplication",
"SAVE_3D_SCENE",
false);
52 app.
params.
write(
"MappingApplication",
"LOG_FREQUENCY", 0);
61 catch (
const std::exception& e)
69 EXPECT_EQ(o.out_estimated_path.size(), 224U);
72 "[3.4548 -18.0399 0.000000 -86.48 0.000000 0.000000]");
75 <<
"actual pose =" << p.asString()
76 <<
"\nexpected pose=" << p_gt.asString();
80 EXPECT_EQ(o.out_estimated_path.size(), 99U);
83 "[1.938686 3.352273 0.000000 114.993417 0.000000 0.000000]");
86 <<
"actual pose =" << p.asString()
87 <<
"\nexpected pose=" << p_gt.asString();
89 MRPT_TODO(
"Stricter unit tests: check for estimated landmark positions");
92 TEST(RBPF_SLAM_App, MapFromRawlog_Lidar2D_optimal_sampling)
94 using namespace std::string_literals;
97 "gridmapping_optimal_sampling.ini",
98 "2006-01ENE-21-SENA_Telecom Faculty_one_loop_only.rawlog",
102 TEST(RBPF_SLAM_App, MapFromRawlog_Lidar2D_gridICP)
104 using namespace std::string_literals;
107 "gridmapping_RBPF_grid_ICPbased_malaga.ini",
108 "2006-01ENE-21-SENA_Telecom Faculty_one_loop_only.rawlog",
112 TEST(RBPF_SLAM_App, MapFromRawlog_Lidar2D_pointsICP)
114 using namespace std::string_literals;
117 "gridmapping_RBPF_ICPbased_malaga.ini",
118 "2006-01ENE-21-SENA_Telecom Faculty_one_loop_only.rawlog",
122 TEST(RBPF_SLAM_App, MapFromRawlog_ROSLAM_MC)
124 using namespace std::string_literals;
127 "RO-SLAM_simulatedData_MC.ini",
"RO-SLAM_demo.rawlog",
131 TEST(RBPF_SLAM_App, MapFromRawlog_ROSLAM_SOG)
133 using namespace std::string_literals;
136 "RO-SLAM_simulatedData_SOG.ini",
"RO-SLAM_demo.rawlog",
void generic_rbpf_slam_test(const std::string &ini_filename, const std::string &rawlog_filename, config_changer_t cfg_changer, post_tester_t post_tester)
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))
std::function< void(mrpt::apps::ICP_SLAM_App_Base &)> post_tester_t
MRPT_TODO("toPointCloud / calibration")
Instance of RBPF_SLAM_App_Base to run mapping from an offline dataset file.
static auto tester_for_2006_01_21
static auto tester_for_ROSLAM_demo
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.
CONTAINER::Scalar norm(const CONTAINER &v)
TEST(RBPF_SLAM_App, MapFromRawlog_Lidar2D_optimal_sampling)
This class allows loading and storing values and vectors of different types from a configuration text...
mrpt::config::CConfigFileMemory params
Populated in initialize().
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
void initialize(int argc, const char **argv)
Initializes the application from CLI parameters.
void setMinLoggingLevel(const VerbosityLevel level)
Set the minimum logging level for which the incoming logs are going to be taken into account.
EXPECT_EQ(out.image_pair_was_used.size(), NUM_IMGS)
EXPECT_LT(out.final_rmse, 3.0)
Traits for SE(n), rigid-body transformations in R^n space.
RBPF-SLAM virtual base class for application wrappers.
static CPose3D FromString(const std::string &s)
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.18 for MRPT 2.0.4 at Thu Sep 24 07:14:18 UTC 2020 | |