跳转至主要内容

控制命令

这些是发送到字典中的临时且非持久化的命令 commands 每台设备的。这些规定适用于 仅此一次,随后会被忽略:如果您停止发送这些信号,设备将恢复至待机状态。

除非另有说明,否则所有控制命令均为WebSocket 特有(在 HTTP 中没有对应命令)。

set_cursor_force​

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

{
"inverse3": [{
"device_id": "049D",
"commands": {
"set_cursor_force": {
"vector": { "x": 0.0, "y": 0.0, "z": 1.5 }
}
}
}]
}
冠军类型说明
vectorvec3作用于应用空间内的力(单位:牛顿)

在一个时间步长内,各种力量是可累加的——多个来源(您的应用程序、SDF HFX、 导航)的力量会先相加,然后再发送至设备。


set_cursor_position​

将光标移动到目标位置(位置控制模式)。

{
"inverse3": [{
"device_id": "049D",
"commands": {
"set_cursor_position": {
"position": { "x": 0.0, "y": -0.12, "z": 0.15 }
}
}
}]
}
冠军类型说明
positionvec3目标位置(以米为单位),在应用空间内

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


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 est persistante : 该服务会记住上次发送的值。您可以在摄像机移动时持续发送该值,也可以只发送一次并保持不变。

{
"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 et scale 这些 被接受,以确保该模式与Inverse3 保持一致,但对句柄没有任何影响。

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

如果您需要连续移动,请使用 模块导航 与其手动发布 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(等),设备的状态会随着 每次响应自动更新。探头仅适用于只读监控会话。