<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Friction modulation in limbless, three-dimensional gaits and heterogeneous terrains</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>12/01/2021</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10313226</idno>
					<idno type="doi">10.1038/s41467-021-26276-x</idno>
					<title level='j'>Nature Communications</title>
<idno>2041-1723</idno>
<biblScope unit="volume">12</biblScope>
<biblScope unit="issue">1</biblScope>					

					<author>Xiaotian Zhang</author><author>Noel Naughton</author><author>Tejaswin Parthasarathy</author><author>Mattia Gazzola</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Abstract            Motivated by a possible convergence of terrestrial limbless locomotion strategies ultimately determined by interfacial effects, we show how both 3D gait alterations and locomotory adaptations to heterogeneous terrains can be understood through the lens of local friction modulation. Via an effective-friction modeling approach, compounded by 3D simulations, the emergence and disappearance of a range of locomotory behaviors observed in nature is systematically explained in relation to inhabited environments. Our approach also simplifies the treatment of terrain heterogeneity, whereby even solid obstacles may be seen as high friction regions, which we confirm against experiments of snakes ‘diffracting’ while traversing rows of posts, similar to optical waves. We further this optic analogy by illustrating snake refraction, reflection and lens focusing. We use these insights to engineer surface friction patterns and demonstrate passive snake navigation in complex topographies. Overall, our study outlines a unified view that connects active and passive 3D mechanics with heterogeneous interfacial effects to explain a broad set of biological observations, and potentially inspire engineering design.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><p>L imbless locomotion is exhibited by a wide taxonomic range of slender creatures and has been observed in water <ref type="bibr">1</ref> , land <ref type="bibr">[2]</ref><ref type="bibr">[3]</ref><ref type="bibr">[4]</ref><ref type="bibr">[5]</ref> , and even air <ref type="bibr">6</ref> . While broad principles of aquatic limbless locomotion have been unveiled <ref type="bibr">1,</ref><ref type="bibr">[7]</ref><ref type="bibr">[8]</ref><ref type="bibr">[9]</ref><ref type="bibr">[10]</ref><ref type="bibr">[11]</ref> , the terrestrial variety remains largely elusive. In snakes, locomotion has been classically modeled via planar gaits on uniform substrates, with lateral body undulations rectified into forward motion via anisotropic friction <ref type="bibr">[12]</ref><ref type="bibr">[13]</ref><ref type="bibr">[14]</ref><ref type="bibr">[15]</ref><ref type="bibr">[16]</ref><ref type="bibr">[17]</ref><ref type="bibr">[18]</ref><ref type="bibr">[19]</ref><ref type="bibr">[20]</ref> . However, terrestrial creatures (unlike aquatic ones) can actively negotiate the extent of contact with the environment, by lifting selected body regions. This manifests in a variety of nonplanar, transient, and spatially inhomogeneous gaits whose locomotory outputs, in turn, emerge from the interplay with dirt, sand, mud, rocks, or leaves <ref type="bibr">2,</ref><ref type="bibr">[21]</ref><ref type="bibr">[22]</ref><ref type="bibr">[23]</ref><ref type="bibr">[24]</ref><ref type="bibr">[25]</ref> , typical of environments that are nonuniform and themselves poorly physically understood.</p><p>Despite these challenges, a recent convergence between zoologists, physicists, mathematicians, and roboticists has provided new impetus toward understanding the organization of out-ofplane behaviors <ref type="bibr">13,</ref><ref type="bibr">21,</ref><ref type="bibr">[26]</ref><ref type="bibr">[27]</ref><ref type="bibr">[28]</ref><ref type="bibr">[29]</ref> . Among these, particular attention has been devoted to sidewinding (Fig. <ref type="figure">1a</ref>), whereby snakes can travel at an angle to overall body pose and reorient with neither loss of performance nor kinematic precursors-features that render sidewinders economical, elusive, and versatile dwellers <ref type="bibr">30</ref> . Long puzzling scientists, sidewinding has been recently recapitulated in robot replicas by means of simple actuation templates made of two orthogonal body waves <ref type="bibr">26</ref> , demonstrating steering abilities and ascending of sandy slopes <ref type="bibr">27</ref> .</p><p>Although insightful, experimental approaches are specialized to given animal/robotic models and there is still a noticeable lack of a broader theoretical perspective able to relate the interplay between gait (body deformation) and frictional environment to locomotory output emergence. Here, motivated by a possible evolutionary convergence of limbless movements ultimately determined by interfacial effects, the roles of both 3D body deformations and environmental heterogeneities are connected through, and modeled as, planar friction modulations. Thus, by homogenizing the complex interaction between limbless creatures and substrate features into a spatially and temporally varying 2D frictional field, we combine theory and simulations to establish an effective-friction perspective that coherently explains a broad set of observations.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Results</head><p>Theoretical modeling approach. To gain mechanistic insight, we generalize a model of forward slithering, first proposed by Hu and Shelley <ref type="bibr">13,</ref><ref type="bibr">14</ref> , to encompass a richer variety of behaviors. The model instantiates a snake as a 2D planar curve of lateral curvature &#954;&#240;s; t&#222; &#188; &#1013; cos&#240;2&#960;k&#240;s &#254; t&#222;&#222; with arc-length s &#8712; [0, 1], time t, amplitude &#1013;, and wavenumber k, from which midline positions x(s, t) and orientations &#945;(s, t) follow (Fig. <ref type="figure">1c</ref>, <ref type="figure">Methods</ref>). For all quantities, space is scaled on snake's length L and time on wave propagation period &#964;. Net propulsion forces F net and torques T net , obtained by integrating friction forces over body length and period, propel the snake. Anisotropic friction forces are described via the Coulomb model F(s, t) = -N(s, t)&#956;, where &#956; is a function of forward &#956; f , transverse &#956; t , and backward &#956; b friction coefficients (Fig. <ref type="figure">1c</ref>) capturing the interaction between skin texture and substrate <ref type="bibr">13</ref> . Of these, &#956; b has little effect <ref type="bibr">12,</ref><ref type="bibr">14</ref> , leaving &#956; t /&#956; f as the key characteristic parameter. Thus, system dynamics are governed by the ratio of inertia to friction forces, via the Froude number Fr = (L/&#964; 2 )/(g&#956; f ), with g being gravitational acceleration. In biological and robotic snakes, friction typically dominates with Fr &#8804; 1, and we set Fr = 0.1 throughout, without lack of generality (SI). Finally, the function N&#240;s; t&#222; &#188; &#951; N&#240;s; t&#222;, with &#951; being a normalization factor, models body lift as local weight redistribution, leading to effective-friction modulation along the snake. This modulation implicitly gives rise to a temporally and spatially varying field of frictional force magnitudes, actively controlled by the snake.</p><p>The term N&#240;s; t&#222; is critical, and much of the model's explanatory power depends on it. Hu et al. <ref type="bibr">13,</ref><ref type="bibr">14</ref> set N $ e &#192;&#954; to x y head tail s x x(s,t) asymmetrically lifts up only one side of its body <ref type="bibr">52</ref> . b A corn snake (Pantherophis guttatus) slithering on a flat surface and symmetrically lifting regions of high lateral curvature on both sides of its body <ref type="bibr">13,</ref><ref type="bibr">14</ref> . c Schematic of the planar snake model. Note that the arc-length s goes from tail to head to retain consistency with <ref type="bibr">13,</ref><ref type="bibr">14</ref> . The local position x is related to the center of mass x through zero-mean integration function I[t] (Methods). d Three different stereotypes of body lifting. Top: Zero body lifting leads to classical undulatory planar gaits. Middle: Symmetric body lifting, the snake symmetrically lifts both sides of its body <ref type="bibr">13,</ref><ref type="bibr">21</ref> . Bottom: Asymmetric body lifting, the snake lifts one side of its body off the ground and maintains the other in contact with the ground. Asymmetric lifting has been well-documented in sidewinding snakes <ref type="bibr">2,</ref><ref type="bibr">21,</ref><ref type="bibr">22,</ref><ref type="bibr">26,</ref><ref type="bibr">27</ref> . Net forces and torques acting on the snake over one undulation period are computed via</p><p>F&#240;s; t&#222; ds dt, respectively.</p><p>capture lifting effects at regions of high lateral body curvature in forward slithering snakes (Fig. <ref type="figure">1b</ref>), demonstrating drag reduction and speed increase. Nonetheless, this choice does not capitalize on the opportunity of temporally decoupling lateral and lifting activations, to break symmetry and allow the investigation of locomotory outputs other than forward slithering. While a variety of functions N can achieve this (SI), a phase shift in a cosine form consistent with lateral curvature is perhaps the simplest and most natural option. Thus, here we set N&#240;s; t&#222;</p><p>where A is lifting amplitude, &#934; is phase offset with lateral wave &#954;, and &#955; = k l /k is the ratio of lateral to lifting wave numbers. The max function avoids artificial negative weight redistributions. This parameterization allows us to model and compare stereotypical lifting patterns encountered in nature (Fig. <ref type="figure">1d</ref>). For A = 0, classic planar undulatory gaits are recovered <ref type="bibr">13,</ref><ref type="bibr">23</ref> . For |A| &gt; 0 and &#955; = 2, the snake symmetrically lifts both sides of its body, as in <ref type="bibr">13,</ref><ref type="bibr">21</ref> . In both cases, F net = T net = 0 due to symmetry and the snake can only move forward. If instead &#955; = 1, the snake lifts only on one side, as seen in sidewinders <ref type="bibr">23,</ref><ref type="bibr">27</ref> . This breaks friction forces symmetry, allowing maneuvering (F net , T net &#8800; 0) without changes in the lateral gait &#954;.</p><p>Emergence of locomotory behaviors in context with the environment. To investigate the potential of &#955; = 1 lifting waves for locomotion, we identify the behaviors available to a snake in relation to its frictional environment. We consider first the ratio &#956; t /&#956; f = 2, which captures the frictional interaction between anisotropic scales and firm uniform substrates, determined for anesthetized snakes <ref type="bibr">13</ref> . Since snakes actively control their scales for grip <ref type="bibr">15</ref> , &#956; t /&#956; f = 2 may be considered a lower bound estimate.</p><p>We numerically span the A-&#934; plane and characterize locomotory outputs by steering rate _ &#952; and body pose &#947; (Fig. <ref type="figure">2a</ref>, <ref type="figure">b</ref>), based on experimentally observed behaviors <ref type="bibr">2,</ref><ref type="bibr">21,</ref><ref type="bibr">22,</ref><ref type="bibr">26,</ref><ref type="bibr">27</ref> . Key organizing separatrices emerge (Fig. <ref type="figure">2c</ref>). Along A = 0 or &#934; ~1/4 and 3/4, the snake can only travel in rectilinear trajectories ( _ &#952; &#188; 0), whether it is slithering or sidewinding. At the same time, along A = 0 or &#934; ~0 and 1/2, the snake is always tangent to its trajectory (&#947; = 0), whether traveling rectilinearly or turning. Around this underlying structure, locomotion behaviors naturally organize as phases (Fig. <ref type="figure">2d</ref>). Straight slithering is encountered throughout &#934; for small A, with limited turning abilities observed in small regions at &#934; ~0 and 1/2. Sidewinding clusters around &#934; ~1/4 and 3/4 for larger lifting. This explains observations of &#934; ~1/4 in biological sidewinders <ref type="bibr">22,</ref><ref type="bibr">23</ref> and empirical robotic demonstrations <ref type="bibr">26,</ref><ref type="bibr">27</ref> ; indeed only in the neighborhood of this particular offset (or equivalently &#934; ~3/4) can both linear trajectories and large pose angles co-exist. Finally, spinning in-place <ref type="bibr">26</ref> fills gaps at high liftings.</p><p>To further contextualize these findings, it is useful to investigate how changes in skin texture-environment interaction, captured by &#956; t /&#956; f , affect phase space organization. As we vary 0.5 &lt; &#956; t /&#956; f &lt; 10 in Fig. <ref type="figure">3a</ref>, separatrices are approximately retained, while behavioral outputs drastically remodel, appear, and disappear. For example, for &#956; t /&#956; f &lt; 1 (a condition not commonly encountered in nature, included here for completeness) slithering is replaced by a new, backward counterpart wherein snakes completely reverse their travel direction.</p><p>For isotropic friction &#956; t /&#956; f = 1, planar (A = 0), and asymmetric lifting (&#955; = 1) slithering are no longer available, and snakes must instead either sidewind or switch to symmetric lifting (&#955; = 2) for locomotion. However, sidewinding is found to be significantly faster (Fig. <ref type="figure">3b</ref>), thus proving advantageous in environments, such as sandy deserts or mudflats, characterized by low effective-  Steering rate _ &#952; is the time-averaged angular velocity of the snake's center of mass. Pose angle &#947; is the angle between the snake's orientation and velocity direction (Methods). b Classifications of qualitatively different locomotion behaviors given _ &#952; and &#947; (Supplementary Movie 1), based on experimentally observed pose angles of sidewinding snakes <ref type="bibr">33</ref> . Black lines are the snake's center of mass (COM) trajectories. c Field map of steering rate _ &#952; and pose angle &#947; for varying lifting wave amplitude A and phase offset &#934; (for &#956; t /&#956; f = 2). d Phase space of locomotion behaviors available to a snake for the friction ratio &#956; t / &#956; f = 2. White spaces are transition regimes between different behaviors. Separatrices are zero contours for steering rate (dash line) and pose angle (dashdot line). All simulations employ &#1013; = 7 and k = 1, as in <ref type="bibr">13</ref> .</p><p>friction ratios on account of their propensity to yield under stress <ref type="bibr">31,</ref><ref type="bibr">32</ref> . This is consistent with sidewinders inhabiting such terrains <ref type="bibr">31</ref> , while, conversely, slithering snakes are observed to adopt sidewinding when encountering sand and mud <ref type="bibr">23,</ref><ref type="bibr">25,</ref><ref type="bibr">33</ref> . Further supporting predictions, the application on slithering snakes of cloth 'jackets' that eliminate anisotropy has been found to severely impair their locomotory performance <ref type="bibr">34</ref> .</p><p>As friction ratios increase (&#956; t /&#956; f &gt; 2), we observe a progressive loss of sidewinding behavior (Fig. <ref type="figure">3a</ref>) and a convergence toward slithering (Fig. <ref type="figure">3b</ref>), which becomes increasingly fast and eventually, for sufficiently large values (&#956; t /&#956; f &gt; 10, e.g., wheeled robots), the only option. This is consistent with the fact that sidewinders and slitherers are comparably fast in their respective habitats <ref type="bibr">14</ref> . It is also consistent with observations that sidewinding rarely occurs outside of sandy and muddy terrains <ref type="bibr">33</ref> , although some desert sidewinding-specialists, most notably Crotalus cerastes, do sidewind on substrates other than isotropic sand <ref type="bibr">33</ref> . This is not in contrast with our model, which, in fact, allows for sidewinding at moderate friction ratios, albeit at the cost of increased body lift (Fig. <ref type="figure">3a</ref>).</p><p>Thus, by reducing out-of-plane deformations to waves of active friction modulation, our simple model coherently captures a broad set of experimental observations, providing a mapping between the gait, frictional environment, and locomotory output. In particular, it corroborates the hypothesis, never mechanistically rationalized, of sidewinding being an adaptation to sandy/ muddy contexts <ref type="bibr">33</ref> . Our model mathematically predicts the natural emergence of sidewinding in nearly isotropic environments as a consequence of temporal decoupling between the lateral and vertical undulations, and its selection as advantageous in terms of locomotory performance.</p><p>This perspective recently received notable experimental support with evidence of evolutionary convergence in the ventral skin of sidewinding vipers across world deserts <ref type="bibr">29</ref> . Their skin indeed evolved from the well-documented anisotropic textures characteristic of nonsidewinders to an isotropic one. This, according to our model, maximizes sidewinding locomotion speed (far outperforming other options) and offers a rationale for the observed evolutionary selection (Fig. <ref type="figure">3a</ref>, <ref type="figure">b</ref>).</p><p>Further bio-physical complexities. While our model captures broad trends observed in nature, interesting deviations exist. For example, the shovel-nosed snake Chionactis occipitalis is wellknown to slither on sand <ref type="bibr">35</ref> . This snake exhibits anisotropic skin texture <ref type="bibr">29</ref> , utilizes a specialized waveform <ref type="bibr">35</ref> , and belongs to the colubrid family whose members are characterized by more slender bodies relative to sidewinding specialists <ref type="bibr">33</ref> . The combination of waveform and reduced body weight causes the sand to yield and remodel to a lesser degree <ref type="bibr">35</ref> , potentially enabling, in our effective-friction view, an anisotropic response that in turn permits slithering. Further, C. occipitalis has been reported to produce &#955; = 2 lifting waves <ref type="bibr">35</ref> , which according to our model can generate slithering even in isotropic settings, albeit inefficiently (Fig. <ref type="figure">3b</ref>). Also interesting is the case of snakes ascending sandy slopes, where sidewinding has been suggested to be an actual Fig. <ref type="figure">3</ref> Emergence of locomotory behaviors in context with the environmentinfluence of friction ratio. a Phase space maps for different friction ratios &#956; t /&#956; f (full exploration in SI). Numbered labels indicate the location in terms of friction ratio, lifting amplitude, and phase offset of typical locomotion behaviors: (1) a snake sidewinding in a sandy desert or a tidal mudflat <ref type="bibr">23</ref> , (2) an undulating snake with no body lift based on measurements from <ref type="bibr">13</ref> , and (3) a wheeled robotic snake where the wheels can be viewed as inducing strong friction anisotropy. Note that for &#956; t /&#956; f = 1, straight sidewinding does not occur for A = 0 as the snake is unable to produce directional motion when there is no body lift. b Effective speed, steering rate, and pose angle of four different lifting strategies over a range of friction ratios. Different body lifting strategies lead to large differences in all three quantities at low friction anisotropy ratios, while there is a general convergence of behaviors to traveling forward in a straight trajectory as friction anisotropy increases. For isotropic friction, the no lifting case of A = 0 corresponding to planar slithering has |v eff | = 0, while asymmetric lifting with A = 1 and &#934; = 0.25, corresponding to sidewinding <ref type="bibr">26,</ref><ref type="bibr">27</ref> , exhibits high |v eff |.</p><p>necessity to cope with the substrate's high propensity to deform <ref type="bibr">27,</ref><ref type="bibr">32</ref> , rather than an advantageous solution as predicted by our model. Both these examples underscore the role of substrate remodeling, reflow, compaction, and associated resistive forces, further enriching limbless locomotion dynamics. A connection between the granular media resistive forces <ref type="bibr">31,</ref><ref type="bibr">[35]</ref><ref type="bibr">[36]</ref><ref type="bibr">[37]</ref><ref type="bibr">[38]</ref> and our effective-friction framework might further harmonize theory and observations.</p><p>Consistency with 3D simulations. Next, we verify the consistency of our findings in 3D direct numerical simulations, whereby a limbless active body is represented as a Cosserat rod (Fig. <ref type="figure">4a</ref>) equipped with internal muscular activity and interacting with the substrate through contact and friction (Methods/SI). We employ here our Cosserat-based solver Elastica <ref type="bibr">39,</ref><ref type="bibr">40</ref> , which has been demonstrated in a number of engineering and biophysical contexts, from the design of bio-hybrid soft robots <ref type="bibr">41,</ref><ref type="bibr">42</ref> to the ) and with collision model (CM) simulations <ref type="bibr">46</ref> . f A snake moving on a flat surface (&#956; t /&#956; f = 10) patterned with frictionless strips of width w. g Snakes encountering a frictionless strip are either reflected or refracted depending on incidence angle &#945;. h Demonstrations of passive trajectory control through friction surface patterning (additional details for all cases in SI). i Snakes interacting with heterogeneous ground features of diameter d c for both increasing and decreasing friction modulation p. j Snakes passively meander through an heterogeneous frictional contour map. All snakes here utilize a lateral muscular activation function (torque wave) that produces planar gaits of waveform &#954;.</p><p>modeling of biological architectures, including snakes <ref type="bibr">17,</ref><ref type="bibr">39</ref> , feathered wings <ref type="bibr">39</ref> and octopus arms <ref type="bibr">43,</ref><ref type="bibr">44</ref> .</p><p>We then instantiate a snake consistent with <ref type="bibr">13,</ref><ref type="bibr">14</ref> , and replace friction modulation waves with torque waves (of the same form) to produce actual body lift (Supplementary Movie 2). As can be seen in Fig. <ref type="figure">4b</ref>, the 3D model produces variations in steering rates _ &#952; and poses &#947; consistent with Fig. <ref type="figure">2c</ref>, recovering all modes of locomotion in Fig. <ref type="figure">2d</ref>. Examples of slithering and sidewinding (&#955; = 1) are reported in Fig. <ref type="figure">4c</ref>, showing degrees of turning in line with Fig. <ref type="figure">2d</ref>. Further informed by Fig. <ref type="figure">2d</ref>, a repertoire of linear displacements, wide/tight turns, and reversals at varying body poses are concatenated in Fig. <ref type="figure">4d</ref> (Supplementary Movie 3), illustrating trajectory control in the spirit of <ref type="bibr">26</ref> .</p><p>Control via ground friction design-heterogeneity and optical analogy. With consistent direct numerical simulations in hand, we switch from a perspective where the snake actively modulates friction to one where locomotory output is instead passively altered by friction patterns on the substrate. The goal is to understand how far our effective-friction perspective can be pushed to investigate heterogeneous environments comprised of small and large-scale 3D features.</p><p>We start by considering a recent study proposing an intriguing optical analogy, whereby a snake's body undulations and center of mass represent, respectively, the "wave" and "particle" nature of light <ref type="bibr">45,</ref><ref type="bibr">46</ref> . There, the authors engineer an environment made of seven rigid cylindrical posts aligned with fixed spacing (Fig. <ref type="figure">4e</ref>) and let both the biological <ref type="bibr">46</ref> and robotic <ref type="bibr">45</ref> snakes slither through the posts, propelled by an approximately planar, stereotypical gait. Surprisingly, the snake-post physical interaction is found to lead to characteristic diffraction patterns. We challenge our approach to reproduce this experiment by taking the drastic step of representing the rigid posts as circular patches of high friction on the ground. As seen in Fig. <ref type="figure">4e</ref>, our simulations quantitatively match observed deflection distributions, showing how environmental heterogeneities can be successfully modeled as planar friction patterns, simplifying treatment.</p><p>Motivated by these results, we further explore the connection with optics, to build intuitive understanding of heterogeneous environments, design passive control strategies, or anticipate failure modes in robotic applications.</p><p>As illustrated in Fig. <ref type="figure">4f</ref>-h, a variety of optical effects can be qualitatively reproduced. For example, by patterning a thin, lowfriction strip, we can form an interface, recovering refraction and reflection patterns typical of light transport across two media. Further, we can use this insight and modify the width and spatial arrangement of low-friction strips, to control trajectory deflections, produce U-turns, or even guide snakes along a "channel," analogous to optic fiber light transport (Supplementary Movie 4, 5).</p><p>Similarly, we can imitate light convergence/divergence in gradient-index lenses <ref type="bibr">47</ref> by simply creating friction gradients as illustrated in Fig. <ref type="figure">4i</ref>. This approach informs the modeling of large-scale (several body lengths) 3D landscape features, such as mounds and valleys. Indeed, slopes may be seen as unbalancing lateral frictional responses, causing the snake to coast in converging (valleys) or diverging (mounds) fashion. To illustrate this concept and further demonstrate the potential for passive, robust control through friction design, we create a topographic map (Fig. <ref type="figure">4j</ref>) and challenge snakes initialized at different locations to slither through the map, without altering their gaits. As can be seen, snakes meander through the landscape with about ~50% of them making it to the other end, with no active control, showing how friction naturally mediates passive adaptivity to deal with heterogeneities in the environment (Supplementary Movie 6).</p><p>In Fig. <ref type="figure">4j</ref> we also highlight the case of a snake stuck due to high friction. This failure mode exposes the limits of what is essentially an open-loop control strategy based on passive physics. Without active response to sensory feedbacks, there is a natural ceiling to the level of intelligence passive adaptation can offer, particularly under the interference of unforeseen external factors. In this context, our modeling approach and optical analogies provide the understanding and opportunity to devise and experiment with forms of anticipatory <ref type="bibr">48</ref> or hierarchical <ref type="bibr">49</ref> control. The latter is particularly appealing, as we envision robots in which a light decision-making process is in charge of producing high-level commands, whose detailed execution is partially or entirely delegated to the physics. In the example of the stuck snake, the high-level controller might just issue a lifting wave template command and then let passive mechanics self-organize a transition to sidewinding that frees the snake. Such an approach relieves the controller from taxing low-level coordination tasks, which, in turn, reduce computing requirements in favor of compact, low-power, and inexpensive on-board processing units, while retaining high levels of adaptivity.</p><p>In summary, via minimal theoretical modeling and 3D simulations, our study contextualizes a broad set of observations, both in the biological and robotic domain, through a unified framework centered around effective-friction, actively or passively modulated, on a uniform or heterogeneous substrates, induced by 2D or 3D features, naturally encountered or engineered. It provides a mathematical argument supporting the convergent evolution of sidewinding gaits, while reinforcing the analogy between the limbless terrestrial locomotion and optics, demonstrating its utility for passive trajectory control, with potential applications for bio-inspired engineering.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Methods</head><p>Planar model of friction modulation. We adopt the approach of Hu et al. <ref type="bibr">13,</ref><ref type="bibr">14</ref> wherein the centerline of a snake of length L is modeled as an inextensible planar curve &#349; 2 &#189;0; L. The center of mass position and average orientation of the snake are denoted by x&#240;t&#222; and &#945;&#240;t&#222;, respectively, and the local position and orientation of each point along the snake's centerline is computed via x&#240;&#349;; t&#222; &#188; x&#240; t&#222; &#254; I&#189;t&#240;&#349;; t&#222; and &#945;&#240;&#349;; t&#222; &#188; &#945;&#240; t&#222; &#254; I&#189;&#954;&#240;&#349;; t&#222;, respectively, where t&#240;&#349;; t&#222; &#188; &#240;cos &#945;&#240;&#349;; t&#222;; sin &#945;&#240;&#349;; t&#222;&#222; is the local tangent vector, &#954;&#240;&#349;; t&#222; is the local curvature and I&#189;f &#240;&#349;;</p><p>0 ; t&#222;d&#349; 0 d&#349; is a mean-zero integration function, which expresses the mathematical machinery that allows us to reconstruct snake's local positions/ orientations from the center of mass, global orientation and curvature information (Fig. <ref type="figure">1c</ref>). The dimensionless form of &#954;&#240;&#349;; t&#222; is defined in the main text with all simulations employing &#1013; = 7 and k = 1, as in <ref type="bibr">13</ref> . Differentiating x&#240;&#349;; t&#222; twice with respect to time yields</p><p>where n &#188; &#240;&#192; sin &#945;; cos &#945;&#222; is the local normal vector. Writing the snake's dynamics as a force balance of internal f and external F forces per unit length yields</p><p>where &#961; is the line density of the snake. We then scale Eqs. ( <ref type="formula">1</ref>) and ( <ref type="formula">2</ref>) by s &#188; &#349;=L and t &#188; t=&#964; to non-dimensionalize the system. External forces stem entirely from frictional effects captured through the Coulomb friction model, with anisotropy characterized by coefficients in the forward (&#956; f ), backward (&#956; b ), and transverse (&#956; t ) directions. Scaling friction forces such that F &#188; F=&#961;g&#956; f allows us to write the friction force as F(s, t) = -N(s, t)&#956;(s, t) with &#956;&#240;s; t&#222; &#188;</p><p>is the unit vector associated with the snake's local velocity direction, and H = 1/2(1 + sgn(x)) is the Heaviside step function used here to distinguish between forward and backward friction components. Here, &#956; b /&#956; f = 1.5, in keeping with experimental observations <ref type="bibr">13</ref> . Previous work <ref type="bibr">14</ref> and our preliminary investigations found that static friction effects do not appreciably influence the snake's steady-state behavior, thus we did not consider them here. Moreover, we write the friction modulation wave as N&#240;s; t&#222; &#188; &#951; N&#240;s; t&#222;, where &#951; &#188; 1= R 1 0 N&#240;s; t&#222; ds is the normalization constant to conserve the overall weight of the snake. Finally, we set Fr = 0.1 throughout, consistent with snakes' typically low values and without lack of generality.</p><p>Assuming the total non-dimensionalized internal forces and torques to be zero ( R 1 0 fds &#188; 0 and </p><p>Fr &#945; tt &#240;t&#222; &#188;</p><p>where J &#188; R 1 0 &#240;x &#192; x&#222; 2 ds is the moment of inertia. These equations can then be solved for a prescribed non-dimensional curvature &#954;(s, t) and friction scaling term N(s, t).</p><p>In all cases considered here, Eqs. ( <ref type="formula">3</ref>) and ( <ref type="formula">4</ref>) are numerically solved over 10 undulation periods to allow transient effects from startup to dissipate and the snake to reach steady-state behavior. The snake's locomotion behavior is then analyzed in terms of the pose angle &#947;, steering rate _ &#952;, and effective speed |v eff | which are illustrated in Fig. <ref type="figure">2a</ref>. At steady state, the first trajectory metric that can be computed is the pose angle, which is the angle between the snake's average orientation t &#188; &#240;cos &#945;; sin &#945;&#222; and its center of mass velocity direction u. The average pose angle over one undulation period is defined as &#947; &#188; R t 1 t 0 arctan2&#240;&#240;t u&#222; &#193; e z ; t &#193; u&#222; dt=T where</p><p>dt and e z is the unit vector of out-of-plane axis. Use of the arctan2 function is required to ensure &#947; &#8712; (-&#960;, &#960;]. Note that T is for a nondimensionalized time period, so over one undulation, T &#188; 1. Additional trajectory metrics can be computed by considering the snake's center of mass as a particle undergoing planar motion in polar coordinates, x&#240;t&#222; &#188; &#240;r cos &#952;; r sin &#952;&#222;, allowing the snake's trajectory to be quantified in terms of its effective velocity jv eff j &#188; R t 1 t 0 r d&#952; dt u &#952; dt=T and steering rate _ &#952; &#188; R t 1 t 0 d&#952; dt dt=T (see SI Note 1 for relevant derivations).</p><p>For phase space simulations, a simulation grid was defined with 501 equidistant points in both A &#8712; [-2, 2] and &#934; &#8712; [0, 1], leading to 251k simulations for each of the friction ratios considered. Simulations were performed on the Bridges supercomputing cluster at the Pittsburgh Supercomputing Center.</p><p>3D elastic model of snake locomotion. 3D elastic simulations of snake locomotion were performed in Elastica 17,39,40 using a Cosserat rod snake model with muscular activation, an approach demonstrated in numerous biophysical applications <ref type="bibr">17,</ref><ref type="bibr">39,</ref><ref type="bibr">[41]</ref><ref type="bibr">[42]</ref><ref type="bibr">[43]</ref><ref type="bibr">50,</ref><ref type="bibr">51</ref> . For the Cosserat rod model, we mathematically describe a slender rod by a centerline x&#240;s; t&#222; 2 R 3 and a rotation matrix Q&#240;s; t&#222; &#188; fd 1 ; d 2 ; d We also define the velocity of the centerline v &#188; &#8706; t x and, in the rest configuration, the bending stiffness matrix B, shearing stiffness matrix S, second area moment of inertia I, cross-sectional area A and mass per unit length &#961;. Then, the dynamics 17 of a soft slender body is described by:</p><p>where Eqs. ( <ref type="formula">5</ref>), ( <ref type="formula">6</ref>)) represents linear and angular momentum balance at every cross section, e &#188; jx s j is the local stretching factor, and f and c are the external force and couple line densities, respectively. The simulated snakes have length L = 0.35 m, diameter d = 7.7 mm, and uniform density &#961; = 1000 kg/m 3 to match measurements of milk snakes <ref type="bibr">13</ref> . The Young's modulus of the filament representing the snake body is E = 1 MPa 18 and the gravitational acceleration is g = 9.81 m/s 2 . Lateral muscular torques are applied to the filament through the term c in Eq. ( <ref type="formula">6</ref>), and are determined so as to recover curvature profiles consistent with the planar snake model. The period of the lateral undulation is 2 seconds and the forward friction ratio is &#956; f = 0.089, resulting in Fr = 0.1 for all simulations. Additional lifting muscular torques are enabled to produce the results of Fig. <ref type="figure">4b-d</ref>, while non-body lifting snakes have only planar muscular activation. The simulation incorporates the same Coulomb friction model as in the planar snake model above. More details on our Cosserat rod model, discretization parameteres, and additional information regarding the different cases of Fig. <ref type="figure">4</ref> are available in the supplementary information.</p><p>On-line, interactive sandbox. The 2D planar results presented in the paper serve to explore and intuit snake gait adaptations to terrains of various nature. To aid this exploration, we first open-source our computational code under a liberal license (see Code availability). To further enable a seamless research/educational experience and to disencumber scientists/students from the process of installing the essential computational software stack, we provide an interactive sandbox built atop our code. This sandbox is free, open-source, hosted online, and is accessible from any modern web browser running on personal devices from mobile phones to laptops. It can be accessed using the link provided in the Code Availability section. In this sandbox, users can utilize intuitive sliders and drop-down menus to change dynamical parameters, which are then used to run simulations asynchronously before presenting results in an interactive plot.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_0"><p>NATURE COMMUNICATIONS | (2021) 12:6076 | https://doi.org/10.1038/s41467-021-26276-x | www.nature.com/naturecommunications</p></note>
		</body>
		</text>
</TEI>
