17 #include <mrpt/maps/CSimplePointsMap.h> 21 auto pts = mrpt::maps::CSimplePointsMap::Create();
23 for (
int i = 0; i < 10; i++) pts->insertPoint(i * 0.01f, 5.0f, .0f);
24 for (
int i = 0; i < 10; i++) pts->insertPoint(10.0f, i * 0.01f, 1.0f);
31 auto pts = mrpt::maps::CSimplePointsMap::Create();
33 pts->insertPointFast(0.
f, 0.
f, 0.
f);
34 pts->insertPointFast(2.
f, 0.
f, 0.
f);
39 int main([[maybe_unused]]
int argc, [[maybe_unused]]
char** argv)
53 mrpt::containers::yaml p;
62 m.
match(pcGlobal, pcLocal, {0, 0, 0, 0, 0, 0}, {}, ms, pairs);
63 ASSERT_(pairs.
empty());
72 m.
match(pcGlobal, pcLocal, {0, 5, 0, 0, 0, 0}, {}, ms, pairs);
73 ASSERT_EQUAL_(pairs.
size(), 1);
82 m.
match(pcGlobal, pcLocal, {-2, 5, 0, 0, 0, 0}, {}, ms, pairs);
83 ASSERT_EQUAL_(pairs.
size(), 1);
94 {8.5, -1.0, 1, mrpt::DEG2RAD(45.0
f), 0, 0}, {}, ms, pairs);
95 ASSERT_EQUAL_(pairs.
size(), 1);
101 catch (std::exception& e)
103 std::cerr << mrpt::exception_to_str(e) <<
"\n";
std::map< layer_name_t, mrpt::maps::CMetricMap::Ptr > layers
Generic container of pointcloud(s), extracted features and other maps.
void initialize(const mrpt::containers::yaml ¶ms) override
Generic representation of pointcloud(s) and/or extracted features.
virtual bool empty() const
virtual bool match(const metric_map_t &pcGlobal, const metric_map_t &pcLocal, const mrpt::poses::CPose3D &localPose, const MatchContext &mc, MatchState &ms, Pairings &out) const
static constexpr const char * PT_LAYER_RAW
virtual size_t size() const
int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv)
Pointcloud matcher: fixed ratio of inliers/outliers by distance.
static mrpt::maps::CSimplePointsMap::Ptr generateLocalPoints()
static mrpt::maps::CSimplePointsMap::Ptr generateGlobalPoints()
Pointcloud matcher: fixed distance thresholds.
mrpt::tfest::TMatchingPairList paired_pt2pt