Skip to content

feat: SLAM streaming, recording, and playback (issues #78, #82)#86

Open
MoveFastAndBreakThings-dot wants to merge 6 commits into
mainfrom
sam/slam-streaming
Open

feat: SLAM streaming, recording, and playback (issues #78, #82)#86
MoveFastAndBreakThings-dot wants to merge 6 commits into
mainfrom
sam/slam-streaming

Conversation

@MoveFastAndBreakThings-dot

Copy link
Copy Markdown

What this does

Implements the full SLAM data pipeline between Shepard and Emu.

Changes

Streaming (issue #82)

  • SLAMProvider — abstract base class defining get_frame() → SLAMFrame
  • SLAMFrame — holds 3D point cloud (N×3 numpy), drone pose (x/y/z/roll/pitch/yaw), and timestamp
  • SLAMEmuStreamer — background thread that pushes slam_data frames over WebSocket continuously
  • OakdAltimeterSLAMProvider — real provider: fuses OAK-D depth camera + XM125 radar altimeter + MAVLink orientation
    into a georeferenced point cloud
  • DebugSLAMProvider — fake point cloud for testing without hardware
  • Emu.register_slam_streamer() — listens for {"type":"slam","command":"start/stop"} from Emu and starts/stops the
    stream to save bandwidth

Recording & Playback

  • SLAMRecorder — transparent decorator around any SLAMProvider; records every frame to disk as compressed numpy
    (.npz) while passing frames through unchanged
  • SLAMPlaybackProvider — replays a recording at original speed using preserved timestamps; implements SLAMProvider
    so it plugs directly into SLAMEmuStreamer
  • RecordingManager — manages multiple named recordings (list, load, delete)

Samples

  • slam_stream.py — test streaming with fake data (no hardware)
  • slam_stream_real.py — real hardware (Pi + OAK-D + XM125)
  • slam_record.py — record a session, Ctrl+C to stop and save
  • slam_playback.py — replay any saved recording through Emu

Testing

All acceptance criteria verified by 8/8 automated tests:
PYTHONPATH=".:dep/labeller" python tmp/test_slam_local.py

End-to-end tested manually: slam_record.py streams to Emu SLAM tab live, recording saved to disk, slam_playback.py
replays identical session.

Notes

  • recordings/ and tmp/ added to .gitignore — recordings stay local, not committed
  • Real SLAM algorithm (issue Building the SLAM Pipeline #81) plugs in by implementing SLAMProvider.get_frame()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant