跳转至主要内容

控制命令

这些是在每个时钟周期内发送的、非持久性命令,它们在 commands- 每个设备的映射都需要传递。它们将被 einmal 使用后即被遗忘。如果您不再发送,设备将恢复至待机状态。

除非另有说明,否则所有控制命令仅适用于 WebSocket(在 HTTP 中没有对应命令)。

set_cursor_force​

对光标(末端执行器)施加一个笛卡尔力。

{
"inverse3": [{
"device_id": "049D",
"commands": {
"set_cursor_force": {
"vector": { "x": 0.0, "y": 0.0, "z": 1.5 }
}
}
}]
}
费尔德Typ描述
vectorvec3牛顿应用空间中的克拉夫特

在一个时钟周期内,力是可累加的——多个来源(您的应用程序、SDF HFX、 导航)的力会在发送至设备之前进行累加。


set_cursor_position​

命令光标移动到目标位置(位置模式下的控制)。

{
"inverse3": [{
"device_id": "049D",
"commands": {
"set_cursor_position": {
"position": { "x": 0.0, "y": -0.12, "z": 0.15 }
}
}
}]
}
费尔德Typ描述
positionvec3应用空间中的目标位置(单位:米)

该服务会计算将光标移动到目标位置所需的作用力。 如果启用了“安全轨迹”功能,光标速度将受到限制。


set_angular_torques​

对三个关节施加扭矩(在角力模式下控制)。

{
"inverse3": [{
"device_id": "049D",
"commands": {
"set_angular_torques": {
"torques": { "a0": 0.0, "a1": 0.0, "a2": 0.0 }
}
}
}]
}
费尔德Typ描述
torquesangles3节点转矩

set_angular_position​

命令关节移动至目标角度(在角度-位置模式下控制)。

{
"inverse3": [{
"device_id": "049D",
"commands": {
"set_angular_position": {
"angles": { "a0": 30.0, "a1": 45.0, "a2": 60.0 }
}
}
}]
}
费尔德Typ描述
anglesangles3目标关节角度(单位:度)

set_transform​

执行工作空间转换(设备空间 → 应用空间)。与其他 命令不同的是, set_transform 持久的: 该服务会记住上次发送的 数值。您可以在摄像头移动时实时传输该数值,或者只发送一次并保持不变。

{
"inverse3": [{
"device_id": "049D",
"commands": {
"set_transform": {
"transform": {
"position": { "x": 1.0, "y": 0.0, "z": 0.0 },
"rotation": { "x": 0.0, "y": 0.0, "z": 0.0, "w": 1.0 },
"scale": { "x": 1.0, "y": 1.0, "z": 1.0 }
}
}
}
}]
}
Verse Grip / 无线Verse Grip

对于握力训练器械,只有 rotation. position und scale 这些数据将根据Inverse3 的规范被接受,但不会对抓地力产生影响。

使用导航模块实现自动漂移

如果您需要持续移动,请改用 导航模块, statt set_transform 手动进行流式传输。它将为您处理物理模拟、触觉 反馈以及工作空间的限制。


probe_position / probe_orientation​

仅用于监控的会话保持消息,这些会话不发送控制命令 (例如,Haply 集线器仅用于监控设备时)。

{
"inverse3": [{ "device_id": "049D", "commands": { "probe_position": {} } }]
}
{
"verse_grip": [{ "device_id": "DEF456", "commands": { "probe_orientation": {} } }]
}
您可能不需要这些

如果您的会话已经在发送控制命令(set_cursor_force, set_cursor_position (等等),设备状态会随着每次响应自动更新。Probes 仅适用于纯监控会话(仅读取访问)。