SUPER 规划示例
Feature 简介
third_party_super_example 将 SUPER 规划器接入 Sunray 无人机控制链路。SUPER 接收定位、注册点云和目标点,输出局部位置指令。本页说明自动起降、目标等待和指令适配。这里只说明如何接入和调用。
SUPER 的主要输入包括 localization_fusion 提供的局部里程计、FAST_LIO 的 /cloud_registered 世界坐标点云,以及 RViz 或地面站发布的 geometry_msgs/PoseStamped 目标点。
Sunray Demo 流程
- 等待有效的
UAVControlState,确认控制器状态新鲜后调用TakeoffAction。 - 起飞后悬停约 1 秒,等待 RViz 或地面站发送目标点;默认等待 30 秒。
- 目标到达后由 SUPER 生成轨迹,
Super2Sunray将position_cmd转换为UAVControlCMD。 - 当控制状态从
MOVE回到HOVER时结束当前轨迹窗口并重新等待目标。 - 目标等待超时、任务启动超时或流程结束时调用
LandAction;SUPER 的规划失败也会被视为生命周期边界处理。
使用的接口
| 所属 Feature | 流向 | 接口 | 类型 | 含义 |
|---|---|---|---|---|
sunray_uav_control | 订阅 | /<agent_key>/sunray/uav_control/control_state | sunray_msgs/UAVControlState | 监控控制器状态及轨迹执行阶段。 |
sunray_uav_control | 调用 | /<agent_key>/sunray/uav_control/takeoff | sunray_msgs/Takeoff | 自动起飞。 |
sunray_uav_control | 调用 | /<agent_key>/sunray/uav_control/land | sunray_msgs/Land | 目标等待超时或流程结束时降落。 |
sunray_super_example | 订阅 | /move_base_simple/goal(多机时为 /<agent_key>/move_base_simple/goal) | geometry_msgs/PoseStamped | 接收 RViz 或地面站目标点。 |
sunray_super_example | 订阅 | /<agent_key>/third_party_super_example/super_planner/position_cmd | super_msgs/SuperPositionCommand | 获取 SUPER 位置指令。 |
sunray_uav_control | 发布 | /<agent_key>/sunray/uav_control/control_cmd | sunray_msgs/UAVControlCMD | 执行适配器转换后的控制目标。 |
Feature 启动方法
launch 文件位置:~/Sunray/example_pro/third_party_super_example/sunray_super_example/launch/planning_super_demo.launch
roslaunch sunray_super_example planning_super_demo.launch agent_name:=uav agent_id:=1默认点云话题为 /cloud_registered,要求点云与局部里程计处于同一世界坐标系。目标路由和超时参数可通过 launch 参数覆盖。
与其他 Feature 的关系
SUPER 负责路径规划,Super2Sunray 负责位置指令适配,SuperVisualization2Sunray 负责将地图和轨迹转换为 Sunray 标准可视化话题,最终由 sunray_uav_control 执行控制。