Skip to content

Repository files navigation

robot-sawdust-radio

I wanted a toolpath failure to sound wrong before I knew how to describe it.

robot-sawdust-radio reads a small G-code program, derives motion features, flags explicit feed/acceleration/jerk rules, and maps the result to a WAV file and a timestamped ASCII strip. It works offline and does not pretend the generated sound is a physical recording of a machine.

normal: ............................................................
spike:  ........................................###.................
                                           3.703 s, line 12

Listen to the four-second synthetic spike or reproduce it:

python -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"

rsr watch fixtures/gcode/demo_spike.gcode \
  --out demo.wav \
  --json anomalies.json

A negative control is included:

rsr watch fixtures/gcode/clean_cut.gcode --ascii-only
pytest -q

What the sound means

The parser tracks G0/G1 moves and programmed feed rate. Segment time gives simple acceleration and jerk proxies. Rules mark abrupt changes, and the sonifier adds a harsh high band around those timestamps. The JSON output remains the source of truth; audio is an attention aid.

This separation is deliberate. An earlier, more playful direction risked becoming “G-code music” with no definition of failure. Here every audible alarm points back to a named rule, source line, timestamp, and numeric reason.

Limits worth knowing

  • The parser ignores most G/M words and controller dialects.
  • Acceleration and jerk are inferred from programmed moves, not measured by an encoder or microphone.
  • Default thresholds are tuned to the synthetic fixtures.
  • It does not model controller look-ahead, machine dynamics, collisions, or tool load.
  • This is not an industrial safety system.

Research lineage

I worked as a research assistant at SCI-Arc Research from May 2024 to January 2025. This independent implementation was inspired by the material-efficiency and robotic-fabrication questions in Construction Innovation: AI and Robotic Fabrication, credited to Casey Rehm, Masha Hupalo, Carolina Silva Garcia, and Julia Pike. No research imagery, partner toolpaths, or machine data is included. See ATTRIBUTION.md and PROVENANCE.md.

MIT — see LICENSE.

About

Offline G-code motion anomaly detection through rules, timestamps, ASCII, and sound.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages