跳过至主要内容

控制命令

这些是每帧发送的非持久化命令,每个设备的 commands 将被发送到地图下方。适用范围为 仅限1次 因此,此后将不会保持该状态。停止发送后,设备将恢复到空闲状态。

所有控制命令均专用于 WebSocket(没有与 HTTP 对应的命令)。但如有特别说明则除外。

set_cursor_force​

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

{
"inverse3": [{
"device_id": "049D",
"commands": {
"set_cursor_force": {
"vector": { "x": 0.0, "y": 0.0, "z": 1.5 }
}
}
}]
}
字段型说明
vectorvec3应用空间中的力(单位:牛顿)

力量将在1个 tick 内累加。来自多个来源(应用程序、SDF HFX、导航)的力量将先进行汇总,然后再发送至设备。


set_cursor_position​

这是一条将光标移动到目标位置的命令(位置模式控制)。

{
"inverse3": [{
"device_id": "049D",
"commands": {
"set_cursor_position": {
"position": { "x": 0.0, "y": -0.12, "z": 0.15 }
}
}
}]
}
字段型说明
positionvec3应用空间中的目标位置(单位:米)

该服务会计算将光标移动到目标位置所需的作用力。 当安全轨迹(safe-trajectory)启用时,光标的速度会受到速率限制。


set_angular_torques​

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

{
"inverse3": [{
"device_id": "049D",
"commands": {
"set_angular_torques": {
"torques": { "a0": 0.0, "a1": 0.0, "a2": 0.0 }
}
}
}]
}
字段型说明
torquesangles3关节扭矩

set_angular_position​

将关节指令设定为目标角度(角度位置模式控制)。

{
"inverse3": [{
"device_id": "049D",
"commands": {
"set_angular_position": {
"angles": { "a0": 30.0, "a1": 45.0, "a2": 60.0 }
}
}
}]
}
现场类型说明
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握把 / 无线Verse握把

对于握持式设备,rotation 仅此有效。position 和 scale 虽然会接受 `Inverse3 ` 以保持与模式一致,但这不会影响抓取。

自动漂移使用 Navigation 模块

如果需要连续移动,请手动 set_transform 与其进行流媒体播放,不如 导航模块 请使用该功能。它可自动处理物理模拟、触觉反馈以及工作区边界。


probe_position / probe_orientation​

这是专用于监控的保持活动连接,适用于不发送控制命令的会话(例如:当Haply Hub 监控设备时)。

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

这是会话中的控制命令(set_cursor_force、set_cursor_position(例如)在发送此类数据时,设备的状态会随着每次响应自动更新。探针仅在只读监控会话中有用。