MRPT  2.0.1
Typedefs | Functions | Variables
MonteCarloLocalization_App_unittest.cpp File Reference
#include <gtest/gtest.h>
#include <mrpt/apps/MonteCarloLocalization_App.h>
#include <mrpt/poses/Lie/SE.h>
#include <mrpt/system/filesystem.h>
#include <test_mrpt_common.h>
#include <iostream>
Include dependency graph for MonteCarloLocalization_App_unittest.cpp:

Go to the source code of this file.

Typedefs

using config_changer_t = std::function< void(mrpt::config::CConfigFileBase &)>
 
using post_tester_t = std::function< void(mrpt::apps::MonteCarloLocalization_Base &)>
 
using MCL = mrpt::apps::MonteCarloLocalization_Rawlog
 

Functions

void generic_pf_test (const std::string &ini_filename, const std::string &rawlog_filename, const std::string &map_filename, config_changer_t cfg_changer, post_tester_t post_tester)
 
 TEST (MonteCarloLocalization_Rawlog, RunForSampleDataset_2D)
 
 TEST (MonteCarloLocalization_Rawlog, RunForSampleDataset_3D)
 

Variables

static bool tester_result_ok = true
 
static auto tester_for_localization_demo
 

Typedef Documentation

◆ config_changer_t

using config_changer_t = std::function<void(mrpt::config::CConfigFileBase&)>

Definition at line 17 of file MonteCarloLocalization_App_unittest.cpp.

◆ MCL

Definition at line 21 of file MonteCarloLocalization_App_unittest.cpp.

◆ post_tester_t

Definition at line 19 of file MonteCarloLocalization_App_unittest.cpp.

Function Documentation

◆ generic_pf_test()

void generic_pf_test ( const std::string &  ini_filename,
const std::string &  rawlog_filename,
const std::string &  map_filename,
config_changer_t  cfg_changer,
post_tester_t  post_tester 
)

Definition at line 23 of file MonteCarloLocalization_App_unittest.cpp.

References mrpt::apps::MonteCarloLocalization_Base::allow_quit_on_esc_key, argc, argv, ASSERT_FILE_EXISTS_, mrpt::exception_to_str(), mrpt::apps::MonteCarloLocalization_Base::fill_out_estimated_path, mrpt::system::getTempFileName(), ini_fil, mrpt::apps::MonteCarloLocalization_Base::initialize(), mrpt::system::LVL_ERROR, mrpt::apps::MonteCarloLocalization_Base::params, mrpt::apps::MonteCarloLocalization_Base::run(), mrpt::apps::MonteCarloLocalization_Base::sect, mrpt::system::COutputLogger::setMinLoggingLevel(), and mrpt::config::CConfigFileBase::write().

Referenced by TEST().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TEST() [1/2]

TEST ( MonteCarloLocalization_Rawlog  ,
RunForSampleDataset_2D   
)

Definition at line 112 of file MonteCarloLocalization_App_unittest.cpp.

References generic_pf_test(), mrpt::apps::MonteCarloLocalization_Base::sect, tester_for_localization_demo, tester_result_ok, and mrpt::config::CConfigFileBase::write().

Here is the call graph for this function:

◆ TEST() [2/2]

TEST ( MonteCarloLocalization_Rawlog  ,
RunForSampleDataset_3D   
)

Definition at line 130 of file MonteCarloLocalization_App_unittest.cpp.

References generic_pf_test(), mrpt::apps::MonteCarloLocalization_Base::sect, tester_for_localization_demo, tester_result_ok, and mrpt::config::CConfigFileBase::write().

Here is the call graph for this function:

Variable Documentation

◆ tester_for_localization_demo

auto tester_for_localization_demo
static
Initial value:
=
EXPECT_EQ(o.out_estimated_path.size(), 37U);
if (o.out_estimated_path.empty()) return;
const mrpt::math::TPose3D p = o.out_estimated_path.rbegin()->second;
"[15.89 -10.0 0.000000 4.8 0.000000 0.000000]");
const auto p_err = mrpt::poses::CPose3D(p_gt - p);
const double err = mrpt::poses::Lie::SE<3>::log(p_err).norm();
if (err < 0.5)
{
}
else
{
std::cerr << "Final pose mismatch (will retry N times):\n"
"Expected: "
<< p_gt.asString()
<< "\n"
"Actual : "
<< p.asString() << "\n";
}
}
void asString(std::string &s) const
Returns a human-readable textual representation of the object (eg: "[x y z yaw pitch roll]"...
Definition: TPose3D.cpp:36
static bool tester_result_ok
Traits for SE(n), rigid-body transformations in R^n space.
Definition: SE.h:30
static TPose3D FromString(const std::string &s)
Definition: TPose3D.h:200
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:85
EXPECT_EQ(out.image_pair_was_used.size(), NUM_IMGS)
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
Definition: TPose3D.h:24
MonteCarlo (Particle filter) localization wrapper class for CLI or custom applications: virtual base ...

Definition at line 84 of file MonteCarloLocalization_App_unittest.cpp.

Referenced by TEST().

◆ tester_result_ok

bool tester_result_ok = true
static

Definition at line 82 of file MonteCarloLocalization_App_unittest.cpp.

Referenced by TEST().




Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020