Skip to content

Commit

Permalink
Update python wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Dec 16, 2023
1 parent 2cb1185 commit d3d44f9
Show file tree
Hide file tree
Showing 42 changed files with 380 additions and 252 deletions.
1 change: 1 addition & 0 deletions python/all_mrpt_maps3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "src/mrpt/maps/CRandomFieldGridMap2D.cpp"
#include "src/mrpt/maps/CRandomFieldGridMap3D.cpp"
#include "src/mrpt/maps/CReflectivityGridMap2D.cpp"
#include "src/mrpt/maps/CSimpleMap.cpp"
#include "src/mrpt/maps/CSimplePointsMap.cpp"
#include "src/mrpt/maps/CWeightedPointsMap.cpp"
#include "src/mrpt/maps/CWirelessPowerGridMap2D.cpp"
Expand Down
6 changes: 3 additions & 3 deletions python/src/mrpt/core/format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ void bind_mrpt_core_format(std::function< pybind11::module &(std::string const &
// mrpt::to_string(double) file:mrpt/core/format.h line:31
M("mrpt").def("to_string", (std::string (*)(double)) &mrpt::to_string<double>, "C++: mrpt::to_string(double) --> std::string", pybind11::arg("v"));

// mrpt::to_string(unsigned long) file:mrpt/core/format.h line:31
M("mrpt").def("to_string", (std::string (*)(unsigned long)) &mrpt::to_string<unsigned long>, "C++: mrpt::to_string(unsigned long) --> std::string", pybind11::arg("v"));

// mrpt::to_string(int) file:mrpt/core/format.h line:31
M("mrpt").def("to_string", (std::string (*)(int)) &mrpt::to_string<int>, "C++: mrpt::to_string(int) --> std::string", pybind11::arg("v"));

// mrpt::to_string(unsigned long) file:mrpt/core/format.h line:31
M("mrpt").def("to_string", (std::string (*)(unsigned long)) &mrpt::to_string<unsigned long>, "C++: mrpt::to_string(unsigned long) --> std::string", pybind11::arg("v"));

// mrpt::to_string(unsigned int) file:mrpt/core/format.h line:31
M("mrpt").def("to_string", (std::string (*)(unsigned int)) &mrpt::to_string<unsigned int>, "C++: mrpt::to_string(unsigned int) --> std::string", pybind11::arg("v"));

Expand Down
1 change: 1 addition & 0 deletions python/src/mrpt/maps/CBeacon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <mrpt/math/TPose2D.h>
#include <mrpt/math/TPose3D.h>
#include <mrpt/math/TPose3DQuat.h>
#include <mrpt/math/TTwist3D.h>
#include <mrpt/math/math_frwds.h>
#include <mrpt/math/matrix_size_t.h>
#include <mrpt/obs/CObservation.h>
Expand Down
2 changes: 1 addition & 1 deletion python/src/mrpt/maps/CColouredOctoMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <mrpt/math/TPose2D.h>
#include <mrpt/math/TPose3D.h>
#include <mrpt/math/TPose3DQuat.h>
#include <mrpt/math/TTwist3D.h>
#include <mrpt/math/math_frwds.h>
#include <mrpt/math/matrix_size_t.h>
#include <mrpt/obs/CObservation.h>
Expand Down Expand Up @@ -79,7 +80,6 @@
#include <streambuf>
#include <string>
#include <string_view>
#include <tuple>
#include <type_traits>
#include <typeinfo>
#include <utility>
Expand Down
2 changes: 1 addition & 1 deletion python/src/mrpt/maps/CGasConcentrationGridMap2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <mrpt/math/TPose2D.h>
#include <mrpt/math/TPose3D.h>
#include <mrpt/math/TPose3DQuat.h>
#include <mrpt/math/TTwist3D.h>
#include <mrpt/math/math_frwds.h>
#include <mrpt/math/matrix_size_t.h>
#include <mrpt/obs/CObservation.h>
Expand Down Expand Up @@ -73,7 +74,6 @@
#include <streambuf>
#include <string>
#include <string_view>
#include <tuple>
#include <type_traits>
#include <typeinfo>
#include <utility>
Expand Down
2 changes: 1 addition & 1 deletion python/src/mrpt/maps/CHeightGridMap2D_Base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <mrpt/math/TPose3DQuat.h>
#include <mrpt/math/TSegment2D.h>
#include <mrpt/math/TSegment3D.h>
#include <mrpt/math/TTwist3D.h>
#include <mrpt/math/math_frwds.h>
#include <mrpt/math/matrix_size_t.h>
#include <mrpt/obs/CObservation.h>
Expand Down Expand Up @@ -77,7 +78,6 @@
#include <streambuf>
#include <string>
#include <string_view>
#include <tuple>
#include <type_traits>
#include <typeinfo>
#include <utility>
Expand Down
2 changes: 1 addition & 1 deletion python/src/mrpt/maps/CHeightGridMap2D_MRF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <mrpt/math/TPose2D.h>
#include <mrpt/math/TPose3D.h>
#include <mrpt/math/TPose3DQuat.h>
#include <mrpt/math/TTwist3D.h>
#include <mrpt/math/math_frwds.h>
#include <mrpt/math/matrix_size_t.h>
#include <mrpt/obs/CObservation.h>
Expand Down Expand Up @@ -74,7 +75,6 @@
#include <streambuf>
#include <string>
#include <string_view>
#include <tuple>
#include <type_traits>
#include <typeinfo>
#include <utility>
Expand Down
2 changes: 1 addition & 1 deletion python/src/mrpt/maps/CLandmarksMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <mrpt/math/TPose2D.h>
#include <mrpt/math/TPose3D.h>
#include <mrpt/math/TPose3DQuat.h>
#include <mrpt/math/TTwist3D.h>
#include <mrpt/math/math_frwds.h>
#include <mrpt/math/matrix_size_t.h>
#include <mrpt/obs/CObservation.h>
Expand Down Expand Up @@ -79,7 +80,6 @@
#include <streambuf>
#include <string>
#include <string_view>
#include <tuple>
#include <type_traits>
#include <typeinfo>
#include <utility>
Expand Down
3 changes: 1 addition & 2 deletions python/src/mrpt/maps/CMetricMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <mrpt/math/TPose2D.h>
#include <mrpt/math/TPose3D.h>
#include <mrpt/math/TPose3DQuat.h>
#include <mrpt/math/TTwist3D.h>
#include <mrpt/math/math_frwds.h>
#include <mrpt/math/matrix_size_t.h>
#include <mrpt/obs/CObservation.h>
Expand All @@ -32,15 +33,13 @@
#include <mrpt/poses/CPose3DPDF.h>
#include <mrpt/poses/CPose3DQuat.h>
#include <mrpt/poses/CPoseOrPoint.h>
#include <mrpt/poses/CPosePDF.h>
#include <mrpt/rtti/CObject.h>
#include <mrpt/tfest/TMatchingPair.h>
#include <mrpt/typemeta/static_string.h>
#include <optional>
#include <ostream>
#include <ratio>
#include <string>
#include <tuple>
#include <vector>

#include <functional>
Expand Down
6 changes: 2 additions & 4 deletions python/src/mrpt/maps/CMetricMap_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <mrpt/math/TPoint3D.h>
#include <mrpt/math/TPose2D.h>
#include <mrpt/math/TPose3D.h>
#include <mrpt/math/TTwist3D.h>
#include <mrpt/obs/CObservation.h>
#include <mrpt/obs/CObservation2DRangeScan.h>
#include <mrpt/obs/CObservation3DRangeScan.h>
Expand All @@ -28,7 +29,6 @@
#include <mrpt/poses/CPose3DPDF.h>
#include <mrpt/poses/CPose3DQuat.h>
#include <mrpt/poses/CPoseOrPoint.h>
#include <mrpt/poses/CPosePDF.h>
#include <mrpt/rtti/CObject.h>
#include <mrpt/tfest/TMatchingPair.h>
#include <mrpt/typemeta/static_string.h>
Expand All @@ -37,7 +37,6 @@
#include <ratio>
#include <sstream> // __str__
#include <string>
#include <tuple>
#include <vector>

#include <functional>
Expand All @@ -63,8 +62,7 @@ void bind_mrpt_maps_CMetricMap_1(std::function< pybind11::module &(std::string c
cl.def("clear", (void (mrpt::maps::CMetricMap::*)()) &mrpt::maps::CMetricMap::clear, "Erase all the contents of the map \n\nC++: mrpt::maps::CMetricMap::clear() --> void");
cl.def("isEmpty", (bool (mrpt::maps::CMetricMap::*)() const) &mrpt::maps::CMetricMap::isEmpty, "Returns true if the map is empty/no observation has been inserted.\n\nC++: mrpt::maps::CMetricMap::isEmpty() const --> bool");
cl.def("boundingBox", (struct mrpt::math::TBoundingBox_<float> (mrpt::maps::CMetricMap::*)() const) &mrpt::maps::CMetricMap::boundingBox, "Returns the bounding box of the metric map, or (0,0,0)-(0,0,0) (the\n default value of mrpt::math::TBoundingBoxf() if not implemented in the\n derived class or the map is empty.\n\nC++: mrpt::maps::CMetricMap::boundingBox() const --> struct mrpt::math::TBoundingBox_<float>");
cl.def("loadFromProbabilisticPosesAndObservations", (void (mrpt::maps::CMetricMap::*)(const class mrpt::maps::CSimpleMap &)) &mrpt::maps::CMetricMap::loadFromProbabilisticPosesAndObservations, "Load the map contents from a CSimpleMap object, erasing all previous\n content of the map. This is done invoking `insertObservation()` for each\n observation at the mean 3D robot pose of each pose-observations pair in\n the CSimpleMap object.\n\n \n insertObservation, CSimpleMap\n \n\n std::exception Some internal steps in invoked methods can\n raise exceptions on invalid parameters, etc...\n\nC++: mrpt::maps::CMetricMap::loadFromProbabilisticPosesAndObservations(const class mrpt::maps::CSimpleMap &) --> void", pybind11::arg("Map"));
cl.def("loadFromSimpleMap", (void (mrpt::maps::CMetricMap::*)(const class mrpt::maps::CSimpleMap &)) &mrpt::maps::CMetricMap::loadFromSimpleMap, "! \n\nC++: mrpt::maps::CMetricMap::loadFromSimpleMap(const class mrpt::maps::CSimpleMap &) --> void", pybind11::arg("Map"));
cl.def("loadFromSimpleMap", (void (mrpt::maps::CMetricMap::*)(const class mrpt::maps::CSimpleMap &)) &mrpt::maps::CMetricMap::loadFromSimpleMap, "Load the map contents from a CSimpleMap object, erasing all previous\n content of the map. This is done invoking `insertObservation()` for each\n observation at the mean 3D robot pose of each pose-observations pair in\n the CSimpleMap object.\n\n \n insertObservation, CSimpleMap\n \n\n std::exception Some internal steps in invoked methods can\n raise exceptions on invalid parameters, etc...\n\nC++: mrpt::maps::CMetricMap::loadFromSimpleMap(const class mrpt::maps::CSimpleMap &) --> void", pybind11::arg("Map"));
cl.def("insertObs", [](mrpt::maps::CMetricMap &o, const class mrpt::obs::CObservation & a0) -> bool { return o.insertObs(a0); }, "", pybind11::arg("obs"));
cl.def("insertObs", (bool (mrpt::maps::CMetricMap::*)(const class mrpt::obs::CObservation &, const class mrpt::poses::CPose3D *)) &mrpt::maps::CMetricMap::insertObs, "C++: mrpt::maps::CMetricMap::insertObs(const class mrpt::obs::CObservation &, const class mrpt::poses::CPose3D *) --> bool", pybind11::arg("obs"), pybind11::arg("robotPose"));
cl.def("insertObs", [](mrpt::maps::CMetricMap &o, const class mrpt::obs::CSensoryFrame & a0) -> bool { return o.insertObs(a0); }, "", pybind11::arg("sf"));
Expand Down
Loading

0 comments on commit d3d44f9

Please sign in to comment.