High-fidelity simulation has become essential to the design and control of soft robots, where large geometric deformations and complex contact interactions challenge conventional modeling tools. Recent advances in the field demand simulation frameworks that combine physical accuracy, computational scalability, and seamless integration with modern control and optimization pipelines. In this work, we present Py-DiSMech, a Python-based, open-source simulation framework for modeling and control of soft robotic structures grounded in the principles of Discrete Differential Geometry (DDG). By discretizing geometric quantities such as curvature and strain directly on meshes, Py-DiSMech captures the nonlinear deformation of rods, shells, and hybrid structures with high fidelity and reduced computational cost. The framework introduces (i) a fully vectorized NumPy implementation achieving order-of-magnitude speed-ups over existing geometry-based simulators; (ii) a penalty-energy-based fully implicit contact model that supports rod-rod, rod-shell, and shell-shell interactions; (iii) a natural-strain-based feedback-control module featuring a proportional-integral (PI) controller for shape regulation and trajectory tracking; and (iv) a modular, object-oriented software design enabling user-defined elastic energies, actuation schemes, and integration with machine-learning libraries. Benchmark comparisons demonstrate that Py-DiSMech substantially outperforms the state-of-the-art simulator Elastica in computational efficiency while maintaining physical accuracy. Together, these features establish Py-DiSMech as a scalable, extensible platform for simulation-driven design, control validation, and sim-to-real research in soft robotics.
翻译:高保真仿真已成为软体机器人设计与控制的关键环节,其中大几何形变与复杂接触相互作用对传统建模工具提出了挑战。该领域的最新进展要求仿真框架能够兼顾物理精度、计算可扩展性,并与现代控制及优化流程无缝集成。本文提出Py-DiSMech,一个基于Python的开源仿真框架,用于基于离散微分几何原理的软体机器人结构建模与控制。通过直接在网格上离散化曲率、应变等几何量,Py-DiSMech能够以高保真度和较低计算成本捕捉杆状、壳状及混合结构的非线性形变。该框架具备以下特点:(i) 完全向量化的NumPy实现,相比现有基于几何的仿真器实现数量级加速;(ii) 基于罚函数能量的全隐式接触模型,支持杆-杆、杆-壳及壳-壳相互作用;(iii) 基于自然应变的反馈控制模块,配备用于形状调节与轨迹跟踪的比例-积分控制器;(iv) 模块化、面向对象的软件设计,支持用户自定义弹性能量、驱动方案,并可集成机器学习库。基准测试表明,Py-DiSMech在保持物理精度的同时,其计算效率显著优于当前最先进的仿真器Elastica。这些特性共同使Py-DiSMech成为一个可扩展、可拓展的平台,适用于软体机器人领域的仿真驱动设计、控制验证以及仿真到现实的研究。