跳转到内容
English

Motion 运动控制

执行目标轨迹、实时 Servo、托管拖拽、示教与回放。

适用于受支持的 21 DOF 产品。PB1、PT1、DB1、DT1 的运动能力尚未验证。

查看产品支持矩阵

以下片段在已连接的 hand 上执行。Python 位于 async 函数内;C++ 需包含 revo3/revo3.hpp、iostream、vector、chrono 和 stdexcept,并在应用边界处理 SdkError。

state = await hand.state.snapshot()
target = list(state.positions_deg)
handle = await hand.motion.move_to(target, duration=1.0)
result = await handle.wait(timeout=3.0)
print(result)
const auto state = hand.state().snapshot();
const auto layout = hand.joint_layout();
if (!layout) throw std::runtime_error("Joint layout is unavailable");
std::vector<float> target(
state.motors.positions_deg,
state.motors.positions_deg + layout->joint_count);
auto handle = hand.motion().move_to(target, std::chrono::seconds(1));
const auto result = handle.wait(std::chrono::seconds(3));
操作 参数 返回值
Motion.move_to(target, duration) 目标角度数组(degree);时长(Python 秒 / C++ duration) OperationHandle
OperationHandle.wait(timeout) 等待上限(Python 秒 / C++ duration) OperationState

按操作查阅完整签名、默认值、单位与 Python / C++ 差异:

目标轨迹与 ServoSession 不能并行控制同一只 Hand,冲突返回 ControlConflict。等待超时或 Indeterminate 不证明运动停止;读取实际状态后再决定恢复操作。

错误、超时与重试 · 语言绑定差异