diff --git a/python/map_closures/map_closures.py b/python/map_closures/map_closures.py index de68399..f678096 100644 --- a/python/map_closures/map_closures.py +++ b/python/map_closures/map_closures.py @@ -55,3 +55,10 @@ def get_closures(self, query_idx: int, local_map: np.ndarray) -> List[ClosureCan def get_density_map_from_id(self, map_id: int) -> np.ndarray: return self._pipeline._getDensityMapFromId(map_id) + + +def align_map_to_local_ground(pointcloud, resolution): + return map_closures_pybind._align_map_to_local_ground( + map_closures_pybind._Vector3dVector(pointcloud), + resolution, + ) diff --git a/python/map_closures/pybind/map_closures_pybind.cpp b/python/map_closures/pybind/map_closures_pybind.cpp index 92a1354..a8c4233 100644 --- a/python/map_closures/pybind/map_closures_pybind.cpp +++ b/python/map_closures/pybind/map_closures_pybind.cpp @@ -34,6 +34,7 @@ #include #include +#include "map_closures/GroundAlign.hpp" #include "map_closures/MapClosures.hpp" #include "stl_vector_eigen.h" @@ -80,5 +81,7 @@ PYBIND11_MODULE(map_closures_pybind, m) { .def("_GetBestClosure", &MapClosures::GetBestClosure, "query_id"_a, "local_map"_a) .def("_GetTopKClosures", &MapClosures::GetTopKClosures, "query_id"_a, "local_map"_a, "k"_a) .def("_GetClosures", &MapClosures::GetClosures, "query_id"_a, "local_map"_a); + + m.def("_align_map_to_local_ground", &AlignToLocalGround, "pointcloud"_a, "resolution"_a); } } // namespace map_closures