MCPcopy Create free account
hub / github.com/PRBonn/MapClosures / MapClosures

Class MapClosures

python/map_closures/map_closures.py:34–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32
33
34class MapClosures:
35 def __init__(self, config: MapClosuresConfig = MapClosuresConfig()):
36 self._config = config
37 self._pipeline = map_closures_pybind._MapClosures(self._config.model_dump())
38
39 def get_best_closure(self, query_idx: int, local_map: np.ndarray) -> ClosureCandidate:
40 closure = self._pipeline._GetBestClosure(query_idx, Vector3dVector(local_map))
41 return closure
42
43 def get_top_k_closures(
44 self, query_idx: int, local_map: np.ndarray, k: int
45 ) -> List[ClosureCandidate]:
46 top_k_closures = self._pipeline._GetTopKClosures(query_idx, Vector3dVector(local_map), k)
47 return top_k_closures
48
49 def get_closures(self, query_idx: int, local_map: np.ndarray) -> List[ClosureCandidate]:
50 closures = self._pipeline._GetClosures(query_idx, Vector3dVector(local_map))
51 return closures
52
53 def get_density_map_from_id(self, map_id: int) -> np.ndarray:
54 return self._pipeline._getDensityMapFromId(map_id)
55
56 def get_ground_alignment_from_id(self, map_id: int) -> np.ndarray:
57 return np.asarray(self._pipeline._getGroundAlignmentFromId(map_id))
58
59 def save_hbst_database(self, database_path: str):
60 self._pipeline._SaveHbstDatabase(database_path)

Callers 1

__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected