Commit 1e7e1bd
Feature/tactile sensing (#69)
* Add tactile sensing integration with OrcaHandTouch subclass
* Created constants file, moved sensor clients into hardware folder and moved constants into new constants file
* Major refactor of MockSensorClient to reduce duplication with base class, removed hardware version methods
* Extract protocol codec layer and harden contracts
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.
* Remove tactile sensing UI to separate orca_ui repository
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 and modernize type annotations
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.
* Address review feedback on tactile sensing API
- 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.
* Simplify auto-stream error handling and reconfiguration
* Address review feedback: rename stats fields, narrow excepts, remove dead code
* Add wait_for_first_frame and taxel_counts to MockSensorClient
Lets tests synchronize on auto-stream startup without polling, and
configure per-finger taxel counts via the constructor instead of
mutating private state.
* Refactor tactile sensor tests to flat parametrized style
Replace class-based tests with module-level functions, parametrize
where it tightens coverage, and use wait_for_first_frame() instead of
the polling helpers.
* Fix resultant decoder to read low byte only
Mock now round-trips through the real codec so wire-format bugs surface in tests.
* Add tactile sensor port cascade and bring-up helpers
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.
* Add tactile sensor health-check script
* Remove dead reconfiguration code and simplify health-check zeroing
* Rename SensorClient to TactileClient and add combined-data accessor
* -Revert .gitignore chagnes unrelated to tactile sensing
* Tighten tactile-sensing comments, drop unused mock kwarg, add pyserial
* Add FingerName Literal type and consolidate test_protocol.py
* Drop name-restating docstrings, add pyserial dep
---------
Co-authored-by: Fabrice Bourquin <fabrice.bourquin@protonmail.ch>1 parent b06cd40 commit 1e7e1bd
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1477 | 1477 | | |
1478 | 1478 | | |
1479 | 1479 | | |
1480 | | - | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
1481 | 1492 | | |
1482 | 1493 | | |
1483 | 1494 | | |
| |||
0 commit comments