跳过至主要内容

设备设置

设备设置位于各设备的 configure 地图(WebSocket),或 /{device_type}/{id}/config/{key} 将通过 HTTP 路由发送。所有条目均持久的。一旦设置,该设置将一直保持有效,直到被更改为止。

设置可用性矩阵​

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

关键WS configure超文本传输协定 config/会话作用域注释
preset✓✓✓mount与排他性
basis✓✓✓会话级别和按设备
mount✓✓✓preset与排他性
damping✓✓✓标量和/或分量
force_gate✓✓✓防震护罩
handedness—✓—整个设备(右/左)
torque_scaling—✓—所有设备
gravity_compensation—✓—所有设备
home_return—✓—固件尚未启用
navigation✓✓✓模块 → 请参阅专用页面

preset​

选择一个命名好的出厂配置,一次性设置安装点、基准点和工作区原点。完整列表请参阅“安装点和工作区(预设)”。

预设仅针对设备当时的状态应用一次。此后,如果改变设备的方向,工作区也会随之旋转,而位于中央的预设将 custom 将被解读为。如需再次居中对齐,请重新应用该操作。详情请参见 预设仅应用一次 请参阅。

{ "inverse3": [{ "device_id": "049D", "configure": { "preset": { "preset": "arm_front_centered" } } }] }
curl -X POST "http://localhost:10001/inverse3/049D/config/preset?session=:0" \
-d '{"preset":"arm_front_centered"}'

basis​

设置设备坐标轴的重新映射。请将此设置发送至所有使用的设备(包括Verse Grips)。即使在检测到后续添加的设备时,也需重新发送此设置。有关规则和迁移的注意事项,请参阅《Basis Permutation》。

{ "inverse3": [{ "device_id": "049D", "configure": { "basis": { "permutation": "XZY" } } }] }

session.configure.basis 这是一个快捷方式,可在收到消息时,将相同的 basis 写入会话当前所包含的所有设备中。

{ "session": { "configure": { "basis": { "permutation": "XZY" } } } }
这只是一个快捷方式,并非未来将添加的设备设置

后来添加的设备不会收到此消息,XYZ 以……开头。该快捷方式还会覆盖此前发送的所有设备基准坐标。详情请参见 所有设备均采用相同的基准坐标系 请参阅。

curl -X POST "http://localhost:10001/inverse3/049D/config/basis?session=:0" \
-d '{"permutation":"XZY"}'

mount​

将覆盖物理安装变换。有关坐标变换管道,请参阅“安装与工作区”。

{
"inverse3": [{
"device_id": "049D",
"configure": {
"mount": {
"transform": {
"position": { "x": 0.0, "y": 0.0, "z": 0.0 },
"rotation": { "w": 1.0, "x": 0.0, "y": 0.0, "z": 0.0 },
"scale": { "x": 1.0, "y": 1.0, "z": 1.0 }
}
}
}
}]
}
curl -X POST "http://localhost:10001/inverse3/049D/config/mount?session=:0" \
-H "Content-Type: application/json" \
-d '{"transform":{"position":{"x":0,"y":0,"z":0},"rotation":{"w":1,"x":0,"y":0,"z":0},"scale":{"x":1,"y":1,"z":1}}}'
警告
mount 和 preset 不能同时指定

请勿在同一条消息中同时包含这两项。系统会将其视为模糊指定而予以拒绝。


damping​

同时控制均匀阻尼和方向性阻尼。 必须至少指定一个字段。

{ "inverse3": [{ "device_id": "049D", "configure": { "damping": { "scalar": 0.5 } } }] }

方向性:

{ "inverse3": [{ "device_id": "049D", "configure": { "damping": { "vector": { "x": 0.0, "y": 1.0, "z": 0.0 } } } }] }
curl -X POST "http://localhost:10001/inverse3/049D/config/filters/damping?session=:0" \
-d '{"scalar": 0.5}'

force_gate​

振动保护装置——一旦检测到振动,将减弱输出功率。

值效果
gain = 0.0无效——力以最大值通过
gain = 1.0振动过程中的最大衰减
{ "inverse3": [{ "device_id": "049D", "configure": { "force_gate": { "gain": 0.5 } } }] }
curl -X POST "http://localhost:10001/inverse3/049D/config/filters/force_gate?session=:0" \
-d '{"gain": 0.5}'

HTTP专用设备设置​

以下设置是适用于整个设备的设置(而非按会话为单位), 且仅可通过 HTTP 进行配置:

端点正文说明
POST /{type}/{id}/config/handedness"left" 或 "right"Inverse3的惯用手设置
POST /{type}/{id}/config/torque_scaling{ "enabled": bool }切换Torx缩放功能的启用/禁用状态
POST /{type}/{id}/config/gravity_compensation{ "enabled": bool, "scaling_factor": float }重力校正
POST /{type}/{id}/config/home_return{ "enabled": bool }返回主界面(固件尚未启用)

均 GET(读取当前值)、POST(设置)、DELETE支持(恢复默认设置)。