7.10 技能播放部分
7.10 技能播放部分
7.10.1 整体介绍
A3-Ultra机器人技能播放部分,依赖资源管理模块下导入的各类资源,包括动作、语音、表情等。用户可通过技能播放部分提供的二开接口进行动作播放、语音播放、表情播放等操作。
注意:各类资源的列表获取,可通过资源管理模块提供的获取资源列表接口进行查询。
7.10.2 动作播放/暂停/复位接口
| 接口名 | pb:/aimdk.protocol.MotionCommandService/SendMotionCommand |
|---|---|
| 功能概述 | 播放指定动作文件 |
| 接口类型 | HTTP JSON RPC |
| URL | http://10.42.10.12:56444/rpc/aimdk.protocol.MotionCommandService/SendMotionCommand |
| 入参 | text
|
| 出参 | text
|
| 示例脚本 | examples/skill_play/SendMotionCommand.py |
| 备注 |
|
7.10.3 播放语音
| 接口名 | pb:/aimdk.protocol.HalAudioService/PlayFile |
|---|---|
| 功能概述 | 播放指定音频文件 |
| 接口类型 | HTTP JSON RPC |
| URL | http://10.42.10.10:56666/rpc/aimdk.protocol.HalAudioService/PlayFile |
| 入参 | 播放 wav 文件(推荐): text text
|
| 出参 | text
|
| 示例脚本 | examples/skill_play/PlayFile.py |
| 备注 |
|
7.10.4 停止语音
| 接口名 | pb:/aimdk.protocol.HalAudioService/StopPlay |
|---|---|
| 功能概述 | 停止当前正在播放的音频 |
| 接口类型 | HTTP JSON RPC |
| URL | http://10.42.10.10:56666/rpc/aimdk.protocol.HalAudioService/StopPlay |
| 入参 | text
|
| 出参 | text
|
| 示例脚本 | examples/skill_play/StopPlay.py |
| 备注 |
|
7.10.5 表情播放
| 接口名 | /skill/pilot/face/play |
|---|---|
| 功能概述 | 用于播放表情 |
| 接口类型 | ros2 topic |
| 入参 | text
|
| 示例脚本 | examples/skill_play/face_play.py |
| 备注 |
|
7.10.6 技能状态接口
| 接口名 | /skill/pilot/skill_status |
|---|---|
| 功能概述 | 技能状态接口 |
| 接口类型 | ros2 topic |
| 出参 | text
CoreState_Avatar = 6; // 身外化身 CoreState_Collecting = 9; // 数采 CoreState_MapBuilding = 13; // 建图中
BatteryState_DualBattery_NotCharging_LowPower = 7; BatteryState_DualBattery_Charging = 8; BatteryState_SingleBattery_NotCharging = 9; BatteryState_SingleBattery_Charging = 10; BatteryState_NoBattery_Charging = 11;
AutoChargingState_Navigating = 2; // 导航中 AutoChargingState_NaviSuccess = 3; // 导航成功 AutoChargingState_NaviFailed = 4; // 导航失败 AutoChargingState_Plugging = 5; // 插枪中 AutoChargingState_PlugSuccess = 6; // 插枪成功 AutoChargingState_PlugFailed = 7; // 插枪失败 AutoChargingState_Charging = 8; // 充电中 AutoChargingState_Unplugging = 9; // 拔枪中 AutoChargingState_UnplugSuccess = 10; // 拔枪成功 AutoChargingState_UnplugFailed = 11; // 拔枪失败 AutoChargingState_Finished = 12; // 自主充电流程完成 AutoChargingState_Failed = 13; // 自主充电整体失败 |
| 示例脚本 | examples/skill_play/skill_status.py |
| 备注 |
|
7.10.7 自主充电接口
| 接口名 | pb:/aimdk.protocol.SkillPilotService/AutoCharging |
|---|---|
| 功能概述 | 自主充电接口 |
| 接口类型 | RPC |
| 入参 | text
AutoChargingCommand_STOP = 3; // 停止/结束(导航中:停止导航停在原地;插枪中:完成插枪后拔枪;充电中:拔枪;拔枪中:不动作) AutoChargingCommand_RESET = 4; // 失败复位(在Stop调用完后调用,恢复自主充电到Idle状态,不调用的话,会10s自动恢复)
AutoChargingTrigger_AIMMASTER = 2; // AimMaster(App 手动点击) AutoChargingTrigger_LOW_POWER = 3; // 低电量自动触发 AutoChargingTrigger_IDLE_TIMEOUT = 4; // 长时间待机自动触发 |
| 出参 | text
|
| 示例脚本 | examples/skill_play/auto_charging.py |
| 备注 |
|
7.10.8 舞蹈播放接口
| 接口名 | pb:/aimdk.protocol.SkillPilotService/SkillPackage |
|---|---|
| 功能概述 | 舞蹈播放接口 |
| 接口类型 | rpc |
| 入参 | text
|
| 出参 | text |
| 示例脚本 | examples/skill_play/dance_play.py |
| 备注 |
|