Skip to content

Fix tactile sensor port auto-detection#72

Merged
clemens-chr merged 1 commit into
mainfrom
fix/tactile-sensor-port-autodetect
May 14, 2026
Merged

Fix tactile sensor port auto-detection#72
clemens-chr merged 1 commit into
mainfrom
fix/tactile-sensor-port-autodetect

Conversation

@fabricenoelbourquin

Copy link
Copy Markdown
Member

Summary

  • Validate sensor response with get_tactile_configuration() after connect() succeeds, so a wrong-device port (e.g. /dev/ttyACM1 when the sensor is on /dev/ttyACM0) falls through to VID-based auto-detect instead of silently appearing "connected"
  • Remove the chosen != self.config.sensor_port guard on the auto-detect path — if the configured port failed validation, a VID match on the same port should still be retried
  • Apply the same validation on the auto-detect path for consistency
  • Simplify example_tactile.py to a single main function

Test plan

  • uv run python scripts/example_tactile.py — auto-detects correct port and streams forces
  • uv run python scripts/test_sensors.py orca_core/models/v2/orcahand-touch — explicit port still works
  • uv run pytest tests/ — 210 tests pass

🤖 Generated with Claude Code

… wrong device

After connect() succeeds, validate with get_tactile_configuration() to confirm
the sensor actually responded. If not, disconnect and fall through to VID-based
auto-detect. Also remove the guard that skipped auto-detect when the VID match
was the same port as the configured one. Simplify example_tactile.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@maximilianeberlein maximilianeberlein left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good stuff

@clemens-chr
clemens-chr merged commit 9dba137 into main May 14, 2026
1 check passed
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.

3 participants