过滤器
该服务会在传输的信号到达设备之前应用一组滤波器。每个滤波器按会话分别(configure 或者通过 HTTP 进行配置,或者全局配置(设置(通过)进行配置。
过滤器管道
能量依次经过以下阶段:
your force → [osc-damper] → [force-gate] → [damping] → [force-scale] → device
| 步骤 | 角色 | 范围 | 配置方法 |
|---|---|---|---|
| Osc-damper | 检测到振动并降低增益 | 按设备(自动) | 仅限内部使用 — 用户无法配置 |
| 力门 | 对检测到的振动中的力进行衰减 | 按会话 | configure.force_gate 或者 config/filters/force_gate |
| 阻尼 | 添加粘性阻力(标量和/或矢量) | 按会话 | configure.damping 或者 config/filters/damping |
| 力尺 | 所有力量的全局倍率 | 退伍 | POST /settings → devices/force_scale |
启用阻尼功能需要固件版本 7.5 或更高
在固件版本低于 7.5 的设备上, config/filters/damping关于 POST/DELETE 请求 device-protocol-unsupported 与活动一同 HTTP 422返回该响应。(此前,写入操作会被静默忽略,但仍会返回 200 响应。)请将设备固件升级至 7.5 及以上版本,或处理 422 响应。
安全轨迹 (Safe trajectory)
“安全轨迹”是指 定位模式 这是一个过滤器。 set_cursor_position在使用时,会限制光标速度,以确保光标能平滑地移动到目标位置。
| 设置键 | 默认值 | 说明 |
|---|---|---|
features/safe_trajectory/enabled | false | 启用位置限速 |
features/safe_trajectory/max_vel | 0.5 | 最大光标速度(米/秒) |
在“设置”中按以下方式进行配置:
curl -X POST http://localhost:10001/settings \
-H "Content-Type: application/json" \
-d '{"features/safe_trajectory/enabled": true, "features/safe_trajectory/max_vel": 0.3}'