To traverse complex terrain, animals often transition between locomotor modes. It is well known that locomotor transitions can be induced by switching in neural control circuits or driven by a need to minimize metabolic energetic cost. Recent work revealed that locomotor transitions in complex 3D terrain cluttered with large obstacles can emerge from physical interaction with the environment controlled by the nervous system. For example, to traverse cluttered, stiff grass-like beams, the discoid cockroach often transitions from using a strenuous pitch mode pushing across the beams to using a less strenuous roll mode rolling into and through the gaps. This transition can save mechanical energetic cost substantially (∼100–101 mJ) but requires overcoming a potential energy barrier (∼10−3–10−2 mJ). Previous robotic physical modeling demonstrated that kinetic energy fluctuation of body oscillation from self-propulsion can help overcome the barrier and facilitate this transition. However, the animal was observed to transition even when the barrier still exceeded kinetic energy fluctuation. Here, we further studied whether and how the cockroach makes active adjustments to facilitate this transition to traverse cluttered beams. The animal repeatedly flexed its head and abdomen, reduced hindleg sprawl, and depressed one hindleg and elevated the other during the pitch-to-roll transition, adjustments which were absent when running on a flat ground. Using a refined potential energy landscape with additional degrees of freedom to model these adjustments, we found that head flexion did not substantially reduce the transition barrier (by ∼10−3 mJ), whereas leg sprawl reduction did so dramatically (by ∼10−2 mJ). We speculate that head flexion is for sensing the terrain to guide the transition via sensory feedback control.
Animal locomotion emerges from direct physical interaction with the environment controlled by the nervous system via both feedforward preflexes facilitated by morphology and feedback control modulated by sensing (Dickinson et al., 2000). To move across complex environments, animals often use and transition between multiple modes of locomotion (Alexander, 2002; Dickinson et al., 2000; Li et al., 2015; Lock et al., 2013; Low et al., 2015). Most terrestrial locomotion studies have focused on how animals use neuromechanical control to generate or stabilize near-steady-state, single-mode locomotion (e.g. walking, running: Blickhan and Full, 1993; Kuo, 2007). Previous work explored how gait transitions result from changes in the rhythmic output of central pattern generators (Ijspeert, 2008), sensed information of the environment (Blaesing and Cruse, 2004; Ritzmann et al., 2012) or the need to minimize metabolic energy cost over large spatiotemporal scales (Bramble and Lieberman, 2004; Shepard et al., 2013).
Recent research in our lab has begun to offer insight into how locomotor transitions can emerge from animals' direct physical interaction with the environment (Gart and Li, 2018; Gart et al., 2018; Han et al., 2021; Li et al., 2015, 2017, 2019b; Othayoth and Li, 2021; Othayoth et al., 2020; Xuan and Li, 2020a,b; Zheng et al., 2022). In particular, these studies have established a potential energy landscape approach to understanding stochastic yet stereotyped animal locomotor transitions in complex 3D terrain with many large obstacles (Othayoth et al., 2020, 2021). In such terrain, physical interaction of the animal with the environment results in a potential energy landscape with distinct basins. Because the animal's self-propulsion breaks continuous frictional terrain contact, the system is statically unstable and drifts down the potential energy basin. This attraction towards distinct landscape basins results in the system having stereotyped locomotor modes. Thus, transitions between locomotor modes can be generated by taking actions to destabilize the system across potential energy barriers separating landscape basins. The barrier height measures the difficulty of making a transition. Most of these studies have focused on how locomotor transitions can be induced by feedforward self-propulsive mechanisms (Gart and Li, 2018; Gart et al., 2018; Han et al., 2021; Othayoth and Li, 2021; Othayoth et al., 2020; Xuan and Li, 2020a,b; Zheng et al., 2022). Not surprisingly, some of them also found evidence that animals can make active adjustments (presumably using sensory feedback control) to aid locomotor transitions (Gart and Li, 2018; Gart et al., 2018; Han et al., 2021; Othayoth et al., 2020).
Here, we took the next step in quantifying and understanding how animals use active adjustments to better make locomotor transitions in complex 3D terrain. Our study was motivated by and built upon a recent study of the discoid cockroach (Blaberus discoidalis) traversing a layer of cluttered grass-like beam obstacles (Othayoth et al., 2020). When encountering stiff beams, the animal often first pushes against the beams, resulting in the body pitching up (the pitch mode; Fig. 1, thick blue arrow), but then rolls its body into a gap between beams (the roll mode; Fig. 1, red arrow) to traverse, rarely pushing down the beams to traverse (Fig. 1, thin blue arrow). The animal may also get deflected sideways when exploring in front of the beams (the deflect mode; Fig. 1, purple dashed curve) (Li et al., 2015). Potential energy landscape modeling revealed that the pitch and roll modes emerge as the system is attracted to distinct pitch and roll basins of the potential energy landscape, respectively. Both the pitch and roll modes are more strenuous than running on a flat ground [with a minimal mechanical energetic cost of 7.9 mJ and 0.2 mJ, respectively, for the stiff beams tested in this study; see Supplementary Materials and Methods, ‘Minimal mechanical energetic cost in pitch and roll mode’; these are 130 times and 3 times that needed per stride during medium-speed running at 5 body lengths s−1 (Kram et al., 1997), respectively]. Transition from the pitch to the roll mode can substantially reduce mechanical energy cost (by ∼100–101 mJ), but it requires overcoming a potential energy barrier between the pitch and roll basins (∼10−3–10−2 mJ; see Supplementary Materials and Methods, Pitch-to-roll transition barrier). Systematic experiments using a feedforward-controlled robot demonstrated that kinetic energy fluctuation from body oscillations resulting from self-propulsion can induce transitions from the pitch to the roll mode (Fig. 1, orange arrow), when it exceeds the potential energy barrier between the pitch and roll basins. However, despite qualitatively similar overall findings, the animal's pitch-to-roll transition happens even when its body kinetic energy fluctuation is insufficient to overcome the barrier. This means that the animal must also be making active adjustments to facilitate the transition.
To achieve our goal, we challenged the discoid cockroach to traverse a layer of stiff beams and used high-speed imaging to measure detailed body and appendage kinematics during the pitch-to-roll transition. We discovered that the animal made several adjustments. (1) Head flexion: the animal repeatedly flexed its head while interacting with the beams. (2) Abdomen flexion: the animal flexed its abdomen while interacting with the beams and after the animal rolled into the beam gap. (3) Leg sprawl: the animal spread both its hindlegs further outward when pitching against the beams, but tucked one hindleg inward when rolling into the beam gap. (4) Differential leg use: the animal depresseed one hindleg (moved the foot further away from the thorax) and elevated the other (moved the foot closer to the thorax) when rolling into the beam gap.
We hypothesized that the animal's head flexion and leg sprawl adjustment facilitate the pitch-to-roll transition. Specifically: when the animal is pitched up against the beams, (1) head flexion and (2) tucking in the legs reduces the pitch-to-roll transition barrier and facilitates rolling into the gap; and (3) after the animal body has rolled into the gap, head flexion helps it stay in the gap.
To test hypotheses 1 and 2, we used potential energy landscape modeling to analyze whether and how much the observed use of head flexion and leg tucking in changed the potential energy barrier that must be overcome to transition from the pitch to roll mode (which measures the difficulty of the transition). We found that leg tucking in reduced the pitch-to-roll transition barrier, supporting hypothesis 2, but head flexion did not, rejecting hypothesis 1. To test hypothesis 3, we analyzed whether and how much the observed head flexion changed the potential energy barrier that prevented the animal from transitioning from the rolled body being within the gap between the beams to being out of the gap and deflecting sideways. We found that head flexion did not substantially increase the roll-to-deflect barrier, rejecting hypothesis 3. Finally, we discuss the likely functions of the observed body and appendage adjustments and suggest future directions.
MATERIALS AND METHODS
We first performed animal experiments and obtained kinematics data (see ‘Animals’ to ‘Statistics’, below). Then, we constructed the potential energy landscape of the system along the observed average trajectory and analyzed cross-sections of the landscape relevant to the animal's body pitch and roll. We identified local minimum basins corresponding to the pitch and roll modes in the pitch–roll cross-section. Next, we identified saddle points between the pitch and roll basins, and quantified the potential energy barrier (see ‘Potential energy landscape model definition’, ‘Potential energy landscape generation’, and ‘Quantifying the difficulty of transition using the potential energy barrier’, below). Finally, we varied head flexion and total sprawl of the two hindlegs and assessed how the barrier changed compared with that using the constant average values to test hypotheses 1 and 2 about the functions of head and leg adjustments during the pitch-to-roll transition (see ‘Testing the usefulness of head flexion’ and ‘Testing the usefulness of leg tucking in’, below). We also performed these analyses on a yaw cross-section of the landscape (see ‘Quantifying the difficulty of transition using the potential energy barrier’, below) to test hypothesis 3 about the function of head adjustment to keep the animal within the beam gap (see ‘Testing the usefulness of head flexion’, below).
We used three adult male cockroaches (Blaberus discoidalis Audinet-Serville 1839) (Joe's BUGz LLC, Atlanta, GA, USA). Before the experiments, each animal was kept in a plastic container in a room with a controlled temperature of 22°C, moisture of 70%, and lighting on a 12 h:12 h light:dark cycle. Dry dog food (Purina Beneful, Largo, FL, USA) and water jelly made from water and polymer crystal (Tasty Worms Nutrition Inc.) were provided ad libitum. The animals weighed 2.7±0.6 g (with marker items) and measured 5.3±0.3 cm in length, 2.3±0.1 cm in width and 0.73±0.08 cm in thickness. All data reported are means±s.d.
For controlled, repeatable experiments, we constructed a testbed (Fig. 2A) similar to that in our previous study (Othayoth et al., 2020), with a layer of seven beam obstacles. Each beam was 10 mm wide, 100 mm tall and 0.8 mm thick. The lateral distance between two adjacent beams was 10 mm, and the lateral distance between the left-/right-most beams and the walls was 5 mm. We used the same method to construct beam obstacles and characterize their stiffness as that described in our previous study (Othayoth et al., 2020). The beams can only deflect about a hinge just above the ground. The beam torsional stiffness was K=2.5±0.4 mN m rad−1 (mean±s.d. of 7 loading cycles), which was between the two most stiff beams in the previous study. We chose this high stiffness to induce a high pitch-to-roll transition probability (Othayoth et al., 2020) to increase experimental yield.
Eight synchronized high-speed cameras (N5A-100, Adimec, Eindhoven, The Netherlands) recorded the experiment from different views: one from the top view, two from the side view, one from the top-down oblique view, and four from isometric views (Fig. 2A). All the cameras recorded at a frame rate of 100 Hz, a shutter time of 50 µs and a resolution of 2592×2048 pixels. Even with eight cameras, we had to carefully tune camera positioning and orientation to achieve reliable tracking of the animal and beams (see ‘Tracking and 3D reconstruction’, below), because the animal had large 3D body rotations (maximum absolute yaw 100 deg, maximum absolute pitch 62 deg, maximum absolute roll 98 deg; defined in ‘Kinematics and kinetic energy fluctuation analyses’, below) and markers were frequently occluded by the beams. Four halogen work lights (Coleman Cable, Waukegan, IL, USA) provided lighting from the top and side. During experiments, the ambient temperature around the arena was around 36°C. To prevent the cockroaches from overheating, we turned off the work lights between trials.
During each trial, we first placed the animal at the start of the track, covered it with a piece of cardboard, and let it settle down. We recorded the ambient temperature around the obstacle field and reset the beams upright. Then we started camera recording, lifted the cardboard to expose the animal to bright light, and prodded its abdomen with a tape-wrapped straw to induce running through the funnel towards the beams. After the animal traversed the beams, it entered a shelter of egg cartons (not shown in Fig. 2A) at the other end of the track. Then, camera recording was stopped, and videos were saved. The animal was allowed at least 3 min to rest after each trial. For each of the three animals tested, we recorded 18–19 trials.
For each animal, we rejected the trials in which at least one of the following situations occurred. (1) The animal used at least one locomotor mode (Li et al., 2015) other than the pitch and roll modes (Othayoth et al., 2020) to traverse the beams. (2) The animal touched the arena wall in the roll phase (defined in ‘Definition of traversal phases’, below). (3) At least one marker (BEEtags, white-outs or beads) fell off. From the remaining trials, we selected the 12 trials with the shortest traversal time for each of the three animals tested, with a total of 36 trials. This sample downsizing was done because of the significant time cost of digitizing (see next section).
Tracking and 3D reconstruction
To overcome the challenge of tracking from large 3D body rotation and frequent occlusions, we used several types of markers (Fig. 2B). (1) We glued the animal's wings into a natural folded shape using hot glue and exposed the abdomen by trimming the posterior half of the wings. Then we used hot glue to attach a BEEtag (Crall et al., 2015) to the anterior half of the fixed wings covering the thorax as the thorax marker (Fig. 2B, yellow). (2) We used hot glue to attach a BEEtag onto the animals' pronotum as the head marker (Fig. 2B, magenta). (3) We used white-out to paint point markers on the dorsal surface of the abdomen as abdomen markers (Fig. 2B, cyan). We did not use BEEtags to track the abdomen, because they often fell off when the animal interacted with the beams with large abdomen flexion. (4) We used ultraviolet curing glue (Bondic, Aurora, ON, Canada) to attach two small, lightweight (12 mg each, 0.4% body mass, 15% hindleg mass; Kram et al., 1997) aluminium beads (McMaster-Carr, Elmhurst, IL, USA) to each hindleg at two locations close to the femoral-tibial and tibial-tarsal joints as leg markers (Fig. 2B, orange). (5) We attached BEEtags (Crall et al., 2015) to the top and the bottom of each beam's frontal side as beam markers (Fig. 2A). The added mass from the BEEtags (1 mg, 0.03% body mass) was comparable to or less than that of backpacks used in previous studies of dynamic locomotion of discoid cockroaches (e.g. 0.8× body mass: Spence et al., 2010; 1.1× body mass: Han et al., 2021; 5.2× body mass: Jindrich and Full, 2002). We attached all BEEtags and beads under room temperature without cold anesthetizing the animal, because both the hot glue and ultraviolet curing glue used could solidify within a few seconds. We verified that these additional modifications did not significantly affect the animal's traversal performance and behavior compared with our previous study (Othayoth et al., 2020) where only one BEEtag was attached to the wings (see Results, ‘Similar overall performance and behavior to previous study’).
Then, we tracked the markers on the animal and beams in each recorded video from all eight cameras. We tracked all the BEEtag markers automatically using a customized MATLAB code modified from the BEEtag master code (Crall et al., 2015). To track the abdomen and leg markers efficiently, we used DeepLabCut (http://www.mackenziemathislab.org/deeplabcut; Mathis et al., 2018). For each camera view, we first manually digitized these markers in 10 trials, with 100 video frames from each camera view, and used these data as a training sample to train the neural network. After training, DeepLabCut tracked the markers in these videos. We then visually examined the sample tracking results, manually fixed obvious tracking errors, and re-trained the training sample. After several cycles of manual corrections and reinforcement learning, DeepLabCut could automatically track markers in all videos with high accuracy. We visually checked the tracking result carefully and manually corrected the remaining tracking errors. Using this tracking method, we achieved a high marker tracking performance: the head, thorax, abdomen and leg markers were all tracked in 100% of all the frames of all trials. We emphasize that, even with eight cameras covering a large angular range and using DeepLabCut, tracking detailed kinematics in such a densely cluttered terrain is a very laborious and time-consuming process, because of the large body rotation in 3D and frequent occlusion of markers. In total, it took an experienced experimenter 20 h of manual digitizing, 72 h of automatic tracking, followed by another 150 h of manual correction, to track 36 trials averaging 280 frames each with eight camera views.
Finally, we reconstructed 3D kinematics of all tracked markers using the direct linear transformation method and DLTdv digitizing tool (https://biomech.web.unc.edu/dltdv/; Hedrick, 2008). To facilitate 3D calibration, we built a calibration object with 60 BEEtag markers using Lego bricks (The Lego Group, Billund, Denmark).
Kinematics and kinetic energy fluctuation analyses
With the 3D reconstruction of tracked markers, we quantified the motion of the animal's head, thorax, abdomen and two hindlegs. For simplicity, we laterally mirrored kinematic data of the trials in which the animal rolled to the left (negative body roll) to become rolling to the right (positive body roll) to simplify the analysis, considering lateral symmetry.
We first approximated the thorax frame (which is the body frame in Othayoth et al., 2020) and head frame using the BEEtags on them. To do this, we projected a model of the animal (see ‘Potential energy landscape model definition’, below) to a set of eight synchronized camera views and adjusted its pose to visually match it to the animal figure in the video. We checked this matching between the model and the animal figure in at least five other frames in the videos. Then we defined the animal's thorax frame (XTYTZT) and head frame (XHYHZH) as the model's thorax frame and head frame, respectively, and used homogeneous transformation between the tags and the models to represent the spatial relationship between the tags and the animal's thorax and head. For the abdomen frame (XAYAZA), we defined the origin (OA) as the foot of the perpendicular from the top marker (AT) to the segment of left (AL) and right markers (AR), defined the x-axis as the direction from the origin (OA) pointing at the top marker (AT), and defined the y-axis as the direction from the origin (OA) pointing at the left marker (AL) (Fig. 2C). Thus, we obtained the head, thorax and abdomen frames, each with 3D position (x, y, z) and orientation (yaw α, pitch β, roll γ, Z−Y′−X″ Tait–Bryan convention) (Fig. 2C). Note that a negative pitch angle means the body is pitched up.
We then calculated the following kinematic variables as a function of time in each trial. (1) Head flexion βh: the pitch of the head frame in the thorax frame. (2) Abdomen flexion βa: the additive inverse of the pitch of the abdomen frame in the thorax frame. The additive inverse (positive becoming negative, and negative becoming positive) was used so that βa is positive when the animal flexes the abdomen down. (3) Leg sprawl φL, φR, φT: the angle from the vector from the thorax frame origin (OB) to the leg markers' projection into the body coronal plane (L′L, L′R) to the x direction of thorax frame is defined as left and right leg sprawl angle (φL, φR), respectively. Total leg sprawl φT is the sum of the two (Fig. 2D). (4) Leg height difference Δh: the leg height of the right hindleg (hR) minus the leg height of the left hindleg (hL) (after mirroring). Hindleg height was defined as the distance of the leg marker from the thorax coronal plane (Fig. 2D). A negative leg height means that the leg marker is below the thorax coronal plane, and a positive leg height means that it is above. All the equations are summarized below.
During experiments, the animal's hindlegs moved at 0.17±0.05 m s−1 (temporal average across all trials), resulting in an estimated kinetic energy of 0.005±0.003 mJ from both hindlegs. We neglected this contribution because it was much smaller than the potential energy barrier reduction from leg flexion (0.06 mJ; see Results, ‘Leg sprawl adjustments facilitate body rolling’).
Definition of traversal phases
To compare the animal's motion in different stages of the traversal, we divided each trial into five distinct phases. (1) Approach: from when the animal ran into the camera view to when it collided with the beams. (2) Explore+pitch: from when the animal collided with the beams to when it started the final, successful roll attempt. Because the animal sometimes attempted to roll its body more than once, here we separated this phase and the next phase with the start of the last, successful attempt. The start of an attempt was defined as the instance when the animal's body roll changed sign from negative to positive (after mirroring; see ‘Kinematics and kinetic energy fluctuation analyses’, above). (3) Roll: from when the animal started the final, successful body roll attempt to when body roll was maximal. (4) Land: from when body roll was maximal to when the animal landed with all its six legs touching the ground again. (5) Depart: from when the animal landed with all its six legs touching the ground to when it exited the camera views.
Note that the pitch+explore and roll phases here are not the same as the pitch and roll modes in our previous study (Othayoth et al., 2020); instead, these two phases and the subsequent land phase are consecutive stages of the overall process of the animal transitioning from the pitch to the roll mode. The approach and depart phases correspond with the animal running on a flat ground.
Our goal was to quantify and understand what adjustments the animal made to facilitate the pitch-to-roll transition. To achieve this, we focused on analyzing whether there were significant changes in kinematics in the explore+pitch and roll phases, compared with the approach and depart phases. We did not focus on analyzing the complex kinematics in the land phase because the pitch-to-roll transition was completed by then.
To compare across traversal phases, for each trial, we averaged most kinematic variables (body roll γ, body pitch β, total leg sprawl φT and leg height difference Δh) over time in each phase. For head flexion βh and abdomen flexion βa, for each trial, we instead calculated their standard deviation in each phase. This was because the animal often repeatedly flexed its head and abdomen (see Results, ‘Head flexion’ and ‘Abdomen flexion’), and the head and abdomen flexion angles each often nearly cancelled themselves out when being averaged over time. In contrast, their standard deviation better reflected the animal's repeated head and abdomen flexion amplitudes.
Then, we pooled the averages of most kinematic variables and standard deviations of head flexion and abdomen flexion from all trials. Using these data, for each pair of phases, we performed a mixed-effects ANOVA, with the phase as a fixed factor and the individual as a random factor to account for individual variability, to determine whether there was a significant difference between phases. These data are reported as means±s.d. across trials (see Results, from ‘Body rotations’ to ‘Leg adjustments’).
To check whether the animal's overall performance and behavior in this study were similar to those in our previous study (Othayoth et al., 2020), we performed a fixed-effects ANOVA, with whether the data were from this study or the previous study as the factor, and traversal time and maximal body roll as the variables (see Results, ‘Similar overall performance and behavior to previous study’).
Because the duration of each phase in each trial varied substantially, plotting kinematics of all the trials as a function of time results in substantial overlap of data of different phases and obscures the trends of kinematics during each phase. To better visualize how body, head, abdomen and leg kinematics change during each phase for each trial, we offset the time of each phase to zero at its beginning and then normalized it to the duration of the phase to be a percentage of each phase. In this way, we aligned the beginning and end of each phase across all the trials. This time normalization allowed clear visualization of the trends of the kinematics and did not affect the results of any other analysis.
All analyses except for statistical tests were performed using MATLAB (MathWorks, Inc., Natick, MA, USA). All statistical tests were performed using JMP 16 (SAS Institute Inc., Cary, NC, USA).
Potential energy landscape model definition
In our previous study, to generate the potential energy landscape, the animal body was modeled as a single rigid body (Othayoth et al., 2020). Here, to further study how the active adjustments facilitated beam traversal, we refined the animal body model to consist of a head, a thorax and an abdomen (Fig. 3A). Antennas, front and middle legs, and other body parts were neglected (totaling 7% body mass). The hindlegs were neglected (6% body mass) when studying the usefulness of head flexion (see ‘Testing the usefulness of head flexion’, below), considering that they are not in contact with beams when the pitch-to-roll transition happened. The hindlegs were added when studying the use of leg adjustments (see ‘Testing the usefulness of leg tucking in’, below). The thorax was modeled as a half-ellipsoid (Fig. 3A, orange; length: 19.9 mm, width: 27.6 mm, thickness: 6.4 mm). The head was modeled as a massless ellipsoid-like rigid body (Fig. 3A, red; length: 9.1 mm, width:14.4 mm, thickness: 6.0 mm). The abdomen was modeled as half of an ellipsoid (Fig. 3A, yellow; length: 30.5 mm, width: 20.6 mm, thickness: 6.5 mm). All the dimensions above were averages of the measured animal dimensions. When added, the hindlegs were modeled as rigid rods with one side fixed to the thorax center (Fig. 3A, blue and red lines with circle for left and right legs, respectively), because we only tracked the tibial-tarsal joint of the legs. The length of each leg was 27 mm (the average maximal leg length was 27±2 mm in the explore+pitch and roll phases over all trials). For simplicity, we assumed that the head and abdomen could each only flex about a lateral axis fixed to the thorax (i.e. only the pitch degree of freedom was allowed). We set the body center of mass at the middle of the rotation axes between the thorax and the abdomen, which is a reasonable approximation (Kram et al., 1997). We intentionally designed the overlap between the thorax and the head or abdomen (Fig. 3A; Fig. S1A) to reduce unrealistic concavity between these segments.
The beams were modeled as rigid rectangular plates attached to the ground with Hookean torsional joints at the bottom. Their orientations without animal interaction were set to vertical (Fig. 3A, green with solid contour). In our previous study, the beams were only allowed to deflect forward, and the largest possible deflection angle was always selected (Othayoth et al., 2020). This resulted in overestimated beam deflection. In particular, when the cockroach had already traversed the beams using the roll mode, the estimated beam deflections were still calculated as if the beams blocked in front of the cockroach when the animal used a pitch mode. Here, to refine the model, we allowed the beams to deflect either forward or backward during the interaction, and we determined each beam's deflection (Δθ1, Δθ2) as the angle with minimal absolute value at which the beam did not overlap with any part of the animal. This revised protocol ensured that, when the cockroach was sufficiently far away from the beam, either not having entered the beam area or having already traversed it, beam deflection was zero; when the animal was interacting but had not traversed the beams, the beams deflected forward; and when the animal had traversed the beams, the beams deflected backward. Note that this revised protocol does not affect the transition barrier analysis, because the pitch-to-roll transition happened when the animal body was only beginning to enter the gap (average body x=−13.6±4.4 mm when the pitch-to-roll transition happened over all trials); in that case, the two protocols gave the same result.
Below we give an example of how to determine beam deflection (Fig. 3B). When hindlegs were neglected, we first identified seven possible deflection angles, i.e. 0 deg deflection (Fig. 3Bi), deflections where the beam was tangential to the head in the front or back (Fig. 3Bii,iii), to the thorax in the front or back (Fig. 3Biv,v), or to the abdomen in the front or back (Fig. 3Bvi,vii). Sometimes, there were no deflections where the beam was tangential to any body part; in that case, the two possible deflection angles where the beam was tangential to this part were set to be 0 deg. Then, we rejected the beam deflections where the beam overlapped with any body part (Fig. 3Bi,iii,iv,v,vi), and finally selected the deflection angle with minimal absolute value (Fig. 3Bii is selected, Fig. 3Bvii is rejected). When the hindlegs were added for analyzing the function of leg adjustments (see ‘Testing the usefulness of leg tucking in’, below; Fig. S1B), compared with that neglecting hindlegs, two additional possible deflection angles were identified for each hindleg, i.e. deflections where the beam contacts the leg in the front or back (Fig. 3Bviii,ix, with only the right leg shown for simplicity). The remaining procedure was the same as that neglecting the hindlegs. Beam deflection calculated from this method better matched experimental measurements than in the previous study (Othayoth et al., 2020), reducing the error from 15±32 deg to −1±13 deg (P<0.001, repeated-measures ANOVA).
Potential energy landscape generation
Next, we collapsed the landscape along other less relevant dimensions by analyzing landscape cross-sections that follow the average animal trajectory. To extract an average animal trajectory as a function of forward position x, we first discretized x within [−26 mm, 33 mm] into 296 bins, each spanning 0.2 mm. We checked whether the animal passed any of these x bins between each two adjacent time steps in each trial. For each bin where this occurred, we determined the values of kinematic variables other than x using linear interpolation over x and recorded them under this bin. Finally, we averaged these recorded variables for each x bin, the evolution of which over x gave the average animal trajectory (Fig. S2). For the pitch–roll cross-section analysis, we always kept body y and yaw α to follow the average trajectory. For the yaw cross-section analysis below, we always kept body y, body pitch β and roll γ to follow the average trajectory. For both analyses, we constrained the abdomen pitch βa fixed at 7 deg (temporal average of abdomen flexion was βa=7±4 deg in the approach phase over all trials). When studying the usefulness of head flexion, βh was kept as a variable (see ‘Testing the usefulness of head flexion’, below). When studying the usefulness of leg tucking in, βh was set to follow the average trajectory (see ‘Testing the usefulness of leg tucking in’, below). See Table S1 for a summary of the ranges and increment of parameter variation and dimension collapsing protocol.
To study how the head and leg adjustments affected the pitch-to-roll transition (see ‘Testing the usefulness of head flexion’ and ‘Testing the usefulness of leg tucking in’, below), we extracted a pitch–roll cross-section of the landscape, where potential energy is a function of body pitch β and roll γ. In addition, to study whether the head flexion helped the animal stay within the gap after the animal rolled (see ‘Testing the usefulness of head flexion’, below), we extracted a body yaw cross-section of the landscape, where potential energy is a function of body yaw α.
Quantifying the difficulty of transition using the potential energy barrier
To transition from one mode to another, the animal had to overcome a potential energy barrier (i.e. transition barrier) on the landscape cross-section. A higher transition barrier means that it is more difficult to transition. We can measure whether and how the transition barrier changed with an observed adjustment (i.e. head flexion, leg tucking in) to evaluate whether it facilitated or hindered a transition. To quantify the difficulty of transitioning between two modes (i.e. from the pitch to the roll mode, from the roll to the deflect mode), for each x position during traversal ([−26 mm, 33 mm]), we generated the relevant cross-section of the landscape, identified the basins corresponding to the two modes, and calculated the transition barrier.
First, we looped through all points on the landscape to identify the local minima and their basins corresponding to the locomotor modes. To quantify the pitch-to-roll transition barrier, on the pitch–roll landscape cross-section, we located the pitch minimum (Fig. 4B, blue point) with a finite body pitch and a body roll near 0 deg (Fig. 4Ai–iii) and the roll minimum (Fig. 4B, red point), with a body pitch near 0 deg and a body roll around 90 deg (Fig. 4Aiii′). When no roll minimum existed (i.e. when the animal was far from the beams; Fig. 4Bi), we defined (pitch, roll)=(0 deg, 90 deg) as the roll minimum.
To quantify the roll-to-deflect barrier, on the yaw landscape cross-section, we located the roll minimum (Fig. 4D, red point), which corresponded to the body rolled into the gap with a body yaw around 0 deg (Fig. 4Ci,ii), and the two deflect minima (Fig. 4D, purple points), which corresponded with the body deflected towards the left or right with a body yaw around ±90 deg (Fig. 4Cii′,ii″). Note that the same roll mode (Fig. 4Aiii′,Ci,ii) corresponded with the roll basin on the pitch–roll cross-section and the roll basin on the yaw cross-section, which appeared as different basins. This is because the potential energy landscape exists in a high-dimensional space, with 5 degrees of freedom (x, y, pitch, roll, yaw) when not considering head, abdomen and leg adjustments. At the same (x, y), the same roll basin in the higher-dimension pitch–roll–yaw landscape cross-section appears as different basins on the lower-dimension pitch–roll cross-section and yaw cross-section.
Once we located the pitch and roll basins on the pitch–roll cross-section and roll and deflect basins on the yaw cross-section, we used a breadth-first search to calculate the transition barrier from one basin to another. Breadth-first search is a computational algorithm for searching on graph data structure (Cormen et al., 2009). We fed the gridded potential energy landscape cross-section as the graph data, with the starting minimum as the start point, the destination minimum as the goal point, and the highest potential energy on the traversing route as the cost function. In the breath-first search algorithm, each searched point remembered its parent (the point that this point was developed from), so tracing the parent and further ancestors from the goal point (i.e. parent backtracking) gave an imaginary route from the start to the destination minimum that crossed the lowest energy barrier (Fig. 4B,D, green curve). We defined the point with the highest energy on this route as the saddle point (Fig. 4B,D, orange points on the cross-sections). Note that this ‘saddle point’ is only a true saddle point on the 2D pitch–roll cross-section and when both the pitch and roll minima are actual local minima on this cross-section. When no roll minimum existed (see the roll minimum definition in the previous paragraph), the ‘saddle point’ on this cross-section was calculated as the roll minimum defined, because the potential energy increases monotonically along the imaginary route from pitch to roll minimum. On the 1D yaw cross-section, the ‘saddle point’ is actually a local maximum. We refer to them all as saddle points for simplicity.
We then defined the transition barrier as the potential energy increase from the starting minimum to the saddle point. Note that the imaginary route was only for defining the saddle point, and during the transition the animal did not necessarily start from a local minimum or transition by crossing the saddle point. Despite this, our barrier estimation still provided useful insight as it quantified the level of the difficulty to transition.
Intuitively, the breadth-first search approach resembled injecting water slowly at the start minimum and tracking the expansion of the water-covering area. The potential energy landscape resembled an uneven surface (Fig. S4A), and each basin on the surface corresponded to a locomotor mode, such as pitch and roll modes (Othayoth et al., 2020) (Fig. S4A, blue and red points; Fig. S4B, blue and red area, separately). Increasing the cost resembled injecting water in the starting basin (Fig. S4B, blue area) and increasing the water level. As the water level increased, there was a moment that the water level was sufficiently high to overcome a barrier between two basins (Fig. S4B, the boundary between blue and red areas), and the water flowed via the saddle point of the barrier (Fig. S4B, orange point) into the destination basin. The water level measured from the starting minimum at the time of this onset of flow resembled the potential energy barrier height (Fig. S4C, yellow).
Testing the usefulness of head flexion
To test hypothesis 1, we analyzed whether head flexion in the range observed reduced the pitch-to-roll transition barrier compared with if the animal simply held its head in the typical orientation (average head flexion during running on flat ground). We varied head flexion within [−25 deg, 65 deg] (covering the observed head flexion range of [−24 deg, 64 deg] over all the trials) with an increment of 5 deg (Fig. S1A), calculated the pitch-to-roll transition barrier as a function of x, and compared the transition barrier at each head flexion with that at head flexion βh=15 deg, which represents the case without active head flexion (temporal average of head flexion was βh=15±4 deg in the approach phase over all trials).
To test hypothesis 3, we analyzed whether the head flexion in the range observed increased the roll-to-deflect transition barrier compared with that without active head flexion. We varied the head flexion as above, calculated the roll-to-deflect transition barrier as a function of x, and compared the transition barrier at each head flexion with that at head flexion βh=15 deg.
Testing the usefulness of leg tucking in
To test hypothesis 2, we analyzed whether the leg sprawl changes affected the pitch-to-roll transition barrier. We added two hindlegs (length 27 mm; see ‘Potential energy landscape model definition’, above) into the model symmetrically to the left and right sides of the body, with a leg height of −5 mm (temporal average of leg height was −5±3 mm in the explore+pitch phase over all trials; see Results, ‘Leg adjustments’), and varied total leg sprawl within [0 deg, 180 deg] with an increment of 45 deg (Fig. S1B). We compared the transition barrier at each total leg sprawl with that at total leg sprawl φT=160 deg (mean±s.d. of maximal total leg sprawl was φT=156±21 deg in the explore+pitch phase over all trials) and φT=20 deg (mean±s.d. of minimal total leg sprawl was φT=21±17 deg in the roll phase over all trials). Note that the animal also elevated and depressed its hindlegs asymmetrically in pitch and roll phases (see Results, ‘Leg adjustments’). For simplicity, here we kept the two legs symmetrical to provide a rough estimate of the effect of leg sprawl change on the barrier.
Frequently used averaged variables in landscape analyses are summarized in Table S2.
Similar overall performance and behavior to previous study
The animals displayed a similar locomotor performance to that in the previous study (Othayoth et al., 2020), with a similar traversal time (3.0±1.0 s versus 3.9±3.9 s previously, P=0.18, fixed-effects ANOVA). The animal also always transitioned to the roll mode to traverse (100% of all 36 trials), similar to the previous study (97% of all previous trials for slightly less stiff beams K=1.7 mN m rad−1), with a similar maximal body roll during traversal (81±10 deg versus 84±20 deg previously, P=0.30, fixed-effects ANOVA). Note that even counting the 28 trials not included in the dataset (see Materials and Methods, ‘Experiment protocol’), which had a slightly longer duration, these metrics were still similar (traversal time: 4.5±1.8 s versus 3.9±3.9 s, P=0.71, fixed-effects ANOVA; roll mode use: 98% versus 97% of all trials; maximal body roll: 90±20 deg versus 84±20 deg, P=0.09, fixed-effects ANOVA).
Cockroaches use complex motion to transition from pitch to roll mode
After running with an alternating tripod gait and colliding with the beams (approach phase; Fig. 5, green), the animal traversed the beam obstacles with complex body, head and leg motions. In the explore+pitch phase (Fig. 5, blue), the animal often moved along the beam layer (y-direction) and turned left or right to search around the beams, pitched up its body against the beams, repeatedly flexed its head, and rubbed its pronotum against the beams, sometimes pushing the beam using its forelegs or middle legs, and swept its antennas in the gaps. In the roll phase (Fig. 5, red), the animal rolled its body into the gap and struggled with its legs to try to push against the back side of the beams. It sometimes flexed its head repeatedly. It also sometimes flexed and twisted its abdomen. In the land phase (Fig. 5, orange), the animal continued to do these, eventually passed the beams in the roll mode, and resumed an upright body orientation. Finally, in the depart phase (Fig. 5, purple), the animal ran away in an alternating-tripod gait. These observations were consistent with those in our previous study (Othayoth et al., 2020).
Similar to the previous study, body oscillation was observed (Othayoth et al., 2020). The average kinetic energy fluctuation was 0.01±0.01 mJ. This was smaller than that in the previous study (0.02±0.01 mJ). We speculate that this was caused by the additional modifications on the animal (wing trimming, adding one more tag on the pronotum, and beads on hindlegs) that slightly resisted animal motion.
The animal's body pitched up in the explore+pitch phase and rolled into the gap in the roll phase (Fig. 6A; Movie 1). In the approach phase, the body only slightly pitched up (Fig. 6Av,D, green, average pitch β=−8±7 deg; note that a negative body pitch angle means the body pitched up). In the explore+pitch phase, the body pitched up substantially (pitch angle became more negative, minimal pitch β=−36±9 deg; Fig. 6Aii,vi,D, blue). In the roll phase, as the animal rolled its pitched-up body substantially into the gap (maximal roll γ=81±10 deg; Fig. 6Aiii,vii,B, red), the body became less pitched (pitch angle less negative; Fig. 6Aiii,vii,D, red) and eventually horizontal. Average body roll γ was higher in the roll phase (44±8 deg) than in the approach (−2±3 deg), explore+pitch (−3±6 deg), and depart (−2±4 deg) phases (Fig. 6C, P<0.0001, repeated-measures ANOVA). Average body pitch β was lower (meaning the body was more pitched up) in the explore+pitch (−14±9 deg) and roll (−14±9 deg) phases than in the approach (−8±7 deg) and depart (−7±5 deg) phases (Fig. 6E, P<0.05, repeated-measures ANOVA).
During both the explore+pitch and roll phases, the animal sometimes repeatedly flexed its head dynamically and sometimes flexed its head down and held it statically (Fig. 7Aii,iii,B, blue and red; Movie 1). This motion was absent during the approach and depart phases when the animal ran on flat ground (Fig. 7Ai,iv,B, green and purple). The standard deviation of the head flexion βh, which reflects how much the head flexed (see Materials and Methods, ‘Kinematics and kinetic energy fluctuation analyses’), was higher in the explore+pitch (7±3 deg) and roll (8±3 deg) phases than in the approach (1.7±0.5 deg) and depart (2±1 deg) phases (Fig. 7C, P<0.0001, repeated-measures ANOVA).
During both the explore+pitch and roll phases, the animal sometimes repeatedly flexed its abdomen dynamically and sometimes flexed its abdomen down and held it statically (Fig. 8Aii,iii,B, blue and red; Movie 1). This motion was absent during the approach and depart phases when the animal ran on flat ground (Fig. 8Ai,iv,B, green and purple). The standard deviation of the abdomen flexion βa, which reflects how much the abdomen flexed (see Materials and Methods, ‘Kinematics and kinetic energy fluctuation analyses’), was higher in the roll (7±3 deg) and explore+pitch (4±2 deg) phases than in the approach (2±1 deg) and depart (3±1 deg) phases (Fig. 8C, P<0.0001, repeated-measures ANOVA).
The animal adjusted its hindlegs in two ways (Fig. 9A; Movie 2). First, it adjusted its hindleg sprawl in the explore+pitch and roll phases. During the explore+pitch phase, the animal spread both its hindlegs further outward (Fig. 9Aii) compared with the approach phase (Fig. 9Ai,B; average left leg sprawl angle φL=63±15 deg versus 55±10 deg, average right leg sprawl angle φR=64±13 deg versus 55±11 deg). As body rolling began, the animal tucked in its depressed (left) hindleg (Fig. 9Aiii,B, blue; average left leg sprawl angle φL=27±21 deg) while keeping the right leg sprawl relatively unchanged (Fig. 9Aiii,B, red; average right leg sprawl angle φR=62±13 deg). Average total leg sprawl φT was greater in the explore+pitch phase (φT=127±19 deg) and smaller in the roll phase (90±23 deg) than in the approach (110±13 deg) and depart (115±11 deg) phases (Fig. 9C, P<0.0001, repeated-measures ANOVA).
In addition, the animal depressed one hindleg relative to the body and elevated the other in the roll phase. In the explore+pitch phase, the two hindlegs had similar heights (Fig. 9Avi,vi′,D; average left leg height hL=−4±2 mm, average right leg height hR=−5±2 mm, average leg height difference Δh=−1±2 mm). In the roll phase, the animal usually kept both feet on the ground (Fig. 9Avii,vii′), with one hindleg depressed further (Fig. 9D, blue; average leg heights hL=−11±3 mm), appearing to push against the ground (Fig. 9Avii,vii′), while the other elevated (Fig. 9D, red; average leg heights hR=−2±2 mm), appearing to support the body (Fig. 9Avii,vii′), which increased the leg height difference (Fig. 9E, red). As the animal moved further through the gap and reached maximal body roll, it elevated its depressed (left) leg up to around the body coronal plane (maximal leg height hL=4±3 mm) in the land phase (Fig. 9D, blue). The average leg height difference Δh was higher in the roll phase (9±3 mm) than in the approach (−1±1 mm), explore+pitch (−1±2 mm) and depart (−1±1 mm) phases (Fig. 9E, P<0.0001, repeated-measures ANOVA). Both these observations demonstrated that the animal used its left and right hindlegs differentially in the roll phase.
Refined potential energy landscape is consistent with coarse landscape in previous study
The topology and evolution of the refined potential energy landscape (Movie 3) as viewed in the pitch–roll cross-section were consistent with those in our previous study (Othayoth et al., 2020). Initially, when the animal was far from the beam, the energy landscape had a local minimum at zero pitch and roll, and a basin was formed near the minimum; as the body moved close to the beam, the basin moved along the pitch direction, becoming the pitch basin, while the roll basin formed at about zero pitch and about 90 deg roll. The similarity of the topology of the potential energy landscape indicated that it was insensitive to minor differences in shape modeling (e.g. using refined body shape versus using a simple ellipsoidal body; varying head and abdomen flexion; including hindlegs or not). We also found that the pitch-to-roll transition barrier calculated from the refined potential energy landscape model here is similar to that from the simple model in the previous study (see Supplementary Materials and Methods, ‘Pitch-to-roll transition barrier’), further demonstrating the model's consistency and applicability with both coarse-grained and fine-grained model approximations (see discussion in Othayoth et al., 2020).
Because we allowed the beam to deflect backward, the pitch basin finally went back to near-zero pitch, and the roll basin eventually disappeared. The landscape became the initial landscape as the animal had traversed and moved far from the beam. This showed that the beam deflection calculation was more reasonable than in the previous study.
Head flexion does not facilitate the pitch-to-roll transition
To test hypothesis 1 that active head flexion reduces the pitch-to-roll transition barrier and facilitates rolling into the gap, we analyzed whether adjusting head flexion can reduce the pitch-to-roll transition barrier. The transition barrier from the pitch to the roll mode with different head flexion is shown in Fig. 10A. At the average x (−13.6 mm) where the animals transitioned from pitch to roll mode, the maximal transition barrier reduction with head flexion within [−25 deg, 65 deg] was 0.0027 mJ (Fig. 10A, a). This mechanical energy that could be saved by head flexion was small (27%) compared with the average kinetic energy fluctuation level (0.01 mJ) and small (4.5%) compared with the energy saved by leg tucking in (0.06 mJ; see ‘Leg sprawl adjustments facilitate body rolling’, below). Also, achieving this saving would require the head to flex by 65 deg, which was rarely observed in the experiment. This suggested that the head adjustment did not reduce the transition barrier substantially to facilitate the pitch-to-roll transition. This rejected our hypothesis that the head adjustment facilitated the mode transition by lowering the pitch-to-roll transition barrier on the potential energy landscape.
To test hypothesis 3 that active head flexion facilitates the animal staying within the gap after rolling into it, we analyzed whether adjusting head flexion can increase the roll-to-deflect transition barrier. The transition barrier from the roll to the deflect mode with different head flexion is shown in Fig. 10C,D. At the average x (−13.6 mm) where the animal transitioned from the pitch to the roll mode, the maximal increase in the transition barrier with head flexion within [−25 deg, 65 deg] was 0.012 mJ (Fig. 10C, c) to deflect to the left and 0.008 mJ (Fig. 10D, d) to deflect to the right. The transition barrier only increased by a maximum of 12%, which required the head to hyperextend (head flexion βh=−25 deg), which was rarely observed in the experiment. This suggested that the head adjustment did not increase the transition barrier substantially to prevent the animal from yawing to deflect the beams. This rejected our hypothesis that the head adjustment facilitates the body staying within the gap.
Leg sprawl adjustments facilitate body rolling
To test hypothesis 2 that tucking in a hindleg reduces the pitch-to-roll transition barrier and facilitates rolling, we analyzed how adjusting leg sprawl changes the pitch-to-roll transition barrier. The transition barrier from pitch to roll mode with different total leg sprawl is shown in Fig. 10B. At x=−13.6 mm, where the animals transitioned from the pitch to roll mode, the transition barrier at 20 deg total leg sprawl was less than that at 160 deg total leg sprawl by 0.06 mJ (Fig. 10B, b), which is 6 times larger than the average kinetic energy fluctuation level. This indicates that tucking a hindleg in helped the animal substantially reduce the pitch-to-roll transition barrier when rolling. Together, these findings supported our hypothesis that leg sprawl adjustment facilitated the pitch-to-roll transition.
Curiously, at x=−20 mm, where the animals pitched against the beams (temporal average of x was −20±3 mm in the pitch+explore phase over all trials), the transition barrier at 160 deg total leg sprawl was larger than that at 20 deg total leg sprawl by 0.35 mJ, which was 35 times larger than the animal's average kinetic energy fluctuation (0.01 mJ). Because a larger potential energy barrier indicates higher stability, this suggests that further spreading out the hindlegs during the pitch+explore phase helped the animal stay pitched up against the beams more stably and resist rolling into the gap. We speculate that in this phase the larger leg spread here helped the animal's pitched-up body stay aligned to the gap rather than yaw and fall sideways under gravity.
As a first step to understand how animals actively control their physical interaction with complex 3D terrain to transition between locomotor modes, we quantified active adjustments by the discoid cockroach to make the pitch-to-roll transition while traversing beam obstacles. The major adjustments included body rotations (Fig. 6), head flexion (Fig. 7), abdomen flexion (Fig. 8) and differential hindleg use (Fig. 9). Because it was strenuous to traverse the stiff beams by pushing across (the pitch mode), the animal likely made these active adjustments to facilitate transitioning to the less strenuous roll mode. Below, we discuss the likely function of each adjustment and suggest future directions.
Role of head flexion
To find the function of active head flexion in both the explore+pitch and roll phases, we first hypothesized that by changing the overall body shape, it (1) lowered the pitch-to-roll transition barrier and (2) increased the roll-to-deflect transition barrier. However, we found that head flexion did not change the transition barrier substantially in both cases. Therefore, we rejected these two hypotheses (see Results, ‘Head flexion does not facilitate the pitch-to-roll transition’). We speculate that this is because the cockroach's head is small and relatively more spherical (thickness/length=0.66) compared with the thorax (thickness/length=0.30) and abdomen (thickness/length=0.21), so its orientation does not change overall body shape substantially, resulting in too small a change in the potential energy landscape.
We speculate that the animal flexed its head to sense obstacle properties in the explore+pitch phase. Groups of campaniform sensilla and sensory hairs embedded in the cockroach's pronotum can sense the magnitude, direction and position of the terrain reaction force (Delcomyn et al., 1996). The chordotonal organ in the animal's neck can detect the forces pushing against the head (Field and Matheson, 1998; Tuthill and Wilson, 2016). These could help the animal estimate the obstacle's physical properties (stiffness, surface friction coefficient, etc.) (Xuan et al., 2022 preprint) and guide its active adjustments to better traverse. We speculate that the occasional dynamically changing head flexion is a form of active tactile sensing (Mongeau et al., 2013; Prescott et al., 2011; Staudacher et al., 2005). We observed that the animal seemed to hyperextend the head upward in order to find the top end of the stiff beam obstacles (to initiate climbing) and flexed the head downward in order to find a gap to move into.
In addition, we speculate that the animal flexed its head in the land phase (after the center of mass had passed the beams) to help its forelegs reach the ground to help propel it forward, while its middle legs and hindlegs were still interacting with the beams and were likely less effective at generating propulsion within the narrow gap. This is similar to cockroaches flexing the head to help the forelegs reach the top surface when climbing a large step (Ritzmann et al., 2005).
Although head flexion is not driven by the same muscle group as abdomen flexion or hindleg movement (Sanderson and Jackson, 1912), it is possible that it can be indirectly triggered by the abdomen motion (e.g. via sensory feedback for coordination). Further analysis of the correlation between adjustments will test these possibilities.
Role of abdomen flexion
We speculate that the animal flexed its abdomen frequently in the roll and land phases to generate kinetic energy fluctuation to break resistive frictional and interlocking contact as it pushed through the beams when the body had rolled into the gap. Because the beam gap was narrow and barely larger than the animal body thickness (average body thickness not including legs was only 73% of gap width), the animal had to elevate its legs closer to the body to fit them within the gap. This made it difficult to generate thrust force from the legs. Meanwhile, the spines and other asperities on the thorax, abdomen and legs added resistance, similar to a cockroach crawling in a confined space (Jayaram and Full, 2016). This kinetic energy fluctuation from abdomen flexion helps the animal become unstuck and facilitates traversal (i.e. likely overcoming very small barriers on a very fine-grained potential energy landscape, if one considers the effects of these small features; see discussion in Othayoth et al., 2020).
Role of leg adjustments
We speculate that the animal spread its hindlegs further outward to stabilize the pitched-up body against the beams in the pitch+explore phase and tucked in the depressed hindleg (the left one during body rolling to the right) to destabilize it to roll in the roll phase. Geometrically, the stable support polygon of the animal was formed among contacts between its hindfeet and the ground and contacts between its head or thorax and the beams. In the explore+pitch phase, the animal spread its hindlegs out widely, with a large distance between the two hindfeet touching the ground, which increased the animal's roll stability (Fig. S3A). We speculate that this helped the animal's pitched-up body stay aligned to the gap rather than yaw and fall sideways under gravity. In the roll phase, as the animal tucked in its depressed hindleg, the support polygon shrank and the roll margin of stability reduced (Fig. S3B), and the roll stability reduced. These effects can be quantified by the potential energy landscape. The potential energy barrier from the pitch to the roll basin measures the difficulty of the transition. In the explore+pitch phase, further leg spreading increased the transition barrier, which helped the animal stay pitching up against the beams. During the pitch-to-roll transition, tucking in a leg reduced the transition barrier and made rolling easier. We also observed that the animal spread out its elevated hindleg (the right one during body rolling to the right) in the land phase. We speculated that this was to better engage with the ground to propel itself forward when its body was still in the gap.
Aside from leg sprawl, the differential leg uses also played an important role. We speculate that in the beginning of the roll phase the animal depressed one hindleg and elevated the other while keeping both feet on the ground to generate a roll torque. In the land phase, it elevated both hindlegs closer to the body after the body has rolled into the gap, likely to reduce the resistance on the legs from the beams while pushing through.
Role of body flexibility
Our results further suggest that the flexibility from multiple body parts and articulated leg joints of the entire animal also reduces the efforts of locomotor transition and traversal (Jayaram and Full, 2016; Ritzmann et al., 2005). The animal's body is more flexible and compliant than our rigid body model. This will likely result in a smaller beam flexion than estimated by the model and reduce the transition barrier. The soft, segmented exoskeleton structure also likely reduced interlocking and frictional resistance and facilitated traversal.
Likely involvement of sensory feedback control
Studies on insects negotiating large obstacles have revealed that the changes in kinematics are often modulated by sensory inputs. For example, when climbing large stairs, stick insects switch from using long to short steps when they have sensed a lack of substrate engagement (Theunissen and Dürr, 2013); when climbing a large step, cockroaches flex the head to help the forelegs reach the top step surface when its head has sensed that it has risen above the step (Ritzmann et al., 2005). During traversal of cluttered beams in our study, the cockroach's active adjustment to make the pitch-to-roll transition, which was absent when running on a flat ground, was almost certainly driven by sensory input of its environment interaction. During traversal, it took the animal an average time of 1.3±0.7 s to explore and pitch up against the beams before rolling occurred. This is well above the ∼100 ms that cockroaches need to complete a feedback control loop [6–40 ms for the sensory delay (Ritzmann et al., 2012) and 47 ms for neuromuscular delay (Sponberg and Full, 2008)]. We posit that the animal sensed the terrain and used this information to determine that pushing across was too strenuous and to guide transitioning to the less strenuous roll mode. We have recently explored the feasibility of this strategy in a simple simulated robotic physical model (Xuan et al., 2022 preprint).
Future work should test the speculated mechanisms of how each kind of adjustment facilitates the observed locomotor transition. (1) To understand whether and how flexing the head facilitates terrain sensing and how to take advantage of this, we can build a robot with head flexion and force sensing (Wang et al., 2021) and study it systematically with and without feedback control using the sensed forces. (2) To understand whether and how abdomen flexion helps the animal become unstuck, we can build a robot with a flexing abdomen (or tail; Mi et al., 2022) to test whether the flexing of the massive lateral part helps in beam traversal. (3) To test whether active leg adjustment indeed generates a roll torque, we can add highly sensitive yet low-cost force sensors (Li et al., 2019a; Wöhrl et al., 2017) to the ground in front of the beams to measure the ground reaction force on each foot.
To further understand the neural mechanisms involved in such cluttered large obstacle traversal, we can measure the animal's sensory neural signals (Mongeau et al., 2015; Ritzmann et al., 2012) and muscle activity (i.e. electromyogram) (Sponberg and Full, 2008; Watson et al., 2002) and alter the motor activation signal to change active adjustments and test their effect on the body dynamics (Sponberg et al., 2011a,b). The first challenge is to identify what sensors are involved in these cluttered adjustments for large obstacle traversal. Like other insects, cockroaches should have many sensors that can obtain information about the terrain (Delcomyn et al., 1996; Harley et al., 2009; Tuthill and Azim, 2018; Tuthill and Wilson, 2016), including: (1) visual observation of the geometry of the terrain; (2) use of exteroceptors such as tactile hairs to sense the position of an object; (3) use of proprioceptors to sense relative position/velocity between joints to infer object position; and (4) use of campaniform sensilla to detect force and torque exerted on exoskeleton and joints. A first step to identify the relevant sensing modalities is to disable some of these sensing sources, such as blinding the eyes (Spirito and Mushrush, 1979) and disabling the campaniform sensilla (Pearson and Iles, 1973), and observe changes in locomotor behavior and performance. Based on animal observations, computational modeling of neural control (such as in Schilling and Cruse, 2020) may be fruitful for understanding feedback principles governing body and appendage adjustments to traverse cluttered large obstacles. In addition, it may be interesting to study whether animals perform active sensing (Krakauer et al., 2017; Mongeau et al., 2013; Moss et al., 2006; Nelson and MacIver, 2006; Okada et al., 2002; Schütz and Dürr, 2011; Stamper et al., 2012) in the less considered modality of contact force sensing.
Our case study illustrates how to use fine-grained potential energy landscape modeling to understand the locomotor–terrain interaction that involves active adjustments of more body and appendage degrees of freedom, which may lead to the discovery of attractive basins that result in distinct nuanced locomotor modes (see discussion in Othayoth et al., 2020). Given these advancements, the potential energy landscape modeling still does not fully describe system dynamics, as it only addresses conservative forces of the system that can be expressed as gradients of the potential energy landscape. Future work should systematically measure and model non-conservative and random forces and add them to make the modeling approach predictive. These measurements and a predictive potential energy landscape theory capturing dynamics will reveal how the animal generates propulsive forces and torques to overcome resistive ones in order to destabilize itself from undesired modes (basins) of attraction and steer into the desired modes (basins) and how this process can be guided by terrain force sensing (Xuan et al., 2022 preprint).
We thank Yuanfeng Han and Qiyuan Fu for help with imaging setup, Yuanfeng Han and Qihan Xuan for discussion, and Xiao Yu for help with animal care and manually correcting the marker tracking.
Conceptualization: C.L.; Methodology: Y.W., R.O., C.L.; Software: Y.W., R.O.; Validation: Y.W., C.L.; Formal analysis: Y.W.; Investigation: Y.W.; Resources: Y.W., R.O., C.L.; Data curation: Y.W.; Writing - original draft: Y.W.; Writing - review & editing: Y.W., R.O., C.L.; Visualization: Y.W.; Supervision: C.L.; Project administration: C.L.; Funding acquisition: C.L.
This research was funded by an Arnold & Mabel Beckman Foundation Beckman Young Investigator Award, a Burroughs Wellcome Fund Career Award at the Scientific Interface, and Johns Hopkins University Whiting School of Engineering start-up funds to C.L. Y.W. was partially supported by funds for an undergraduate research internship from the Department of Mechanical Engineering in Tsinghua University. Open Access funding provided by Johns Hopkins University. Deposited in PMC for immediate release.
MATLAB codes and data files are available from GitHub: https://github.com/TerradynamicsLab/cockroach_adjust.git.
The authors declare no competing or financial interests.