AutonomyService 服务概述

Bridge 对外暴露的唯一 gRPC 服务,定义于 autonomy/bridge/proto/external_command_service.proto

接入步骤见 01 接入与验证

2.1 方法列表

RPC

分类

请求 → 响应

参考

GetCapabilities

Query

EmptyCapabilities

04

GetRobotSnapshot

Query

EmptyRobotState

04

GetActiveTask

Query

EmptyActiveTaskInfo

04

ReceiveBotStates

Stream

Empty → stream RobotState

05

ReceiveBotEvents

Stream

Empty → stream RobotEvent

05

EmergencyStop

System

EmergencyStopRequestCommandAck

06

CancelAllTasks

System

CancelAllTasksRequestCommandAck

06

SendNavigationCommand

Command

NavigationCommandRequest → stream *Response

07

SendExplorationCommand

Command

ExplorationCommandRequest → stream *Response

08

SendFollowCommand

Command

FollowCommandRequest → stream *Response

09

SendTeleopCommand

Command

stream TeleopCommandRequest → stream *Response

10

SendDockCommand

Command

DockCommandRequest → stream *Response

11

SendMapCommand

Command

MapCommandRequest → stream *Response

12

2.2 RPC 分类

分类

用途

测试关注点

Query

无副作用只读查询

连通性、能力矩阵、版本号

Stream

长连接状态/事件

频率、字段完整性、断线重连

System

全局急停/取消

抢占行为、幂等

Command

下发机载任务

Stream 末帧、TaskType 互斥

2.3 流模式

模式

方法

客户端

Unary

Query / System

单次 Invoke

Empty → Stream

ReceiveBot*

循环 Read()

Unary → Stream

Send*(除 Teleop)

发一帧 Request,读 Stream 至 ack.final=true

Bidi Stream

SendTeleopCommand

双工读写

2.4 调用约束

  • Command / System 请求首字段 header03 §3.1 RequestHeader)。

  • Command 响应首字段 ackack.final=true 表示任务结束。

  • 同一时刻仅一个 Command 任务EmergencyStop 可打断任意任务。

  • MQTT Topic 与字段同名,见 mqtt/04 §4.1

  • Command 页写法:先贴 external_command_service.proto 原文,再逐字段说明(07 起)。

2.5 Command 与 TaskType 对照

TaskType

RPC

supports_* 门控

TASK_TYPE_NAVIGATION

1

SendNavigationCommand

supports_navigation

TASK_TYPE_FOLLOW

2

SendFollowCommand

supports_follow

TASK_TYPE_TELEOP

3

SendTeleopCommand

supports_teleop

TASK_TYPE_EXPLORATION

4

SendExplorationCommand

supports_exploration

TASK_TYPE_DOCK

5

SendDockCommand

supports_docking

TASK_TYPE_MAP

6

SendMapCommand

supports_map_management