arXiv:2511.08297cs.OScs.RO2025-11中稿 · IEEE RTSS 2025

用函数接口替代发布订阅,让机器人系统任务依赖自动生效

Work-in-Progress: Function-as-Subtask API Replacing Publish/Subscribe for OS-Native DAG Scheduling

  • 用函数输入输出定义任务依赖,杜绝错误执行顺序
  • 在实验内核中实现,确保任务图语义完全一致
  • 适合做实时机器人系统开发的工程师参考

实时调度中的有向无环图(DAG)任务模型主要应用于机器人操作系统2(ROS 2)。然而,ROS 2的发布/订阅接口无法强制执行DAG的前序约束:回调可能在执行中途发布数据,多输入回调也允许开发者自行选择话题匹配策略。因此,维持DAG语义依赖于编程约定;一旦违反,整个模型即失效。本文提出函数即子任务(FasS)API,将每个子任务表达为一个函数,其参数和返回值分别对应任务的输入与输出边。通过最小化描述自由度,使DAG语义在接口层面得到保障,而非依赖程序员自律。我们基于Rust实验内核实现了原生支持DAG的调度器,并评估了其语义保真度;同时提出了将FasS应用于Linux sched_ext的设计指南。

原文摘要 · Abstract (English)

The Directed Acyclic Graph (DAG) task model for real-time scheduling finds its primary practical target in Robot Operating System 2 (ROS 2). However, ROS 2's publish/subscribe API leaves DAG precedence constraints unenforced: a callback may publish mid-execution, and multi-input callbacks let developers choose topic-matching policies. Thus preserving DAG semantics relies on conventions; once violated, the model collapses. We propose the Function-as-Subtask (FasS) API, which expresses each subtask as a function whose arguments/return values are the subtask's incoming/outgoing edges. By minimizing description freedom, DAG semantics is guaranteed at the API rather than by programmer discipline. We implement a DAG-native scheduler using FasS on a Rust-based experimental kernel and evaluate its semantic fidelity, and we outline design guidelines for applying FasS to Linux Linux sched_ext.

实时调度ROS2DAG函数式接口

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。