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的使用正在快速增长。在挖掘的开源项目中,行为树与状态机模型在模型结构设计和代码复用方面呈现相似模式。我们将所有提取的模型作为数据集贡献给社区,以期激发学界对行为树及其相关工具与分析技术的深入使用与发展。