Autonomous robots combine skills to form increasingly complex behaviors, called missions. While skills are often programmed at a relatively low abstraction level, their coordination is architecturally separated and often expressed in higher-level languages or frameworks. State machines have been the go-to language to model behavior for decades, but recently, behavior trees have gained attention among roboticists. Although several implementations of behavior trees are in use, little is known about their usage and scope in the real world.How do concepts offered by behavior trees relate to traditional languages, such as state machines? How are concepts in behavior trees and state machines used in actual applications? This paper is a study of the key language concepts in behavior trees as realized in domain-specific languages (DSLs), internal and external DSLs offered as libraries, and their use in open-source robotic applications supported by the Robot Operating System (ROS). We analyze behavior-tree DSLs and compare them to the standard language for behavior models in robotics:state machines. We identify DSLs for both behavior-modeling languages, and we analyze five in-depth.We mine open-source repositories for robotic applications that use the analyzed DSLs and analyze their usage. We identify similarities between behavior trees and state machines in terms of language design and the concepts offered to accommodate the needs of the robotics domain. We observed that the usage of behavior-tree DSLs in open-source projects is increasing rapidly. We observed similar usage patterns at model structure and at code reuse in the behavior-tree and state-machine models within the mined open-source projects. We contribute all extracted models as a dataset, hoping to inspire the community to use and further develop behavior trees, associated tools, and analysis techniques.
翻译:自主机器人通过组合技能形成日益复杂的行为,即所谓任务。虽然技能通常在相对较低的抽象层次进行编程,但其协调机制在架构上是分离的,且常通过高级语言或框架进行表达。数十年来,状态机一直是行为建模的首选语言,但近年来行为树逐渐受到机器人学界的关注。尽管目前已存在多种行为树实现方案,但对其在实际应用中的使用模式和适用范围仍知之甚少。行为树所提供的概念如何与传统语言(如状态机)相关联?行为树与状态机的概念在实际应用中如何被使用?本文针对行为树中的核心语言概念展开研究,涵盖领域特定语言(DSL)中的实现、以库形式提供的内部与外部DSL,以及它们在机器人操作系统(ROS)支持的开源机器人应用中的使用情况。我们分析了行为树DSL,并将其与机器人行为建模的标准语言——状态机进行对比。我们识别了两种行为建模语言的DSL,并对其中五种进行了深入剖析。通过对开源代码库进行挖掘,我们收集了使用这些DSL的机器人应用程序并分析其使用模式。从语言设计及适应机器人领域需求的概念提供层面,我们揭示了行为树与状态机之间的相似性。我们观察到行为树DSL在开源项目中的使用正快速增长。在挖掘的开源项目中,我们发现在模型结构层面和代码复用层面,行为树模型与状态机模型呈现出相似的使用模式。我们将所有提取的模型整合为数据集予以公开,以期推动学界对行为树及其相关工具与分析技术的进一步开发与应用。