Large-scale simulation with realistic nonlinear dynamic models is crucial for algorithms development for swarm robotics. However, existing platforms are mainly developed based on Object-Oriented Programming (OOP) and either use simple kinematic models to pursue a large number of simulating nodes or implement realistic dynamic models with limited simulating nodes. In this paper, we develop a simulator based on Data-Oriented Programming (DOP) that utilizes GPU parallel computing to achieve large-scale swarm robotic simulations. Specifically, we use a multi-process approach to simulate heterogeneous agents and leverage PyTorch with GPU to simulate homogeneous agents with a large number. We test our approach using a nonlinear quadrotor model and demonstrate that this DOP approach can maintain almost the same computational speed when quadrotors are less than 5,000. We also provide two examples to present the functionality of the platform.
翻译:大规模模拟结合真实非线性动力学模型对集群机器人算法开发至关重要。然而,现有平台主要基于面向对象编程(OOP)开发,要么采用简化运动学模型追求大规模节点数量,要么在有限节点数量下实现真实动力学模型。本文基于面向数据编程(DOP)开发了一款利用GPU并行计算实现大规模集群机器人仿真的模拟器。具体而言,我们采用多进程方法模拟异质智能体,并借助PyTorch与GPU实现对大量同质智能体的高效仿真。通过非线性四旋翼模型测试验证,该DOP方法在四旋翼数量低于5000时能保持几乎相同的计算速度。同时提供两个示例展示平台功能。