Autonomous nano-drones, powered by vision-based tiny machine learning (TinyML) models, are a novel technology gaining momentum thanks to their broad applicability and pushing scientific advancement on resource-limited embedded systems. Their small form factor, i.e., a few 10s grams, severely limits their onboard computational resources to sub-\SI{100}{\milli\watt} microcontroller units (MCUs). The Bitcraze Crazyflie nano-drone is the \textit{de facto} standard, offering a rich set of programmable MCUs for low-level control, multi-core processing, and radio transmission. However, roboticists very often underutilize these onboard precious resources due to the absence of a simple yet efficient software layer capable of time-optimal pipelining of multi-buffer image acquisition, multi-core computation, intra-MCUs data exchange, and Wi-Fi streaming, leading to sub-optimal control performances. Our \textit{NanoCockpit} framework aims to fill this gap, increasing the throughput and minimizing the system's latency, while simplifying the developer experience through coroutine-based multi-tasking. In-field experiments on three real-world TinyML nanorobotics applications show our framework achieves ideal end-to-end latency, i.e. zero overhead due to serialized tasks, delivering quantifiable improvements in closed-loop control performance ($-$30\% mean position error, mission success rate increased from 40\% to 100\%).
翻译:基于视觉的微型机器学习(TinyML)模型驱动的自主纳米无人机,因其广泛的适用性并推动资源受限嵌入式系统的科学进步,正成为一种获得发展势头的新兴技术。其小型化形态(即数十克重量)严重限制了其板载计算资源,使其仅能采用低于100毫瓦的微控制器单元(MCU)。Bitcraze Crazyflie 纳米无人机是事实上的标准平台,它提供了一套丰富的可编程MCU,用于底层控制、多核处理和无线电传输。然而,由于缺乏一个简单而高效的软件层来实现多缓冲区图像采集、多核计算、MCU内部数据交换和Wi-Fi流传输的时间最优流水线化,机器人学家常常未能充分利用这些宝贵的板载资源,从而导致控制性能欠佳。我们的NanoCockpit框架旨在填补这一空白,在通过基于协程的多任务处理简化开发者体验的同时,提高系统吞吐量并最小化系统延迟。在三个真实世界TinyML纳米机器人应用上的现场实验表明,我们的框架实现了理想的端到端延迟(即串行化任务带来的开销为零),并在闭环控制性能上带来了可量化的改进(平均位置误差减少30%,任务成功率从40%提升至100%)。