icp_sequence.cpp
Go to the documentation of this file.
1 #include <fstream>
2 
3 #include "icp_sequence.h"
4 
5 namespace python
6 {
7  namespace pointmatcher
8  {
9  void pybindICPSequence(py::class_<PM>& p_class)
10  {
11  py::class_<ICPSequence, ICP> pyICPSequence(p_class, "ICPSequence");
12 
13  pyICPSequence.doc() = R"pbdoc(
14 ICP alogrithm, taking a sequence of clouds and using a map
15 Warning: used with caution, you need to set the map manually.
16 )pbdoc";
17 
18  pyICPSequence.def(py::init<>())
19  .def("__call__", (TransformationParameters(ICPSequence::*)(const DataPoints&)) &ICPSequence::operator(), py::arg("cloudIn"))
20  .def("__call__", (TransformationParameters(ICPSequence::*)(const DataPoints&, const TransformationParameters&)) &ICPSequence::operator(), py::arg("cloudIn"), py::arg("initialTransformationParameters"))
21  .def("compute", &ICPSequence::compute, py::arg("cloudIn"), py::arg("initialTransformationParameters"))
22 
23  .def("hasMap", &ICPSequence::hasMap).def("setMap", &ICPSequence::setMap)
24  .def("clearMap", &ICPSequence::clearMap).def("setDefault", &ICPSequence::setDefault)
25  .def("loadFromYaml", [](ICPSequence& self, const std::string& in)
26  {
27  std::ifstream ifs(in.c_str());
28  self.loadFromYaml(ifs);
29  }).def("getPrefilteredInternalMap", &ICPSequence::getPrefilteredInternalMap)
30  .def("getPrefilteredMap", &ICPSequence::getPrefilteredMap);
31  }
32  }
33 }
ICPSequence
PM::ICPSequence ICPSequence
Definition: pypoint_matcher_helper.h:34
PointMatcher::DataPoints
A point cloud.
Definition: PointMatcher.h:207
testing::internal::string
::std::string string
Definition: gtest.h:1979
python::pointmatcher::pybindICPSequence
void pybindICPSequence(py::class_< PM > &p_class)
Definition: icp_sequence.cpp:9
python
Definition: add_descriptor.cpp:5
TransformationParameters
PM::TransformationParameters TransformationParameters
Definition: pypoint_matcher_helper.h:63
icp_sequence.h


libpointmatcher
Author(s):
autogenerated on Mon Jan 1 2024 03:24:43