Code from: Competition between elasticity and adhesion in caterpillar locomotion
Data files
Feb 27, 2025 version files 3.93 MB
-
Code_caterpillar_locomotion.zip
3.93 MB
-
README.md
1.95 KB
Abstract
In recent years, there has been a growing interest in understanding animals locomotion mechanisms for developing bio-inspired micro- or nano-robots capable of overcoming obstacles and navigating in confined environments. Among non-pedal crawlers, caterpillars exhibit one of the most stable and efficient gait strategies, utilizing muscle contractions and substrate grip. Although several approaches have been proposed to model their locomotion, little is known about the competition between body elasticity and adhesion, which we demonstrate playing a central role in crawling gait. Preliminarily, experimental observations and measurements were performed on Pieris brassicae larvae, gaining insights into fundamental features characterizing caterpillar locomotion and estimating key geometrical and mechanical parameters. A minimal but effective one-dimensional discrete model was thus conceived to capture all the relevant aspects of the movement. Inter-mass springs model the deformable body units, Winkler-like constraints with an adhesion threshold reproduce elastic interactions and attaching/detaching events at prolegs-substrate interface, and a triggering muscle contraction initiates the larva's crawling cycle, generating the observed travelling wave. After demonstrating theoretically that caterpillars move obeying quasi-static laws, we proved robustness of the proposed approach by showing very good agreement between theoretical outcomes and experimental evidence, so paving the way for new optimization strategies in soft robotics.
The provided code is divided into four distinct parts, each addressing a specific aspect of the modeling process for tracing back the one-dimensional caterpillar locomotion. For the users' utility, two files are given: the Mathematica notebook and its pdf print.
Part 1: Pre-processing Phase
In this initial phase, data is collected and stored to trigger the locomotion model. This includes the necessary parameters and conditions required to simulate the movement. Following the notation adopted in the paper, the same symbols are considered in the Mathematica notebook for representing the subunits mass, the inter-masses springs and Winkler-like constraints stiffness, the resting length of the springs, the displacement threshold, the damping coefficient, the damping ratio, and the inelastic trigger.
Part 2: Calculation of Potential Terms
This section computes the elastic and kinetic potential terms that are fundamental for obtaining the system's equations. These terms are derived based on the mechanical properties and movement characteristics of the caterpillar.
Part 3: Derivation of Equations via Euler-Lagrange
In this step, the Euler-Lagrange equations are applied to derive the motion equations, using the potential terms calculated in Part 2. This allows for a detailed understanding of the system’s dynamics in terms of generalized coordinates. By turning off the inertial and dissipative terms, the elasto-static problem can be easily derived.
Part 4: Elasto-static and Dynamic Response Analysis
The final phase calculates both the elasto-static and dynamic responses of the system. The results are then compared in a post-processing step, where a plot is generated to visualize and analyze the differences between the two response types.
For more details, please see the workflow explicitly reported in the published paper.
