Python driver and data collection tools for the BMP585 barometric tactile sensor, developed in MSR Robotics. The sensor re-purposes a barometric pressure chip as a tactile sensor for robot grippers.
Before using the Python driver, complete the following hardware steps:
-
PCB — Order the sensor breakout and microcontroller shield. See
barometer/parts/README.mdfor Gerber files and JLCPCB ordering instructions. -
Casting — Cast the silicone sensor pad using the mold files in
barometer/parts/README.md. -
Firmware — Upload firmware to the board. See
barometer/firmware/README.mdfor board setup, library installation, and upload instructions. -
Gripper mount — 3D-print and assemble the mount for your robot. See
barometer/parts/README.mdfor STL/STEP files and fastener specs.
git clone <repo-url>
cd anypressure/
conda create -n anypressure python=3.10
conda activate anypressure
pip install -e .If you see a Permission denied error on /dev/ttyACM*, you can grant access one-time with:
sudo chmod 666 /dev/ttyACM0Persistent fix: udev rules
Create a udev rule so the port is always accessible without sudo, and optionally give it a stable name.
1. Find your device's vendor ID, product ID, and serial number:
# List USB devices — find your board and note the ID (e.g. 239a:800b)
lsusb
# Get full attributes for the connected port
udevadm info -a -n /dev/ttyACM0 | grep -E 'idVendor|idProduct|serial'2. Create a udev rule — replace XXXX and YYYY with your vendor and product IDs:
sudo nano /etc/udev/rules.d/99-tactile-sensor.rulesSUBSYSTEM=="tty", ATTRS{idVendor}=="XXXX", ATTRS{idProduct}=="YYYY", MODE="0666"
To also match by serial number (useful when using multiple different boards):
SUBSYSTEM=="tty", ATTRS{idVendor}=="XXXX", ATTRS{idProduct}=="YYYY", ATTRS{serial}=="YOUR_SERIAL", MODE="0666"
To also assign a stable symlink (e.g. /dev/tactile0), add SYMLINK+=:
SUBSYSTEM=="tty", ATTRS{idVendor}=="XXXX", ATTRS{idProduct}=="YYYY", ATTRS{serial}=="YOUR_SERIAL", MODE="0666", SYMLINK+="tactile0"
The symlink appears under /dev/tactile0 and can be passed directly to --port /dev/tactile0.
3. Reload and apply:
sudo udevadm control --reload-rules && sudo udevadm triggerReconnect the board — the port should now be accessible without sudo.
Stream and visualize all sensor channels in real time. Layout is one row per sensor, with pressure and temperature side by side.
# python scripts/live_plot.py --port <port>
python scripts/live_plot.py --port /dev/ttyACM0With baseline subtraction — sensor values start at ~0 and reflect change from the resting state:
python scripts/live_plot.py --port /dev/ttyACM0 --baselineOptions:
| Flag | Default | Description |
|---|---|---|
--port |
required | Serial port of the sensor |
--baseline |
off | Subtract a resting baseline so readings start at ~0 |
--window-size |
100 | Rolling window in samples |
--plot-rate |
30 | Plot update rate in Hz |
Keyboard shortcuts while the plot is open:
| Key | Action |
|---|---|
r |
Reset baseline from current readings |
q |
Close window |
h |
Print shortcuts to console |
Collect continuous data to a CSV file. Saves to experiment/data/MMDD_<SN>.csv.
python scripts/collect_data.py --port <port> --sn <sn> --duration <min>
python scripts/collect_data.py --port /dev/ttyACM0 --sn V20S5 --duration 10With baseline subtraction (baseline values written to CSV header so raw signal is always recoverable):
python scripts/collect_data.py --port /dev/ttyACM0 --sn V20S5 --duration 10 --baselineOptions:
| Flag | Default | Description |
|---|---|---|
--port |
required | Serial port of the sensor |
--sn |
required | Serial number — used in the output filename |
--duration |
required | Collection duration in minutes |
--baseline |
off | Subtract resting baseline; baseline values saved to CSV header |
--sample-rate |
30 | Logging rate in Hz (independent of sensor ODR) |
--no-plot |
off | Disable the live plot during collection |
Press Ctrl+C to stop early — the CSV is flushed and closed cleanly.
python scripts/plot_data.py experiment/data/MMDD_{SN}.csvSaves a PNG alongside the CSV. Auto-detects sensor fields from column names.
Options:
| Flag | Default | Description |
|---|---|---|
--show |
off | Open an interactive plot window in addition to saving the PNG |
--file |
— | Alternative to the positional argument: --file path/to/data.csv |