Open source · RPLIDAR C1 · macOS

Live RPLIDAR C1 scans on your Mac.

Sub-200 ms startup, 460 800 baud, zero dropped frames. PySide6 + pyqtgraph.

Unsigned build — first launch needs a Gatekeeper bypass. Release notes.

Live PolarScope capture showing dots on a polar plot rotating in real time as the LIDAR scans. Screenshot of the PolarScope window with a captured scan frame.
Live capture from a Slamtec RPLIDAR C1 over USB-C.

What you get.

  • Live polar plot

    ~10 Hz scans rendered in real time with scan-rate and point-count readout.

  • Port auto-discovery

    Filters pyserial enumeration to USB-CDC / CP210x. One click.

  • Snapshot PNG

    Retina-aware, device-pixel resolution.

  • CSV recording

    Per-scan append, blinking REC indicator while active.

  • Range & quality filter

    5 cm – 12 m, quality > 0.

  • Background QThread

    UI never blocks on serial I/O.

Built like a piece of instrumentation.

Four engineering decisions that make the C1 behave on macOS.

  1. lidar/worker.py

    We bypass pyrplidar.scan_generator().

    The generator aborts on the first short serial read, and the C1 has ~200 ms of startup lag after SCAN. We read raw 5-byte frames straight off pyserial.

  2. lidar/worker.py

    dsrdtr=False re-open on connect.

    pyrplidar opens the serial with hardware flow control on, which blocks the C1's TX stream. We re-open the underlying pyserial.Serial without it.

  3. lidar/worker.py

    4 s watchdog, no silent reconnect.

    First-data delays and transient stalls both raise. Reconnects require an explicit user gesture so hardware issues stay visible.

  4. ui/main_window.py

    DirectConnection + lock for the recorder.

    Record toggles must dispatch mid-scan — a QueuedConnection cannot. Cross-thread safety comes from worker._recorder_lock.

Quick start.

git clone https://github.com/rishimule/polarscope.git
cd polarscope
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python main.py

Hardware

  • Slamtec RPLIDAR C1 (460 800 baud, USB-C → CP210x UART).
  • macOS 11+ ships the Apple-signed CP210x driver — no install.
  • Device enumerates as /dev/cu.usbserial-*.