MCPcopy Create free account
hub / github.com/UniflexAI/tinynav / localization_stop_callback

Method localization_stop_callback

tinynav/core/map_node.py:320–338  ·  view source on GitHub ↗
(self, msg: Bool)

Source from the content-addressed store, hash-verified

318 self.failed_relocalizations = []
319
320 self.T_from_map_to_odom = None
321
322 self.pois = {}
323 self.poi_index = -1
324 self._nav_completed = False
325 self._leg_initial_length: float | None = None
326 self._leg_start_time: float | None = None
327 self._speed_estimate: float | None = None
328 self.cached_nav_path_in_map = None
329 self.cached_nav_path_poi_index = -1
330
331 def pois_callback(self, msg: String):
332 self.get_logger().info("Received POIs from planner: " + msg.data)
333 try:
334 self.pois = json.loads(msg.data)
335
336 pois_dict = {}
337 keys = sorted([int (key) for key in self.pois.keys()])
338 for index, key in enumerate(keys):
339 pois_dict[index] = np.array(self.pois[str(key)]["position"])
340 self.pois = pois_dict
341

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected