Active and passive mechanics for rugose terrain traversal in centipedes

Centipedes coordinate body and limb flexion to generate propulsion. On flat, solid surfaces, the limb-stepping patterns can be characterized according to the direction in which limb-aggregates propagate, opposite to (retrograde) or with the direction of motion (direct). It is unknown how limb and body dynamics are modified in terrain with terradynamic complexity more representative of these animal ’ s natural heterogeneous environments. Here, we investigated how centipedes that use retrograde and direct limb-stepping patterns, Scolopendra polymorpha and Scolopocryptops sexspinosus , respectively, coordinate their body and limbs to navigate laboratory environments which present footstep challenges and terrain rugosity. We recorded the kinematics and measured the locomotive performance of these animals traversing two rugose terrains with randomly distributed step heights and compared the kinematics with those on a flat frictional surface. Scolopendra polymorpha exhibited similar body and limb dynamics across all terrains and a decrease in speed with increased terrain rugosity. Unexpectedly, when placed in a rugose terrain, S. sexspinosus changed the direction of the limb-stepping pattern from direct to retrograde. Further, for both species, traversal of these rugose terrains was facilitated by hypothesized passive mechanics: upon horizontal collision of a limb with a block, the limb bent and later continued the stepping pattern. Although centipedes have many degrees of freedom, our results suggest these animals negotiate limb – substrate interactions and navigate complex terrains leveraging the innate flexibility of their limbs to simplify control.

Centipedesa class of invertebrates with numbers of limbs ranging from 15 to 191 limb pairsare fast moving but as recent work has demonstrated, common species locomote largely within non-inertial regimes (Chong et al., 2022a preprint). Centipedes locomote by generating and propagating a wave of limb flexion (termed here limb-stepping pattern) (Manton, 1952(Manton, , 1977. The limb-stepping pattern can be classified depending on the direction of propagation. When the limb-aggregates (i.e. grouped limbs) are propagated opposite to the direction of motion (of the animal), they are called retrograde, whereas when they are propagated with the direction of motion, they are known as direct (Trueman and Jones, 1977). Previously, Manton (1977) characterized how distinct orders of centipedes use either direct or retrograde limb-stepping patterns. Centipedes of the orders Scolopendromorpha, Geophilomorpha and Craterostigmorpha use retrograde limb-stepping patterns, while centipedes of the orders Scutigeromorpha and Lithobiomorpha use direct limb-stepping patterns. Furthermore, centipedes that use retrograde or direct limb-stepping patterns exhibit distinct body dynamics. Centipedes that use retrograde limb-stepping patterns exhibit body undulation, increasing body amplitude with increasing forward speed (Manton, 1977(Manton, , 1965. In contrast, centipedes that use direct limb-stepping patterns do not exhibit body undulation, even when stimulated to move at relatively high speeds (Manton, 1977(Manton, , 1965. However, what factors determine the selection of limbstepping patterns remain unknown.
In the mid-20th century, Manton pioneered quantitative studies of centipedes and other arthropods (Manton, 1952(Manton, , 1977(Manton, , 1965. Since then, few studies have focused on centipedes' locomotion, in part due to the difficulty of tracking the many limbs for video recordings. Previous studies have explored different aspects of centipede locomotion such as muscle activation patterns during body bending (Anderson et al., 1995), gap traversal (Kuroda et al., 2014), the effect of compromised appendages (i.e. missing limbs) (Kuroda et al., 2014) and the effect of substrate friction (Kuroda et al., 2022). However, these studies have been limited to flat, solid, homogeneous terrains, unlike the centipedes' natural environments. These animals must contend with heterogeneities (e.g. rocks, leaf litter, twigs) inherent to their natural surroundings. In this regime, passive adaptive responses without sensory modulation or neural feedback (often referred to as preflexes; Loeb, 1995, Brown andLoeb, 2000) may be beneficial for locomotion on rugged terrains by reducing the complexity associated with precisely controlling many degrees of freedom. Previous studies with other arthropods have revealed that complex terrain traversal can be achieved by passive mechanics. These can be inherent to the animal's morphology (e.g. passive mechanical spines and hairs along limbs in cockroaches and spiders Spagna et al., 2007, Roth andWillis, 1952) or emerge as a response to specific events (e.g. passive mechanical adhesive pads in ants; Federle et al., 2001Federle et al., , 2002. In contrast to few recent biological centipede studies, synthetic (i.e. robots) multi-legged locomotors have become of interest in recent years. Such robots have been developed to perform turning maneuvers (Aoi et al., 2016;Hoffman and Wood, 2012), navigate complex environments (Ozkan-Aydin et al., 2020;Koh et al., 2010;Masuda and Ito, 2014) and overcome limb failures (Hoffman and Wood, 2013), among other capabilities. However, these were designed to serve as autonomous robots; few were used as models (Chong et al., 2022a preprint;Yasui et al., 2017a,b;Aoi et al., 2013) to explain centipede locomotor behaviors.
Here, we present the first study of biological centipedes locomoting on laboratory rugose terrain for two species, the desert-dwelling Scolopendra polymorpha and the habitat generalist Scolopocryptops sexspinosus (Fig. 1A,B). These two centipedes are in the order Scolopendromorpha but have distinct kinematics on flat solid substrates: S. polymorpha uses retrograde limbstepping patterns, whereas S. sexspinosus uses direct (Fig. 1C,D). Specifically, we studied how these animals navigate and negotiate complex terradynamic interactions associated with the rugosity of the terrains. We analyzed the performance of these animals for varying terrain rugosity and found that S. polymorpha does not change locomotive strategy (i.e. limb-stepping pattern) on complex terrain. In contrast, S. sexspinosus exhibits a change from a direct to retrograde limb-stepping pattern. Further, we discovered an emergent passive behavior during limb-substrate interactions for both centipede species; when a limb collided with a block, it passively bent in the direction the force from the block applied on it. Finally, we discuss the implications of gait switching in S. sexspinosus and possible advantages to the observed passive mechanics in both centipede species.

MATERIALS AND METHODS Animals
All centipedes were wild caught. Scolopendra polymorpha Wood 1861 were caught in Del Rio Val Verde County, TX, USA. Scolopocryptops sexspinosus (Say 1821) were caught in Valley National Park (VNP), Summit County, OH, USA. Four centipedes of each species were used in experiments, with a mean body length of 7.7±1.5 and 6.2±1.1 cm for S. polymorpha and S. sexspinosus, respectively. Scolopendra polymorpha had 19 body segments with 19 joints and leg pairs. Scolopocryptops sexspinosus had 21 body segments with 21 joints and leg pairs. Centipedes were housed separately in plastic containers on a 12 h:12 h light:dark photoperiod at room temperature (20-22°C). Centipedes were provided a source of water and were fed mealworms weekly.

Flat and rugose terrains
Experiments were conducted on three different terrains (flat, less rugose and more rugose) placed in a glass tank (length=51 cm, width=27 cm, height=32 cm) ( Fig. 2A). The flat terrain was a homogeneous level foam core sheet. Rugose terrains consisted of Gaussian (Sponberg and Full, 2008;Ozkan-Aydin et al., 2020;B.C., J. He, D.S., T. Wang, D. Irvine and D.I.G., unpublished) and inverted Gaussian distributed (Soto et al., 2021;Soto, 2022) blocks of varying heights (generated via custom MATLAB code; original code can be found at https://doi.org/10.5281/zenodo.7121219) for the less and more rugose terrain, respectively (Fig. 2B). As in our recent study (B.C., J. He, D.S., T. Wang, D. Irvine and D.I.G., unpublished), we define rugosity (R g ) as the standard deviation of the block heights normalized by the dimensions of the blocks (R g =0, 0.17 and 0.44 for flat, less rugose and more rugose terrain, respectively). Dimensions and maximum block height (h) of each rugose terrain were scaled to the size of each species body (length=24 cm, width=12 cm for S. polymorpha; length=16, width=8 cm for S. sexspinosus). Each rugose terrain consisted of a 3D printed (Stratasys uPrint SE plus, material: ABSplus P430) height field, with 8 rows by 16 columns of square blocks (length and width=1.5 cm for S. polymorpha, length and width=1 cm for S. sexspinosus). For S. polymorpha, block heights varied from 0 to 1 cm and 0 to 1.5 cm for R g =0.17 and 0.44, respectively. For S. sexspinosus, block heights varied from 0 to 0.75 cm and 0 to 1 cm for R g =0.17 and 0.44, respectively. Terrains were placed level in the glass tank. All experiments were conducted at room temperature (20-22°C).

Kinematic recordings
All experiments were recorded using a high-speed camera (AOS, S-motion) positioned directly over the terrains to capture the kinematics from a top-down view ( Fig. 2A). Videos were recorded at a resolution of 1280×700 pixels and a frame rate of 738 frames s −1 . For both species, five videos per centipede (N=4) per terrain were collected, with the exception of R g =0.44 trials for S. polymorpha, for which a centipede lost a limb and died shortly after. A trial was concluded when the centipede traversed the terrain without leaving the field of view and/or bounds of the terrain (i.e. width of the terrain). Animals that lost limbs or were molting were not used in experiments until the limbs were regrown or the animal had completed its molt. For S. polymorpha, the average trial time was 0.8±0.36, 0.82±0.57 and 2.67±1.23 s for R g =0, 0.17 and 0.44, respectively. For S. sexpinosus, the average trial time was 1.09±0.27, 1.31±0.54 and 2.16±0.81 s for R g =0, 0.17 and 0.44, respectively. For all trials, the centipedes received no external stimulus to traverse the terrains.

Motion tracking
Positional data were extracted from videos with animal pose estimation software DeepLabCut (DLC) (Mathis et al., 2018). Twenty frames from each video were manually labeled and then DLC provided positions for labeled points on all other frames. Each frame had 130 and 118 points manually labeled for S. polymorpha and S. sexspinosus, respectively. Three points per limb (at the body-limb point, mid-limb and tip) were manually annotated, as well as points on the posterior and anterior antennae (Fig. 2C,D). Points were placed within 0.5 cm of each limb-point position. Positional data obtained for S. polymorpha had a 'likelihood' [accuracy of obtained kinematics (Mathis et al., 2018)] of 0.99±0.03, 0.98±0.05 and 0.96±0.08 for R g =0, 0.17 and 0.44, respectively. Positional data obtained for S. sexspinosus had a likelihood of 0.96±0.08, 0.95±0.15 and 0.94±0.12 for R g =0, 0.17 and 0.44, respectively.

Body and limb parameters
Digitized kinematics were used to calculate the body and limb parameters using custom MATLAB code. First, a Gaussian filter was used to smooth the x-and y-coordinates of each tracked point. Filtered body-limb points on both sides (left and right) were averaged over time to obtain a body midline. Body angles (φ) were obtained by finding the angle between the adjacent body segments. Leg angles (θ) were obtained by calculating the angle between a limb (dashed white line) and the local body segment ( Leg angles were used to calculate phase over time for each limb on the centipede's body, similar to methods in Kuroda et al. (2022). Each leg phase (φ i ) was obtained from the difference between changes in the leg angle (Δθ i ) from the time average and its derivative (D _ u i ) ( Fig. 6) (Kuroda et al., 2022). The retraction period (T ret ) was obtained by finding the timing between φ i =0 and φ i =π. The stride period (T stride ) was obtained by calculating the timing between successive points when φ i =0. Duty factor (DF) was calculated as the ratio of the retraction and stride periods (DF=T ret /T stride ). Stride frequency was calculated as the inverse of the stride period (ω stride =1/T stride ).
Step length (L step ) was obtained by calculating the total distance traveled for each associated T ret . Stride length (L stride ) was calculated as the ratio of the step length and the duty factor (L stride =L step /DF). Because steps and/or strides could be interrupted as a result of limb-substrate collisions, DF, ω stride , L step and L stride were averaged for all limbs and the entirety of each trial. Statistical tests (t-tests) for experimentally obtained parameters were performed using a custom MATLAB code.

Centipede kinematics
For both centipede species, we performed 20 trials for R g =0, 20 trials for R g =0.17 and 20 trials for R g =0.44 (16 in the case of S. polymorpha) (Figs 3 and 4; Movie 1). For R g =0, S. polymorpha exhibited body waves and limb-stepping patterns propagated from head to tail (opposite to the direction of motion) along the body axis ( Fig. 3A-Di). In contrast, for R g =0.17 and 0.44, we observed the same limb-stepping pattern but no regular body undulation. That is, there was no body undulation that emerged from high running speeds. Instead, bands of curvature emerged owing to the path that the centipedes traveled along the terrain. We observed interruptions in the limb-stepping patterns with increasing terrain complexity ( Fig. 3C,Diii). These correspond to limb-substrate collisions; as the centipede moved across the terrain, limb-substrate contact on the horizontal plane (i.e. limb contacting the side of a block) could occur as a consequence of the height disparities.
For R g =0, S. sexspinosus did not exhibit body undulation, even when locomoting at high speeds. However, the centipede propagated limb-stepping patterns from tail to head (direct, with the direction of motion) ( Fig. 4B-Di). This was surprising, as centipedes in the order Scolopendromorpha are thought to only use retrograde limb-stepping patterns (Manton, 1977). For R g =0.17, S. sexspinosus demonstrated changes in their behavior. On initial trials, the animals used solely direct limb-stepping patterns. As more trials were collected, S. sexspinosus used direct limb-stepping patterns and changed the direction the limb pattern was propagated from direct to retrograde within a trial (Fig. 4Cii,Dii). Interestingly, we observed that over time (minutes, from trial to trial), these centipedes would switch more rapidly (i.e. earlier in the trial) from direct to retrograde or would only use retrograde limb-stepping patterns. We hypothesize that the centipedes actively changed the locomotive strategy faster as a result of learning (Sahley, 1984;Krasne and Glanzman, 1995). However, to minimize the effects of learning, the centipedes were given a resting period (at least 3 to 4 min) between trials; trials in which potential learning occurred (A) Experimental set-up. Experiments were conducted in a 27×51×32 cm glass tank with a high-speed camera placed vertically over the selected terrain. (B) Lower (top) rugosity terrain (R g =0.17) with Gaussian distributed blocks of varying heights. Higher (bottom) rugosity terrain (R g =0.44) with inverted Gaussian distributed blocks of varying heights. Insets shows the Gaussian (top) and inverted Gaussian (bottom) distribution for R g =0.17 and 0.44, respectively. For R g =0.17, terrain block heights vary from 0 to 1 cm and from 0 to 0.75 cm for S. polymorpha and S. sexspinosus, respectively. For R g =0.44, terrain block heights vary from 0 to 1.5 cm and from 0 to 1 cm for S. polymorpha and S. sexspinosus, respectively. Blocks are colored by relative height. Labeled frame to track the kinematics of (C) S. polymorpha and (D) S. sexspinosus using DeepLabCut (Mathis et al., 2018). All scale bars correspond to 1 cm.
were excluded from the analysis. For R g =0.44, S. sexspinosus only used retrograde limb-stepping patterns (Fig. 4Cii,Dii). Interestingly, we noticed significant body undulation in S. sexspinosus for R g =0.44; however, we posited that the bands of body curvature observed in experiments (Fig. 4Bii,iii) are passive responses to the structures of the rugose terrains, related to the path of travel. Further, similar to S. polymorpha, we observed interruptions in the limbstepping pattern, related to limb-substrate collisions in the horizontal plane owing to height disparities between adjacent blocks (Fig. 4Ciii,Diii).

Performance across terrains
The direction that the limbs propagate can be characterized by the leg phase shift (LPS). LPS is defined as the fraction of time over a gait cycle in which the forelimb leads the hindlimb in a pair of adjacent limbs (Fig. 5A). A LPS<0.5 corresponds to direct limbstepping patterns ( propagated with the direction of motion). In contrast, LPS>0.5 corresponds to retrograde limb-stepping patterns (opposite to the direction of motion). A LPS=0.5 corresponds to an alternating tripod gait. In hexapods, three leg pairs alternate ground contact, forming a tripod. In myriapods, an alternating tripod corresponds to every other leg (e.g. all even numbered legs) on the same side having the same phase. However, an alternating tripod gait has not been reported in centipedes.
We calculated the speed of both centipede species for all terrains and quantified the limb-stepping behavior by calculating the LPS.
Scolopendra polymorpha achieved a speed of 0.25±0.07 body lengths per gait cycle (BL cycle −1 ) and a LPS of 0.95±0.01 on R g =0 (Fig. 5B). Speed and LPS decreased with increasing terrain rugosity: S. polymorpha achieved speeds of 0.21±0.05 and 0.19±0.04 BL cycle −1 and a LPS of 0.93±0.02 and 0.92±0.04 for R g =0.17 and 0.44, respectively. Previous studies have characterized the relationship between speed and body undulation; when traveling at high speeds, centipedes that use a retrograde limb-stepping pattern display an increase in body undulation, specifically an increase in the body wave amplitude (Manton, 1952;Chong et al., 2022a preprint). Conversely, when these centipedes travel at low speeds, there is a significant decrease in the maximum body wave amplitude, making body undulation negligible (Manton, 1952;Chong et al., 2022a preprint). Thus, lack of body undulation in S. polymorpha on the rugose terrains (Fig. 3Bii,iii) corresponds to a decrease in speed. We note that, although on flat terrain the centipedes displayed some body undulation, centipedes were not stimulated to elicit maximum speed on any of the terrains. In other words, we allowed centipedes to move at their preferred traveling speed.
Scolopocryptops sexspinosus achieved a speed of 0.20±0.03 BL cycle −1 , with a LPS of 0.14±0.06 on the flat terrain (Fig. 5C), consistent with observations of a direct limbstepping pattern (Manton, 1952). For R g =0.17, trials were categorized  .5 corresponds to direct limb-stepping patterns. LPS>0.5 corresponds to retrograde limb-stepping pattern. Differences were significant at *P≤0.05 and ***P≤0.001. For S. polymorpha, LPS differences were significant at P≤0.05 between R g =0 and 0.44. For S. sexspinosus, LPS differences were significant at P≤0.001 between R g =0 and 0.17 (both LPS<0.5 and LPS>0.5), between R g =0 and 0.44, between R g =0.17 with distinct LPS, and between R g =0.17 (LPS<0.5) and 0.44. For S. polymorpha, five trials per animal were included in this analysis for terrains with rugosity R g =0 (N=4), 0.17 (N=4) and 0.44 (N=3). For S. sexspinosus, five trials per animal (N=4) were included in this analysis for all terrains. For R g =0.17, trials were divided by the most prominent limb-stepping pattern (i.e. used for the majority of the trial) for each animal (10 trials for direct, 10 trials for retrograde). For those trials, average LPS was calculated over the duration of the trial that the prominent limb-stepping pattern (e.g. towards the end of a trial) was observed. by LPS. Scolopocryptops sexspinosus had a wide distribution of LPS throughout each trial; interestingly, there are two clusters of LPS (one in the direct regime, the other in the retrograde regime) in the spectrum. When the centipede used only direct limb-stepping patterns, it achieved a speed of 0.19±0.05 BL cycle −1 and used a LPS of 0.37±0.09. In contrast, the animal achieved a speed of 0.17±0.05 BL cycle −1 and a LPS of 0.75±0.10 if it used retrograde limb-stepping patterns. Unlike with retrograde limb-stepping patterns, body undulation does not emerge in centipedes that use direct limb-stepping patterns, independent of locomotor speed (Manton, 1952). In the case of S. sexspinosus, when it used retrograde limb-stepping patterns it did not exhibit body undulation. Lack of body undulation may be due to: (1) the inability of the centipede to generate and propagate traveling waves of body curvature, or (2) higher speeds not being elicited. For R g =0.44, S. sexspinosus used only retrograde limb-stepping patterns; the centipede achieved a speed of 0.15±0.04 BL cycle −1 and a LPS of 0.81±0.11. A retrograde limb-stepping pattern facilitates 'follow the leader' between limbs; when a single limb is placed on the ground, the rest of the limbs follow. Thus, we posit the centipede modulated the LPS to reduce the uncertainty of limb-substrate placement.
Phase over time for each leg (φ i ) was calculated to find the retraction (T ret ) and stride (T stride ) periods (Fig. 6A,B). T ret and T stride are the time associated with backward movement of a limb during stance and the duration of a gait cycle, respectively (see Materials and Methods). These were used to calculate duty factor (DF), stride frequency (ω stride ), step length (L step ) and stride length (L stride ) for both S. polymorpha and S. sexspinosus across all terrains (Fig. 6C-F).
L step and L stride are leg parameters that can be directly impacted by limb-substrate collisions. Thus, we expected the complexity of the rugose terrains to result in modulation of L step or L stride . Surprisingly, there were small variations in L step across the terrains (Fig. 6E). Scolopendra polymorpha used a L step of 0.08±0.04, 0.09±0.05 and 0.08±0.05 BL for R g =0, 0.17 and 0.44, respectively. Scolopocryptops sexspinosus used a L step of 0.10±0.05, 0.10±0.06 and 0.12±0.07 BL for R g =0, 0.17 and 0.44, respectively. In the case of S. sexspinosus, small changes in L step may be due to the animals changing the propagation direction of the limb-stepping pattern. Similarly, there were small changes in L stride across the terrains for both centipede species (Fig. 6F). Scolopendra polymorpha used a L stride of 0.17±0.11, 19±0.13 and 0.16±0.09 BL for R g =0, 0.17 and 0.44, respectively. Scolopocryptops sexspinosus used a L stride of 0.20±0.08, 0.22±0.18 and 0.23±0.12 BL for R g =0, 0.17 and 0.44, respectively. Although S. sexspinosus exhibited changes in the gait, L step and L stride were averaged for all trials. Averages included when the animals used both direct and retrograde limb-stepping patterns. Therefore, some of the variance can be attributed to intervals in which these centipedes switched from direct to retrograde.

Passive limb mechanics
For both centipede species, we observed limb-substrate collisions along the horizontal plane owing to the height disparities between adjacent blocks. Instead of jamming (i.e. limbs becoming stuck or caught) into a block, the centipede's limbs bent in the direction the force from the block was applied (towards the body, opposite to the direction of motion) (Movie 2). We posit that the inherent flexibility of the centipede's limbs facilitated this limb behavior to emerge passively, which we have termed 'passive gliding'. In a previous study (Ozkan-Aydin et al., 2020), we found that similar dynamics (i.e. passive mechanical compliance) improved locomotor performance on complex terrain of a centipede robot model without changes in the control. Thus, we hypothesize that passive gliding allows centipedes to negotiate limb-substrate collisions.
We identified each instance (when one or more limbs were bent as the result of a block at any point in time) of passive gliding for every trial of both centipede species. Fig. 7A,C shows examples of passive gliding for R g =0.17 for S. polymorpha and S. sexspinosus. We observed that S. sexspinosus displayed a greater number of instances (27 instances) of passive gliding than S. polymorpha (19 instances). However, the number of occurrences is path dependent; different paths led to different number of occurrences of passive gliding per individual (Fig. 7B,D). A single S. sexspinosus did not exhibit any passive gliding, while all S. polymorpha exhibited passive gliding. Fig. 7E,G shows examples of passive gliding for R g =0.44 in both centipede species. Scolopendra polymorpha and S. sexspinosus displayed 53 and 60 instances of passive gliding, respectively. Limb-substrate collisions increased with terrain rugosity owing to the increase of complexity (i.e. height disparities between adjacent blocks). Unlike for R g =0.17, where few limbs collided with the block, a greater number of limbs exhibited passive gliding for R g =0.44 (Fig. 7E,G). In addition, in some trials, passive gliding occurred on both sides of the body. Fig. 7E shows an example in which limbs on both sides of the body engage in passive gliding simultaneously.
We calculated the probability density function (PDF) of body and limb angles to quantify observed changes as a function of terrain. Fig. 8Ai,ii shows the PDF of body angles for S. polymorpha and S. sexspinosus. On flat terrain, PDFs are centered at 0 for both centipede species. The tails of the PDFs increase with increasing terrain complexity, corresponding to larger bends on the body. Neither of the centipede species exhibited body undulation on the rugose terrains. However, because of each terrain's complexity, there was a higher likelihood that centipedes would not travel in a straight path. Thus, bends on the body reflected in the distributions are related to movements of the centipedes when moving from one row of blocks (down or up the page) to another. PDFs for legs on the left and right side of the body are shown in Fig. 8Bi,Cii for S. polymorpha and S. sexspinosus. Shifts of the peaks of the distributions correspond to a higher likelihood of limb-substrate collision with increasing terrain complexity. Because of the path dependence and passive gliding observed in the centipedes, PDFs obtained for the left and right side of the body are distinct. Thus, shifts from the peaks are more prominent for the legs on the right side of the body, corresponding to limbsubstrate collisions on the right side of the body.

DISCUSSION
Results show that the centipedes exhibit small changes in the DF, L step and L stride for varying terrain rugosity, potentially as a result of the redundancy (i.e. many limbs and segments) in these animals (Full and Koditschek, 1999). For example, redundancy in the limbs may increase robustness and facilitate terrain traversal, even when a limb is compromised (e.g. damaged or lost; Hoffman and Wood, 2013). We observed a decrease in ω stride with increasing terrain complexity. However, further investigation is necessary to understand biomechanical advantages that these animals obtained with lower ω stride .
We discovered that S. polymorpha and S. sexspinosus potentially leverage passive limb mechanics to navigate rugose terrains. When a limb collided with an obstacle, obstacle negotiation was facilitated by presumed passive limb flexion. We thus hypothesize that instead of precisely controlling every degree of freedom associated with many limbs, the animals emergently leveraged the inherent flexibility of their limbs. Offloading the control into the mechanics is an effective strategy seen in many biological systems such as cockroaches (Sponberg and Full, 2008;Spagna et al., 2007;Mongeau et al., 2013;Jindrich and Full, 2002), snakes (Schiebel et al., 2019), spiders (Spagna et al., 2007) and crabs (Spagna et al., 2007), and has been successfully implemented in synthetic locomotors (robots) (Spagna et al., 2007;Ozkan-Aydin et al., 2020;Koh et al., 2010;Schiebel et al., 2020). Moreover, the effect of passive mechanical elements for multi-legged systems has been previously studied on myriapod robophysical models (Ozkan-Aydin et al., 2020;Koh et al., 2010). Flexible passive components facilitated complex terrain traversal of the robot, whereas rigid components achieved limited performance (Ozkan-Aydin et al., 2020).
We note that animals do not rely solely on passive body and/or limb mechanics for complex terrain traversal. Extensive research has been performed in arthropods that use sensory modulation or neural feedback for stability upon external perturbations (i.e. reflexes) during quasi-static motion (Büschges et al., 2008;Cruse et al., 2007;Ritzmann and Büschges, 2007). Yet, rapid running behaviors may limit reflexes, owing to the lack of time to adapt to perturbations (Jindrich and Full, 2002;Kubow and Full, 1999; . Distinct shapes and colors correspond to individual trials and animals, respectively. All scale bars correspond to 0.75 cm and refer to terrains directly below. For S. polymorpha, five trials per animal were included in this analysis for terrains with rugosity R g =0 (N=4), 0.17 (N=4) and 0.44 (N=3). For S. sexspinosus, five trials per animal (N=4) were included for all terrains. Koditschek et al., 2004). It is hypothesized that control (whether preflexive or reflexive) depends on the context of the animal for robust locomotion (Koditschek et al., 2004). Individual control of the limb dynamics may emerge during slow walking behaviors, as seen in other arthropods (Cruse, 1990;Burrows, 1992). However, unlike in other arthropods with few leg pairs, the presence of redundancy in centipedes potentially reduces the need for reflexive control. That is, even if some legs fail to make proper limb-substrate contact, the centipede's many limbs can offer other points of support and stability.
We posit that these strategies ( passive mechanics and redundancy) are advantageous in these centipedes' natural environments. Scolopendra polymorpha is a desert-dwelling centipede, whereas S. sexspinosus is a habitat generalist that can be found in forests within leaf litter and detritus, and under rotting logs. Both of these centipedes must contend with heterogeneities and height disparities inherent of the many materials in their surroundings. Further, these animals compete for resources (e.g. food) and thus reducing the energy required to negotiate complex terrains might be desirable.
It is commonly accepted that centipedes in the orders Scolopendromorpha, Geophilomorpha and Craterostigmorpha use retrograde limb-stepping patterns, whereas those in the orders Lithobiomorpha and Scutigeromorpha use direct limb-stepping patterns (as characterized by Manton, 1977). In addition, it is commonly accepted that the direction in which the limb-stepping pattern is propagated is fixed (the 'one-species-one wave hypothesis'; Kuroda et al., 2022). Scolopocryptops sexspinosus exhibited behaviors contrary to both of these. Although S. sexspinosus is in the order Scolopendromorpha (Cryptopidae family), instead of retrograde it uses direct limb-stepping patterns on flat, solid surfaces. Moreover, when locomoting on rugose terrains, S. sexspinosus exhibited changes in the LPS corresponding to a change of limb-stepping pattern (i.e. change in gait). This change in LPS is not unique to S. sexspinosus or centipedes of the order Scolopendromorpha; previous studies have found changes in the limb-stepping pattern with changes in the substrate (Manton, 1965;Kuroda et al., 2014Kuroda et al., , 2022Yasui et al., 2019) in different centipede species. Therefore, further investigation of centipede locomotion is necessary to evaluate and advance understanding across these orders.
When presented with our rugose terrains, S. sexpinosus changed the limb-stepping pattern (from direct to retrograde). We observed comparable performance independent of the direction in which the limb-stepping pattern was propagated (for R g =0.17 terrain). However, why a change in the limb-stepping pattern is a desirable strategy for this centipede remains unknown. We posit that such a strategy increases the probability of finding a secure foothold. By using a retrograde limb-stepping pattern, the centipede can place a limb on the terrain and posterior limbs follow. Thus, the uncertainty associated with a direct limb-stepping pattern is reduced by switching to a retrograde pattern. Further investigation is necessary to understand the biomechanical advantage in this transition. Moreover, it is important to note that although S. sexpinosus used direct limb-stepping patterns on flat surfaces, this is not the centipede's natural environment. Therefore, the limbstepping patterns these centipedes use in nature may be retrograde and not direct.
The kinematic analysis of these experiments was constrained to two dimensions (along the long and short axes of the centipede). However, sagittal movement along the height of surface (out/into the page) could play an important role. In flat terrain, these centipedes exhibit lifting of the body during locomotion (Movie 3). In rugose terrains, these animals may fall into cavities formed by the blocks where lifting of the body to continue terrain traversal is essential. In other instances, centipedes have segments of the body suspended in air while crossing large gaps (Movie 3). In those instances, it is possible the limb dynamics may change (i.e. from periodic to no leg movement when crossing gaps; Yasui et al., 2017a,b) depending on the local surroundings of each body segment. Further examination is required to understand contributions in three dimensions in live centipedes. Nevertheless, a previous study on a centipede robot (Ozkan-Aydin et al., 2020) shows that passive elements facilitated passive dorso-ventral flexion, augmenting the capabilities of the robot.

Conclusions
We performed, to the best of our knowledge, the first experiments with myriapods on terrains with features modeling natural habitats and terradynamic complexity. We explored the effects of terrain complexity on body and leg dynamics in two centipede species, S. polymorpha and S. sexspinosus. Both of the centipede species studied were from distinct environments. Yet, these animals leveraged their morphology and physiology to traverse complex terrains. We observed that these animals used passive gliding of the limbs during limb-substrate interactions, potentially minimizing gait perturbation and facilitating traversal. Further, on the rugose terrains, S. sexspinosus exhibited changes in the LPS corresponding to a change in the propagation direction of the limb-stepping pattern (i.e. from direct to retrograde). We note that the results presented here correspond to a relatively small sample size (N=4) for both centipede species. However, our results are general and repeatable −π/2 π/2 0 θ right (rad) −π/2 π/2 0 ϕ (rad) −π/2 π/2 0 −π/2 π/2 0 −π/2 π/2 0 θ left (rad) θ left (rad) even when centipedes were not in optimal conditions (i.e. missing limbs). That is, we observed the behaviors presented here in trials with other individuals that did not meet the necessary criteria to be included in the results discussed. In S. sexspinosus, active changes in the gait may reflect the plasticity of these animals in response to changes in the environment. This may be due to selective pressures related to the variability of the composition of this centipede's environment. Comparable locomotive performance between centipede species and previous robotic studies (Ozkan-Aydin et al., 2020) suggests that changes in gait do not improve locomotor performance. However, both our results and those from previous studies (Manton, 1965;Kuroda et al., 2014Kuroda et al., , 2022Yasui et al., 2019) suggest that gait selection is coupled with the centipede's immediate surroundings. We posit that a retrograde limb-stepping pattern increases the probability of secure footholds and reduces the force on the limbs upon a limb-substrate collision (due to passive limb gliding) in rugose terrains.
Future comparative work could extend to other centipede species to study their locomotive strategies in rugose terrains. This could offer insight into the environmental information these animals use to select gaits. In addition, three-dimensional kinematic analysis may provide insight into the observed lifting of the body during locomotion (Movie 3) and the effects during complex terrain traversal. Moreover, future work could explore the locomotive performance as a function of the number of leg pairs on rugose terrains with not only live animals but also robophysical models in laboratory environments, and inform the development of robots for tasks such as search and rescue (Ozkan-Aydin et al., 2020;Pfeifer et al., 2007).