Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions python/map_closures/map_closures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
3 changes: 3 additions & 0 deletions python/map_closures/pybind/map_closures_pybind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <tuple>
#include <vector>

#include "map_closures/GroundAlign.hpp"
#include "map_closures/MapClosures.hpp"
#include "stl_vector_eigen.h"

Expand Down Expand Up @@ -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
Loading