fix: P0+P1 audit — memory leak, hardcoded camera/GPS, lifespan init, background processing, batch validation, ABC interfaces

This commit is contained in:
Yuzviak
2026-03-22 23:35:12 +02:00
parent 8649d13a78
commit ca327034c0
9 changed files with 161 additions and 38 deletions
+13 -4
View File
@@ -155,19 +155,28 @@ async def test_ac4_user_anchor_fix(wired_processor):
flight = "ac4_anchor"
graph = wired_processor._graph
# Inject initial pose
# Inject two poses
graph._init_flight(flight)
graph._flights_state[flight]["poses"][0] = Pose(
frame_id=0, position=np.zeros(3),
orientation=np.eye(3), timestamp=datetime.now(),
)
graph._flights_state[flight]["poses"][1] = Pose(
frame_id=1, position=np.zeros(3),
orientation=np.eye(3), timestamp=datetime.now(),
)
gps = GPSPoint(lat=49.5, lon=31.0)
ok = graph.add_absolute_factor(flight, 0, gps, np.eye(2), is_user_anchor=True)
# First GPS sets origin
origin = GPSPoint(lat=49.0, lon=30.0)
graph.add_absolute_factor(flight, 0, origin, np.eye(2), is_user_anchor=True)
# Second GPS — 0.5° north
gps2 = GPSPoint(lat=49.5, lon=31.0)
ok = graph.add_absolute_factor(flight, 1, gps2, np.eye(2), is_user_anchor=True)
assert ok is True
traj = graph.get_trajectory(flight)
assert traj[0].position[1] > 50000 # ~55 km north of origin
assert traj[1].position[1] > 50000 # ~55 km north of origin
# ---------------------------------------------------------------