跳过至主要内容

向 3.5 的过渡

本页面是 Inverse Service 3.5 的综合升级指南。本文将介绍该服务中所有已弃用的项目。具体而言,4.0 计划删除的旧版 3.0 这些是已弃用的 HTTP 端点、已弃用的会话通道模拟命令以及已弃用的线格式。

此处列出的所有不推荐项目,出于向后兼容性的考虑,在网络上仍将继续被接受。即使进行升级,也不会导致任何功能失效。请在方便的时候规划迁移事宜。


3.0 和 3.x API 版本​

该服务同时提供两种 JSON 格式。端口 10000 的传统 3.0 格式和端口 10001 当前的 3.x 这是格式。为了保持向后兼容性,这两种格式都将保持可用状态。3.0 该集成在升级后仍可照常运行,无需进行任何更改。

警告

4.0 那么 3.0 该 API 版本将停止支持。

  • 3.0 应用程序接口

    • 详情请见 3.0.x 文档页面中有所记载。
    • HTTP 是 http://localhost:10000/3.0/ 可在……中使用。
    • Websockets 是端口 10000 可在……中使用。
  • 3.x 应用程序接口

    • 详情请见 3.x 文档页面中有所记载。
    • HTTP 是 http://localhost:10001/ 可在……中使用。
    • Websockets 是端口 10001 可在……中使用。
    • 功能得到了改进,与游戏引擎的集成速度也提高了。

请在方便的时候进行升级。现有工作流程不会因此中断。


不推荐使用的 HTTP 端点​

以下端点仍可接受请求,但会输出“不建议使用”的警告。4.0 该路径计划被删除。请改用替代路径。

不推荐的路径替换目标
POST /force_scalePOST /settings/devices/force_scale
POST /gravity_compensationPOST /{type}/{id}/config/gravity_compensation
POST /torque_scalingPOST /{type}/{id}/config/torque_scaling
POST /device_handednessPOST /{type}/{id}/config/handedness
POST /serial_enablePOST /settings/system/serial_enable
POST /experimental/features/grip_dropped_simulation_stopperPOST /settings/features/grip_hook/enabled
POST /experimental/features/screensaver_enablePOST /settings/features/screensaver/enabled

各不推荐路线将在活动频道中公布 http-route-deprecated 触发该事件。该事件包含旧路由和替换后的路由。


不推荐使用的会话通道命令​

以下两个会话级模拟命令已不推荐使用,并计划在未来的重大版本中移除。在 Wire 上仍可继续使用。在新集成中,请使用“替代”列中列出的 configure 请使用该条目。

所有不推荐的命令,请在事件频道中 command-deprecated 触发事件。

session.set_coordinate_origin → inverse3[*].configure.preset​

// Old — deprecated
{ "session": { "set_coordinate_origin": { "coordinate_origin": "workspace_center" } } }

// New — canonical
{ "inverse3": [ { "device_id": "…", "configure": { "preset": { "preset": "arm_front_centered" } } } ] }

值的映射:

旧 coordinate_origin新预设
device_basearm_front(或 defaults)
workspace_centerarm_front_centered

预设并非用于切换整个会话,而是针对每个设备分别应用。应用时需 inverse3[*].configure.preset(或 verse grip / 无线 verse grip 设备条目) configure.preset)进行操作。有关预设名称的完整列表,请参阅《仿真参考手册》中的 “配置”部分 请参阅。

session.set_basis → session.configure.basis​

// Old — deprecated
{ "session": { "set_basis": { "basis": { "permutation": "X-ZY" } } } }

// New — canonical
{ "session": { "configure": { "basis": { "permutation": "XZ-Y" } } } }
轴的符号约定已更改

参考资料​