Skip to content

Feature/tactile sensing#69

Merged
maximilianeberlein merged 21 commits into
mainfrom
feature/tactile-sensing
May 14, 2026
Merged

Feature/tactile sensing#69
maximilianeberlein merged 21 commits into
mainfrom
feature/tactile-sensing

Conversation

@maximilianeberlein

Copy link
Copy Markdown
Contributor

merge tactile sensing into main

fabricenoelbourquin and others added 21 commits March 27, 2026 19:20
Introduce protocol.py as a pure-function codec for the sensor wire
format (frame building, parsing, decoding). Tighten validation
(header checks, meta size guards, strict KeyError on missing taxels),
move wire-format constants to constants.py, and reduce protocol
knowledge leaking into sensor_client.py.
Moves the web-based sensor visualization (Flask/SocketIO) out of orca_core
per reviewer feedback on separation of concerns. The UI now lives in its
own repo and depends on orca_core as an external package.
Add MockOrcaHandTouch class backed by mock motor and sensor clients for
testing hand+sensor workflows without hardware. Extract _create_sensor_client
factory method from OrcaHandTouch to mirror the existing _create_motor_client
pattern. Update sensor client type annotations to use PEP 604 union syntax.
- Clarify get_tactile_forces/get_tactile_taxels docstrings to show
  string-keyed dict access pattern and list valid finger keys
- Remove unused taxel_coordinates module: 3D coordinate data is only
  consumed by the visualization UI, which now lives in orca_ui. Taxel
  counts remain in constants.py where the mock client uses them.
Lets tests synchronize on auto-stream startup without polling, and
configure per-finger taxel counts via the constructor instead of
mutating private state.
Replace class-based tests with module-level functions, parametrize
where it tightens coverage, and use wait_for_first_frame() instead of
the polling helpers.
Mock now round-trips through the real codec so wire-format bugs surface in tests.
OrcaHandTouch.connect() now mirrors the motor cascade: configured port first, then USB-VID auto-detection, with a successful auto-detect persisted to config.yaml. Adds connect_sensors_only() for motor-less sensor testing and makes get_auto_stats() return a snapshot copy so callers can diff values across calls.
# Conflicts:
#	orca_core/constants.py
#	orca_core/hand_config.py
#	orca_core/hardware_hand.py
@maximilianeberlein maximilianeberlein merged commit 1e7e1bd 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.

2 participants