feat(localization): integrate LIO ROS TF, replay and validated AMCL replacement

GCC 15.2 C++23 clean rebuild: zero warnings. All 11 xmake test suites pass. Independent 120 s Gazebo replay: ATE 0.005279 m / 0.191335 deg; 1 s RPE 0.005358 m / 0.099086 deg. Both startup entry points validate Nav2 activation, no AMCL, and a single map-to-odom publisher.
This commit is contained in:
mzx committed 2026-11-22 01:44:36 +08:00
1 parent 55e9456e4a
commit b833e6f658
30 files changed
+1314 -329

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
#!/usr/bin/env python3
"""Exit successfully only after simulation clock and basic robot TF are available."""
import time
import rclpy
from rclpy.node import Node
from rclpy.parameter import Parameter
from rclpy.time import Time
from tf2_ros import Buffer, TransformListener
def main():
rclpy.init()
node = Node('wait_navigation_ready', parameter_overrides=[Parameter('use_sim_time', value=True)])
buffer = Buffer(node=node)
listener = TransformListener(buffer, node)
result = 1
try:
deadline = time.monotonic()+180
while rclpy.ok() and time.monotonic() < deadline:
rclpy.spin_once(node, timeout_sec=0.1)
if (node.get_clock().now().nanoseconds > 0
and buffer.can_transform('odom', 'base_link', Time())
and buffer.can_transform('base_link', 'lidar_link', Time())):
print('simulation clock and odom/base/lidar TF ready', flush=True)
result = 0
break
if result:
print('simulation clock/TF readiness timeout', flush=True)
finally:
_ = listener
node.destroy_node()
rclpy.shutdown()
return result
if __name__ == '__main__':
raise SystemExit(main())