Skip to Content
高级示例模块SUPER 规划示例

SUPER 规划示例

Feature 简介

third_party_super_example 将 SUPER 规划器接入 Sunray 无人机控制链路。SUPER 接收定位、注册点云和目标点,输出局部位置指令。本页说明自动起降、目标等待和指令适配。这里只说明如何接入和调用。

SUPER 的主要输入包括 localization_fusion 提供的局部里程计、FAST_LIO 的 /cloud_registered 世界坐标点云,以及 RViz 或地面站发布的 geometry_msgs/PoseStamped 目标点。

Sunray Demo 流程

  1. 等待有效的 UAVControlState,确认控制器状态新鲜后调用 Takeoff Action。
  2. 起飞后悬停约 1 秒,等待 RViz 或地面站发送目标点;默认等待 30 秒。
  3. 目标到达后由 SUPER 生成轨迹,Super2Sunray 将 position_cmd 转换为 UAVControlCMD。
  4. 当控制状态从 MOVE 回到 HOVER 时结束当前轨迹窗口并重新等待目标。
  5. 目标等待超时、任务启动超时或流程结束时调用 Land Action;SUPER 的规划失败也会被视为生命周期边界处理。

使用的接口

所属 Feature流向接口类型含义
sunray_uav_control订阅/<agent_key>/sunray/uav_control/control_statesunray_msgs/UAVControlState监控控制器状态及轨迹执行阶段。
sunray_uav_control调用/<agent_key>/sunray/uav_control/takeoffsunray_msgs/Takeoff自动起飞。
sunray_uav_control调用/<agent_key>/sunray/uav_control/landsunray_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_cmdsuper_msgs/SuperPositionCommand获取 SUPER 位置指令。
sunray_uav_control发布/<agent_key>/sunray/uav_control/control_cmdsunray_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 执行控制。