Skip to content

Commit ee51bec

Browse files
authored
pybind ground align api separately (#59)
1 parent d696406 commit ee51bec

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

python/map_closures/map_closures.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,10 @@ def get_closures(self, query_idx: int, local_map: np.ndarray) -> List[ClosureCan
5555

5656
def get_density_map_from_id(self, map_id: int) -> np.ndarray:
5757
return self._pipeline._getDensityMapFromId(map_id)
58+
59+
60+
def align_map_to_local_ground(pointcloud, resolution):
61+
return map_closures_pybind._align_map_to_local_ground(
62+
map_closures_pybind._Vector3dVector(pointcloud),
63+
resolution,
64+
)

python/map_closures/pybind/map_closures_pybind.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <tuple>
3535
#include <vector>
3636

37+
#include "map_closures/GroundAlign.hpp"
3738
#include "map_closures/MapClosures.hpp"
3839
#include "stl_vector_eigen.h"
3940

@@ -80,5 +81,7 @@ PYBIND11_MODULE(map_closures_pybind, m) {
8081
.def("_GetBestClosure", &MapClosures::GetBestClosure, "query_id"_a, "local_map"_a)
8182
.def("_GetTopKClosures", &MapClosures::GetTopKClosures, "query_id"_a, "local_map"_a, "k"_a)
8283
.def("_GetClosures", &MapClosures::GetClosures, "query_id"_a, "local_map"_a);
84+
85+
m.def("_align_map_to_local_ground", &AlignToLocalGround, "pointcloud"_a, "resolution"_a);
8386
}
8487
} // namespace map_closures

0 commit comments

Comments
 (0)