apps
mm-info
apps/mm-info/main.cpp
Go to the documentation of this file.
1
/* -------------------------------------------------------------------------
2
* A repertory of multi primitive-to-primitive (MP2P) ICP algorithms in C++
3
* Copyright (C) 2018-2024 Jose Luis Blanco, University of Almeria
4
* See LICENSE for license information.
5
* ------------------------------------------------------------------------- */
6
14
#include <
mp2p_icp/metricmap.h
>
15
#include <mrpt/3rdparty/tclap/CmdLine.h>
16
#include <mrpt/containers/yaml.h>
17
#include <mrpt/system/filesystem.h>
18
19
// CLI flags:
20
namespace
21
{
22
TCLAP::CmdLine
cmd
(
"mm-filter"
);
23
24
TCLAP::UnlabeledValueArg<std::string>
argMapFile
(
25
"input"
,
"Load this metric map file (*.mm)"
,
true
,
"myMap.mm"
,
"myMap.mm"
,
cmd
);
26
}
// namespace
27
28
void
run_mm_info
()
29
{
30
const
auto
& filInput =
argMapFile
.getValue();
31
32
ASSERT_FILE_EXISTS_(
argMapFile
.getValue());
33
34
std::cout <<
"[mm-info] Reading input map from: '"
<< filInput <<
"'..."
<< std::endl;
35
36
mp2p_icp::metric_map_t
mm;
37
mm.
load_from_file
(filInput);
38
39
std::cout <<
"[mm-info] Done read map. Contents:\n"
<< mm.
contents_summary
() << std::endl;
40
}
41
42
int
main
(
int
argc,
char
** argv)
43
{
44
try
45
{
46
// Parse arguments:
47
if
(!
cmd
.parse(argc, argv))
return
1;
// should exit.
48
49
run_mm_info
();
50
}
51
catch
(
const
std::exception& e)
52
{
53
std::cerr << e.what();
54
return
1;
55
}
56
return
0;
57
}
kitti-run-seq.cmd
string cmd
Definition:
kitti-run-seq.py:14
main
int main(int argc, char **argv)
Definition:
apps/mm-info/main.cpp:42
argMapFile
static TCLAP::UnlabeledValueArg< std::string > argMapFile("input", "Load this metric map file (*.mm)", false, "myMap.mm", "myMap.mm", cmd)
mp2p_icp::metric_map_t::contents_summary
virtual std::string contents_summary() const
Definition:
metricmap.cpp:481
mp2p_icp::metric_map_t::load_from_file
bool load_from_file(const std::string &fileName)
Definition:
metricmap.cpp:556
metricmap.h
Generic representation of pointcloud(s) and/or extracted features.
mp2p_icp::metric_map_t
Generic container of pointcloud(s), extracted features and other maps.
Definition:
metricmap.h:55
run_mm_info
void run_mm_info()
Definition:
apps/mm-info/main.cpp:28
mp2p_icp
Author(s):
autogenerated on Mon May 26 2025 02:45:49