slam
slam.py
Overview
slam.py is a minimal SLAM façade that publishes a blank occupancy map and identity odometry so that navigation stacks (e.g. move_base, rviz) can start before a real SLAM backend is available. It defines exactly which message types and frames future SLAM solutions must honour.
Interfaces (strongly-typed, stateless)
Direction / Type |
Topic |
Semantics |
---|---|---|
Required (sub) |
|
|
Required (sub) |
|
|
Provided (pub, latched) |
|
|
Provided (pub, latched) |
|
|
Coordinate frames
map
←— identity —→ odom
←— real TF —→ base_link
No TF broadcaster here; downstream must supply static or real transforms.
Contract
Pre-conditions
Nodes publish /fused_scan at ≥ 1 Hz.
/odom_proc provides any Odometry messages (not used by stub).
Post-conditions
On the first incoming scan or odom message each publisher latches and makes the blank map and identity odom available.
No further updates unless subscribers re-connect.
Implementation notes
Map: 10 × 10 cells, 0.05 m resolution, origin (–2.5, –2.5) so (0,0) is map centre.
Odometry: pose = (0,0,0), orientation = unit quaternion, twist = zero.
Replace update_map and update_pose stubs to integrate real SLAM algorithms.
Classes
|
Stub container wiring subscribers and latched publishers. |