为基础示例接入按设备 ID 选择的力标定

让使用者从本地目录选标定并看见实际单位。短片回放及相关测试通过。
This commit is contained in:
ykcheungab
2026-10-05 14:02:40 +08:00
parent 8c147f03aa
commit ceb06f5702
8 changed files with 51 additions and 9 deletions
+8 -2
View File
@@ -94,13 +94,19 @@ cfg = orisys.export_config("box", "./config/exported_config.json")
For multiple physical sensors, keep calibration files in a user-selected directory:
`<calibration_dir>/<product>/<device_id>.json` (for example,
`./calibrations/box/BOX-001.json`). Each file uses the existing calibration JSON
`data/calibrations/box/BOX-001.json`). Each file uses the existing calibration JSON
format and must contain matching `identity.sensor_type` and `identity.sn`, Newton
curves for FN/FX/FY, and a compatible measurement pipeline. Enter the device ID
manually until hardware identification is available:
The source checkout provides `data/calibrations/{box,mini,finger}/` folders; device
files placed there are ignored by Git. This location is optional: pass
`--calibration-dir data/calibrations`
and `--device-id BOX-001` to `examples/basic_pipeline.py` to select a file there.
Installed wheels do not create or search this directory automatically.
```python
sensor = orisys.Sensor(0, config_name="box", calibration_dir="./calibrations", device_id="BOX-001")
sensor = orisys.Sensor(0, config_name="box", calibration_dir="data/calibrations", device_id="BOX-001")
```
If that ID has no file, the sensor reports raw force; it never falls back to the