运动控制
机器人带有避障的弧度运动
方法名称:motionArcWithObstacles
备注:需要使用底盘的功能组件,都是互斥的。比如底盘行走、导航、回冲、焦点跟随等。请不要同时使用他们,会造成错误
调用示例:
//设置运动回调
this.callback = new CommandListener()
this.callback.addListener(
CommandListener.EVENT_RESULT,
(result: any) => {
console.log(TAG, 'motionArcWithObstacles onResult', result);
}
);
//运动调用
RobotApi.motionArcWithObstacles(
this.callback ? this.callback.getId() : -1,
this.lineSpeed,
this.angularSpeed
);
参数说明:
callbackId:回调任务ID
lineSpeed:线速度,取值范围:-1.2 ~ 1.2(正数为前进,负数为后退)
angularSpeed:角速度,取值范围:-2.2 ~ 2.2(正数为左转,负数为右转)
注意:后退没有避障,谨慎使用后退
最低版本:2.8.0
适用平台:
| 豹小秘 | mini | 招财豹 | 豹小递max | 豹小秘DP |
|---|---|---|---|---|
| 是 | 是 | 否 | 否 | 否 |