gsc_pgo: online and offline PGO #2587
Conversation
Convert the memory2 Recorder from thread/disposable rx subscriptions to manual async callbacks via process_observable, and let pose_setter_for methods be async (awaited in _resolve_pose). Update the fastlio and go2 recorders accordingly.
Raise TypeError at decoration time if a non-async function is decorated, and always await the setter in _resolve_pose.
…imos into jeff/fix/pose_setter_for
…kitti, voxel_map, module_loading)
process_observable gains an optional on_drop callback fired once per message dropped by the dispatcher's single-slot LATEST mailbox. The Recorder uses it to count dropped frames per stream and log a throttled warning, so a slow sink no longer loses data silently.
Greptile SummaryThis PR ports the PGO / loop-closure stack into the
Confidence Score: 4/5Safe to merge for production paths; the two defects are confined to the offline eval harness and do not affect live robot operation. The
Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant BT as benchmark_table.py
participant EP as eval.py
participant LR as LockstepReplay
participant PGO as PGO Module
participant GC as GraphCapture
BT->>EP: subprocess(eval.py, env×col)
EP->>LR: start (load db, merge odom+lidar)
EP->>PGO: start (native C++ iSAM2+ICP)
EP->>GC: start (capture pose_graph)
loop for each message (time-sorted)
alt odom message
LR->>PGO: odometry.publish (fire-and-forget)
else lidar scan
LR->>PGO: lidar.publish
LR->>LR: wait for corrected_odometry ack (≤30s)
PGO-->>LR: corrected_odometry (ack)
end
PGO->>GC: pose_graph / loop_closure_event
end
GC->>EP: write graph JSON (teardown)
EP->>EP: score (tag agreement + voxel agreement)
EP->>BT: summary.json (fingerprint + scores)
BT->>BT: cell_is_fresh? (db size+mtime, version≠None ← bug)
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant BT as benchmark_table.py
participant EP as eval.py
participant LR as LockstepReplay
participant PGO as PGO Module
participant GC as GraphCapture
BT->>EP: subprocess(eval.py, env×col)
EP->>LR: start (load db, merge odom+lidar)
EP->>PGO: start (native C++ iSAM2+ICP)
EP->>GC: start (capture pose_graph)
loop for each message (time-sorted)
alt odom message
LR->>PGO: odometry.publish (fire-and-forget)
else lidar scan
LR->>PGO: lidar.publish
LR->>LR: wait for corrected_odometry ack (≤30s)
PGO-->>LR: corrected_odometry (ack)
end
PGO->>GC: pose_graph / loop_closure_event
end
GC->>EP: write graph JSON (teardown)
EP->>EP: score (tag agreement + voxel agreement)
EP->>BT: summary.json (fingerprint + scores)
BT->>BT: cell_is_fresh? (db size+mtime, version≠None ← bug)
Reviews (7): Last reviewed commit: "Merge branch 'main' into jeff/feat/jnav_..." | Re-trigger Greptile |
❌ 3 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
…eff/feat/jnav_pgo
…ose cached stores
…ms) so add_april imports resolve
gsc_pgo, Ports the PGO / loop-closure stack into the new
jnavlayout, plus a tf-tree feature formemory2stores.