Kinematic Responses to Changes in Walking Orientation and Gravitational Load in Drosophila melanogaster

Walking behavior is context-dependent, resulting from the integration of internal and external influences by specialized motor and pre-motor centers. Neuronal programs must be sufficiently flexible to the locomotive challenges inherent in different environments. Although insect studies have contributed substantially to the identification of the components and rules that determine locomotion, we still lack an understanding of how multi-jointed walking insects respond to changes in walking orientation and direction and strength of the gravitational force. In order to answer these questions we measured with high temporal and spatial resolution the kinematic properties of untethered Drosophila during inverted and vertical walking. In addition, we also examined the kinematic responses to increases in gravitational load. We find that animals are capable of shifting their step, spatial and inter-leg parameters in order to cope with more challenging walking conditions. For example, flies walking in an inverted orientation decreased the duration of their swing phase leading to increased contact with the substrate and, as a result, greater stability. We also find that when flies carry additional weight, thereby increasing their gravitational load, some changes in step parameters vary over time, providing evidence for adaptation. However, above a threshold that is between 1 and 2 times their body weight flies display locomotion parameters that suggest they are no longer capable of walking in a coordinated manner. Finally, we find that functional chordotonal organs are required for flies to cope with additional weight, as animals deficient in these proprioceptors display increased sensitivity to load bearing as well as other locomotive defects.


Introduction
Multi-jointed organisms move through their environment with a remarkable ability to adapt to internal physiological conditions, as well as to variations in terrain and other external forces such as wind or gravity. Such capabilities allow for locomotion that is fast, stable and energy efficient. Two features of animal nervous systems are critical for such remarkable adaptability. First, animals bear a large set of sensory structures specialized for sensing segment status and body position [1,2]. For example, subsets of neurons in the second antennal segment of Drosophila are responsible for gravity perception. [3,4]. Second, a complex neuronal architecture is able to receive and integrate internal and external sensory stimuli and produce an appropriately fine-tuned motor response. Some of these responses are reflex-based, comprising simple circuits such as the giant fiber system of insects that is responsible for visually induced escape behavior [5][6][7][8].
Other motor responses are instead computed by higher decision centers in the brain. For example, the protocerebral bridge, a central complex neuropil in the central brain, is required for the motor output used for crossing gaps in the terrain [9,10].
Critical to locomotive coordination is the animal's ability to compute both the direction and strength of the gravitational force in order to maintain posture and anchoring to the walking substrate [11]. This allows for maneuverability through a wide range of environments, both in air and on land. Arthropods and insects in particular experience radical variations in their environment, easily moving across challenging terrains such as ceilings and vertical structures. This resourcefulness is made possible by the use of a large number of legs and the presence of sophisticated surface attachment systems, which include claws and adhesive pads [12,13]. Moreover, walking animals can sustain large variations in their body load, which becomes increasingly important under different physiological conditions such as obesity, or while carrying heavy objects [14]. For example, rhinoceros beetles can carry more than 30 times their body mass with notable metabolic economy [15]. During the step cycle, each leg supports load variation, with maximum support occurring halfway through the stance phase [16,17].
In order to deal with variations in body load and orientation, vertebrates and invertebrates resolve gravity information through direct and indirect approaches. Mammals and insects can detect linear accelerations using the inner ear and the antennal Johnston's organ, respectively [18,19]. Particular structures in the mechanosensory system can measure joint angles and strains, providing additional information about the direction and strength of the gravitational force. In mammals these structures include muscle spindles and Golgi tendon organs [20]. In insects, these include hair plates, chordotonal organs and campanifom sensilla [1] -sensory organs specialized to meet a different set of mechanical challenges from those faced by mammals [21]. A large body of work has focused on the role of campanifom sensilla in transducing leg load during standing and walking conditions [22][23][24][25]. These are dome-like structures present in legs that can be isolated or grouped. Their ciliated dendrites are mechanically coupled with the cuticle, allowing for detection of mechanical stress in the exoskeleton [1]. Although there is some variability among insect species in the position of the campaniform sensilla, they are generally placed and oriented strategically close to leg joints, making them particularly sensitive to force orientation or phase of the step cycle [26]. For example, in the cockroach tibia, proximal campaniform sensilla respond to force increases during load bearing, whereas distal receptors fire to decreasing force as legs unload [24]. These afferents project into the ventral nerve cord where they can synapse with motor neurons as well as spiking and nonspiking interneurons [27,28]. Direct synapse onto motor neurons can work as a negative feedback system in order to lessen the mechanical stress that caused the initial sensilla to fire [29]. This can be done by exciting and simultaneously inhibiting a set of antagonistic leg muscles [30]. Moreover, campaniform sensilla can also influence motor activity by targeting Central Pattern Generators (CPGs) [30,31].
Motor adaptability is reflected in the timing and intensity of muscle contractions in response to terrain conditions, body load and orientation relative to gravity [32]. Although experiments have been designed to challenge animals during walking, very few studies have focused on the kinematic responses to changes in walking conditions. One reason for this is the difficulty in extracting large kinematic data sets from freely moving animals. Instead, a large body of work has focused on kinetics (i.e. force distribution, for example [33,34]) or electrophysiological responses to body load (for example [23,25,35] reviewed in [32]). Due to its small size, the fruit fly remains technically challenging for physiology and force distribution (kinetics) studies compared to the stick insect, cockroach or locust. Nevertheless, an increasingly sophisticated genetic toolkit makes this a valuable model system to identify and manipulate circuits involved in motor control with increased cellular resolution [36]. In addition, the fruit fly displays an extremely reliable, stereotyped and stable locomotor behavior that is dependent on walking speed [37][38][39].
Machine vision techniques that track untethered animals can quantify a large number of locomotor parameters and provide a detailed behavioral readout of wild type and genetically manipulated animals [39][40][41]. Here, we took advantage of one of these methods, which combines a high-speed optical touch sensor with a tracking software package that allows the extraction of a large number of kinematic parameters with high spatial and temporal resolution [39]. Using this method, we asked what kinematic parameters change as a result of different walking orientations and increased gravitational load. We find that although many of the rules governing walking behavior are unaffected, changes in orientation and load alter the walking program to promote gait stability at the expense of walking speed. Moreover, we identify a threshold for carrying additional weight beyond which flies are unable to manage. Importantly, we also find that some responses to increased weight vary over time, suggesting that distinct neural control mechanisms mediate short and long term responses.

Kinematic responses to walking orientation
In order to quantify locomotion in different orientations we used the FlyWalker system [39], reorienting the detection apparatus to allow footprint detection while animals walked upside down (inverted) or vertically (ascending or descending; Figure 1A). Animals were allowed to walk freely and the walking kinematics were quantified as previously described [39]. Briefly, this method is based on the reflection of light within an optical glass through an optical effect termed Total Internal Reflection (TIR). Leg contacts disrupt this effect causing frustrated TIR (fTIR), which generates scattered light that can be detected by a high-speed camera. Using custom-made software specifically developed for this assay, we were able to track, quantify and compare the walking pattern between different conditions. All kinematic definitions are described in Table S1.
Step related parameters. Animals walking in non-upright conditions displayed significantly slower walking speeds and narrower range of values for this parameter compared to upright controls, suggesting tighter motor control ( Figure 1B). We next asked if step parameters were solely dependent on the walking speed as previously described [37][38][39], or if in addition orientation might influence walking as previously observed in the locust or cockroach [42,43]. We found that not only did step parameters change under non-upright conditions but that the degree of modulation was dependent on the walking orientation. Swing speeds were significantly increased in animals walking in the inverted orientation, while in vertically walking animals (ascending or descending) this parameter remained unchanged ( Figure 1C and S1A). Interestingly, in both ascending and descending conditions, animals displayed a proportional increase in step length and swing duration ( Figure 1D, E and S1B, C), explaining the unchanged swing speed. In contrast, inverted animals not only displayed a slight increase in step length but also had shorter swing phases, thus explaining the increased swing speed ( Figure 1D, E and S1B, C). This result is similar to that observed in cockroaches, which display shorter swing phases while walking inverted and supported by a fine mesh [43]. In contrast to swing parameters, stance phase parameters displayed the same speed-dependent response in all tested conditions ( Figure 1F and S1D), suggesting that adaptability to walking orientation targets mostly the swing phase of the step cycle. Because of a shorter swing phase ( Figure 1E and S1C), the duty factor, which measures the fraction of the step cycle dedicated to the stance phase, was significantly increased in inverted animals, indicating, on average, an increase in contact with the substrate. In contrast, vertically walking animals had minimal or no change in this parameter ( Figure 1G and S1F). Overall, our results indicate that flies have the capacity to adapt their step parameters in accordance with their walking orientation by shifting their stride length and protraction duration.
Spatial parameters. FlyWalker also quantifies the footprint positions relative to the center of the body. The footprint alignment parameter, also called follow-the-leader, measures the propensity for all three ipsilateral legs to be placed in a similar position relative to the walking vector [39,44,45]. Since we previously observed that this parameter distributes in a non-linear fashion for upright animals [39], we analyzed the data for two speed groups, slow (,20 mm/s) and medium speeds (20-34 mm/ s) (in our experiments, non-upright flies did not walk faster than 34 mm/s; Figure 2A and S2A). Animals ascending a vertical plane showed an increased tendency to align their footprints, perhaps as an effort to ensure secure anchoring. In inverted or descending animals, no significant difference was detected, possibly as a consequence of other gait features that prevent a change in footprint alignment.
We next measured the stance linearity index, which quantifies the steadiness of tarsal contacts relative to the body center while the fly moves forward [39]. Interestingly, animals walking in nonupright conditions exhibited smaller stance linearity values ( Figures 2B and S2B), indicating steadier stance phases in the face of more challenging conditions. In addition, no significant changes were observed in footprint clustering, both during footfall (anterior extreme position; AEP) or swing onset (posterior extreme position; PEP) [46] (Figures 2C,D and S3). Moreover, descending animals showed a consistent posterior displacement of AEP and PEP positioning, possibly as a consequence of gravitational pull on the fly's body ( Figure S4). Together, our results indicate that the fruit fly engages in a more controlled stance phase (e.g. lower stance linearity values) during non-upright conditions, although . Schematic of the recording setup. The fTIR apparatus was oriented in order to allow the flies to walk freely inside a walking chamber either horizontally (upright or inverted) or vertically (ascending or descending). A high-speed camera recorded body and tarsal contacts on the optical glass, see [39] for details. Fly schematic adapted from [73]. (B-G) Boxplots represent the median as the middle line, with the lower and upper edges of the boxes representing the 25% and 75% quartiles, respectively; the whiskers represent the range of the full data set, excluding outliers. Circles indicate outliers. Grey represents upright controls (n = 71, from [39]), green for inverted (n = 28), purple for ascending (n = 28) and brown for descending (n = 23). For C-G data was residual normalized and expressed as the difference to the upright control. Statistical analysis with one-way ANOVA followed by Tukey's post hoc test (for normal distributions in panels B, C and E) or Dunn's post hoc test (for non-normal distribution in panels D, F and G), * P,0.05; ** P,0.01; *** P,0.001. Statistically significant increases or decreases are indicated in red and blue, respectively. (B) Non-upright animals display significantly reduced walking speed. (C) Swing speed was significantly increased in inverted walking animals. (D) All non-upright animals display increased step length. (E) Swing duration is increased only in ascending and descending animals while inverted animals show a small decrease. (F) Stance duration remains unchanged for all conditions. (G) Duty factor strongly increases in inverted walking animals while it is minimally reduced in ascending animals. doi:10.1371/journal.pone.0109204.g001 footprint placement precision (AEP and PEP clustering) remains unaffected. These results differ from the stick insect that displays strikingly different footprint positions depending on the walking orientation [46].
Coordination parameters. Interleg coordination is critical for sustaining speed, stability and energy efficiency during walking [38,39,[47][48][49]. Drosophila use tripod coordination as the preferred gait, particularly at higher speeds [37][38][39]. Alternatively, at very low speeds, tetrapod and wave (or metachronal) patterns can also be observed where four or five legs are in stance position, respectively [38,39,50]. We reasoned that flies might shift their gait under different walking orientations. To test this we calculated the fraction of frames in which leg contact was associated with a particular gait, also known as gait indexes [39] ( Figure 3A-D). We found that flies walking in an inverted orientation significantly reduced their usage of the tripod gait while increasing the wave configuration ( Figure 3A, C). Further, by visually inspecting the gait patterns of inverted walking animals we noticed an increased occurrence of the wave gait, where only a single leg swings at a given time [50], particularly at slow speeds (data not shown). Ascending flies also increased the use of tetrapod configurations while reducing the amount of the wave configuration ( Figure 3B, C). These differences were particularly striking at slower speeds, when walking is more susceptible to neuronal control by higher control centers [51] ( Figure S5). On the other hand, no changes were observed in the frequency of non-canonical configurations ( Figure 3D).
One possibility to explain a reduced use of tripod configuration in inverted flies would be that animals under these conditions increase the amount of time separating two consecutive tripod stances. In order to test this possibility we analyzed two new parameters termed inter-tripod time that measures the time Figure 2. Spatial parameters. Non-upright walking animals display more aligned footprints and less jitter during stance phases, while clustering remains unchanged. (A-D) Boxplots represent the median as the middle line, with the lower and upper edges of the boxes representing the 25% and 75% quartiles, respectively; the whiskers represent the range of the full data set, excluding outliers. Circles indicate outliers. Statistical analysis with one-way ANOVA followed by Tukey's post hoc test, * P,0.05; ** P,0.01; *** P,0.001. Statistically significant decreases are indicated in blue. In B, C and D data was residual normalized and expressed as the difference to the upright control.  duration values were on average ,4 ms longer for ascending or descending flies compared to upright flies ( Figure 3G and Figure  S6B), consistent with an increase in step length under these conditions ( Figure 1D). Phase plots to examine the coordination between left-right or adjacent ipsilateral leg pairs were generated but did not reveal anything beyond these conclusions (data not shown).
Overall, our data indicate that Drosophila can readily modify its walking behavior according to orientation in order to sustain stability and contact to the substrate (major kinematic shifts are summarized in Figure 3H). These changes target the step cycle leading to faster leg swings or longer strides while walking upside down or vertically, respectively. In addition, interleg coordination properties are also adjusted under different walking orientation in order to maximize contact with the substrate.

Kinematic responses to increased body load
In order to study the kinematic effects of body load on fruit flies we glued 1/320 spherical ball bearings with different densities to the notum of wild type female flies ( Figure 4A and Video S1). Weights corresponded to 0.66, 1.14 and 2.02 times an average body mass (female flies weighed 1.1460.05 mg, n = 39). Animals with only glue on their notums, used to adhere the ball bearings, were used as controls. In addition, to study the long-term effects of load bearing we analyzed walking by these animals 2 hours, 24 hours and one week after attachment.
Step related parameters. We observed that weights affected locomotion and kinematic parameters, particularly above a weight threshold. Furthermore, some parameters changed over time. For example, flies bearing weights showed a decrease in speed 2 hours after the weight was added, not walking faster than 30 mm/s ( Figure 4B). Moreover, flies bearing 0.666 and 1.146 weights slowed initially but eventually returned to control speeds. Flies bearing the heaviest 2.026 weights, however, did not recover, suggesting the existence of a threshold for weight tolerance that exists between 1.146 and 2.026 of body mass.
Some step parameters were also affected by weight bearing over time. In general, swing speeds were increased ( Figure 4C). However, over time, this increase was only maintained for the heaviest loads; flies carrying lighter and intermediate weights returned to control values at later time points.
Step length remained relatively constant ( Figure 4D), except for flies bearing the heaviest weights for which it was strongly reduced. A similar response was observed for swing duration where lighter and intermediate weights remained unaffected while animals carrying heavier loads displayed a strong reduction in swing phase ( Figure 4E). Animals under these conditions displayed on average a protraction that was approximately 10 ms shorter compared to control animals ( Figure 4E), thus explaining the observed increase in swing speed ( Figure 4C). Consistently, animals carrying the heaviest loads showed an increased duty factor at all time points ( Figure S7B), possibly to achieve greater stability. Interestingly, the persistent decrease in swing duration for 2.026 weight bearing flies was coupled with an increase in stance duration ( Figure 4F), allowing these flies to maintain a relatively constant step period ( Figure S7B).
Together, these data show that fruit flies adapt their step parameters in response to increased weight. For animals bearing weights of 1.146 or below, responses are typically transient; flies can eventually adapt to carrying these loads and return to wild type step parameters. In contrast, flies bearing a weight of 2.026 display stronger and long-term effects, generally target swing duration by increasing swing speed. Spatial parameters. Spatial parameters also changed in response to additional weight ( Figure 5). For these measurements we plotted the AEPs (beginning of stance phase) and PEPs (beginning of swing phase) for each leg in relation to the center of the body ( Figure 5A-C). We observed a significant displacement of these parameters for flies bearing the heaviest weight at all three time points. Under these conditions, tarsal contacts were displaced further from the body center. In addition, foreleg and hindleg contacts were shifted anteriorly and posteriorly, respectively. Despite these changes, both AEP and PEP shifted similarly, resulting in an unchanged step length ( Figure 4D). For lighter and intermediate weights (0.666 and 1.146) only small changes were observed in footprint positioning 2 hours after the addition of the weights ( Figure 5A). However, 24 hours after addition of the intermediate weight (1.146), footprint positions shifted to those observed immediately in response to heavier weights ( Figure 5B). Thus, adjustments to intermediate weights generally occurred by 24 hours, if not sooner. The spreading of tarsal contacts ensures that the center of mass will remain inside the support area, thus increasing static stability [48]. Footprint clustering also changed in response to increased load ( Figure 5D-E). Flies bearing the heaviest weights showed an increase in this parameter, while minimal changes were observed for animals carrying light and intermediate weights, suggesting less stable locomotion under heavier weight-bearing conditions.
Together, these data show that animals change their spatial properties in order to accommodate load increases. The dispersion of tarsal contacts further away from the body center can additionally increase the area of tripod support and thus promote static stability while carrying heavier weights [48].
Stance linearity was also examined under different load conditions. Two hours after load attachment, flies bearing 1.146 and to a lesser extent those bearing 0.666 exhibited a straighter path (smaller stance linearity values; Figure 6A), similar to animals walking in non-upright orientations ( Figure 2B). However, this effect was no longer visible after one week. In addition, heavier loads caused a slight increase in stance linearity, further supporting the idea that there exists a tolerance threshold for weight that is between 1.146 and 2.026 the mass of a fly. Footprint alignment values at intermediate speeds (20-34 mm/s) displayed a similar trend: flies carrying intermediate loads exhibited more aligned footsteps compared to flies bearing the heaviest weight ( Figure  S7C). Additionally, while there was no significant difference observed at 2 hours between flies bearing 2.026 weights and controls, possibly due to the increased variability in the 2 hour controls, a difference was observed at the later time points, when control flies were able to move with increased precision (smaller footprint alignment values) but flies bearing the heaviest weights were not. This trend was also observed in the 1.146 bearing flies at the later time points. These results reinforce a time-dependent kinematic response to weight bearing as well as a different set of responses for flies carrying less than 1.146 compared to flies bearing 2.026 or higher.

Coordination parameters
To assess whether gaits change upon increased load, we examined the relative frequencies of several step configurations ( Figure 6B-D and Figure S7D, E). Quantification of gait patterns showed that animals bearing 1.146 and below did not show any significant alterations in gait conformations. Flies bearing 2.026, however, displayed significant changes in gait conformations. These flies displayed a strong decrease in the use of the tripod configuration ( Figure 6B), and to a lesser extent, tetrapod configurations ( Figure S7D). Conversely, we observed a slight increase in the frequency of wave configurations ( Figure S7E) and a significant increase in the use of non-canonical configurations ( Figure 6C), which includes all possible configurations not covered by tripod, tetrapod and wave patterns. Among these noncanonical configurations, we quantified the fraction of time flies spend with all six legs on the ground while still moving forward, which we refer to as the full stance index ( Figure 6D). We found that flies bearing 2.026 of body mass spent a significantly increased amount of time in this configuration ( Figure 6D). By one week, however, these flies decreased their use of this configuration and returned to control values. Interestingly, this increase in noncanonical gait configurations was not due to an increase in intertripod transition time: these values remained relatively constant regardless of the amount of weight being carried and regardless of the amount of time since the weight was added ( Figure S7F). Instead, these results suggest that in response to heavier loads, transitions between tripod stances preferentially occur with all six legs on the ground. These results once again highlight a different response to carrying weights 1.146 or below versus 2.026 or above, with minimal effects on gait properties for the former.

Response to increased load when sensory feedback is compromised
Although campaniform sensilla have been extensively described as the main transducers of load during standing and walking conditions [22][23][24][25], other proprioceptors could also mediate a response to weight bearing [32]. Here, we tested the role of the femoral chordotonal organ in mediating the kinematic responses to weight bearing. Chordotonal organs are internal stretch receptors composed of multiple functional units termed scolopidia that measure the position and movements of leg joints [1,52,53]. We took advantage of a null allele of the nanchung (nan) gene, which encodes a cation channel subunit responsive to osmotic and mechanical responses and is expressed exclusively in the sensory cilia of chordotonal neurons in the legs and antenna [3,54]. nan mutants disrupt the function of leg chordotonal organs while leaving other leg sensory organs unaffected [39,54]. We quantified the kinematic effects of carrying loads of 1.14 times body weight in this sensitized genetic background, with measurements done 2 and 24 hours after adding the weight (Figure 7 and S8). Previously we found that loss of chordotonal organ function using the same nan allele displayed significant gait and foot placement defects [39]. Although we still detected slower walking speeds for these mutants ( Figure S8A), control and nan mutant flies exhibited similar walking parameters in the absence of additional load (data not shown), which may be a consequence of the presence of glue on the notums of control flies.
In flies bearing additional weight, nan mutants significantly increased stance duration, even 24 hours after the weights were added ( Figure 7A). However, no change was observed in swing duration ( Figure S8B), resulting in an increased step period ( Figure 7B). This result contrasted with that observed in wild type animals, where flies bearing the heaviest weights were nevertheless able to maintain a normal step period due to both an increase in stance duration and a decrease in swing duration ( Figure 4E, F). nan flies were unable to make this compensatory decrease in swing duration. Moreover, step length and swing speed were no different between control and nan mutants bearing intermediate weights ( Figure S8C, D). Animals carrying intermediate weights displayed less jitter in their stance phases 2 hours after the loading procedure ( Figure 6A). However, this effect was not visible in a nan mutant background ( Figure 7C), suggesting that this sensory organ can influence motor output allowing stabilization during weight bearing, consistent with the ability of these afferents to synapse directly onto motor neurons [55,56]. Interleg coordination was also affected in the nan mutant leading to a significant reduction of tripod conformations for weight bearing flies at both time points ( Figure 7D). While tetrapod configurations seem to be unchanged under these conditions ( Figure S8E), there is a compensatory increase in wave and non-canonical configurations ( Figure S8F and 7E). While the increase in wave configuration observed in nan mutants during weight bearing is only present after 2 hours ( Figure S8F), the increase in non-canonical configuration is present both after 2 and 24 hours of weight bearing ( Figure 7E). These effects mirror the responses observed when wild type animals carried heavier loads (e.g. compare Figures 6C with 7E).
Moreover, nan also leads to a significant increase in the transition time from one tripod configuration to the next one ( Figure 7F), although this effect is only observed 2 hours after the weights are added. Overall, our results suggest that sensory input, in particular mediated by the chordotonal organ, is used to modulate kinematic parameters in response to increases in gravitational load.

Discussion
Animals have the remarkable ability to adapt their locomotor behavior to changes in body weight, load and walking orientation. In disorders where motor ability is impaired like Parkinson's disease, a decreased sensitivity of extensor load reflex mechanisms is observed when compared to healthy individuals. This contributes to the impaired gait in elderly subjects as well as in Parkinsonian patients [57]. Here we determined the kinematic responses upon change in the direction and strength of the gravitational force in freely walking fruit flies. Previous studies have highlighted the ability of the stick insect, cockroach, ant and locust to detect and adapt to changes in walking orientation [42,43,46,[58][59][60][61], focusing on a limited set of kinematic parameters and mostly on ground force reaction and physiological features. These studies have shown an altered recruitment of muscle groups depending on the particular challenges [42,43], which likely result in distinct kinematic features. In contrast to these model systems, which rely on claws to support inverted walking, fruit flies are equipped with adhesive pads that allow them to easily change their walking orientation under natural and laboratory conditions [12,13]. These distinct strategies might also contribute to differences in locomotor behavior.
Our data reveal that fruit flies walking under non-upright conditions display differences in their gait properties, suggesting that these responses are the consequence of orientation-specific neuronal programs suited to specific walking conditions. Interestingly, these responses do not affect the duration of the power stroke (the stance phase; Figure 1F) but rather target the stride (step length; Figure 1D) and the duration of the swing phase ( Figure 1E). Moreover, in inverted walking animals this shift in step length and swing duration lead to a significant increase in swing speed ( Figure 1C), which, as pointed out by Larsen et al., may reflect the animal's choice to maximize leg contact with the substrate in order to minimize instability [43]. In accordance with a more controlled approach for locomotion under non-upright conditions, we observed that under these situations, stance phases show less wobble (lower stance linearity values) compared to flies walking in an upright position ( Figure 2B). This effect could be the consequence of a more controlled stance phase in which larger or more motor units become recruited, leading to muscular cocontraction of antagonistic muscles. As has been observed in the locust, this promotes joint stiffness in order to sustain gait stability and a constant distance from the body to the substrate [42]. However, recruitment of additional motor units would be expected to result in a more consistent placement and removal of tarsal contacts during the step cycle, but no difference was observed in footprint clustering either for AEP or PEP between upright and non-upright conditions in our experiments (Figure 2C, D).
We were also able to observe changes in interleg coordination in response to changes in walking orientation (Figure 3). Modulation of interleg coordination is used to sustain speed, stability and energy efficiency [38,39,[47][48][49]. Most noticeably, in our experiments inverted-walking animals displayed a shift from anchoring on three legs (the tripod gait) to five legs (typical of wave gait). Similarly, in the stick insect, the canonical tripod and tetrapod configurations were present in different fractions compared to ''irregular'' gaits whenever the animals moved across inclined substrates [61]. Nevertheless, the tripod gait was still preferred in all conditions, particularly at higher speeds, but with one important difference: the time taken to transition from one tripod configuration to the next was significantly increased (Figure 3E, F). We suggest that changes in interleg configurations allow more time for gait transitions, thus minimizing the chances of contact loss with the substrate. These changes in step strategies in non-upright conditions are done at the expense of speed and possibly energy consumption, partially explaining the reduced and more restricted distribution of walking speeds ( Figure 1B).
We also examined the kinematic effects to long-term increases of in gravitational load (Figures 4-7). Although the weight tolerance displayed by Drosophila is much lower than that displayed by rhinoceros beetles, which can carry more than 30 times their body mass [15], it is still greater than humans. For example, an average soldier of 80 kg can carry up to 55 kg in load (,0.7x body mass), causing extreme strain and affecting gait and performance [62]. Our experiments tried to address three questions. First, what are the kinematic responses to an increase in gravitational load? Second, how do these responses change over time? And third, are kinematic responses proportional to load increase or is the response non-linear, reaching a limit of tolerance? Our experiments clearly show that fruit flies can tolerate a considerable range of loads with minimal kinematic consequences. Moreover, some kinematic adjustments change over time suggesting that flies have the capacity to adapt to carrying additional weight.
Importantly, we find that for a variety of kinematic parameters, flies bearing 1.146 or below responded differently from flies bearing 2.026. For example, when carrying 1.146 their body weight, flies showed a decrease in speed with gradual recovery over time, strongly suggesting that flies can physically deal with such a load ( Figure 4B). However, when challenged with heavier loads such a recovery was not observed. In fact, when carrying 2.026 their weight, most kinematic parameters differed significantly from the control group at all time points. Values obtained for average speed ( Figure 4B), footprint clustering ( Figure 5D, E) and stance linearity index ( Figure 6A) demonstrate that somewhere between 1.14 and 2.02 their body weight, there exists a threshold above which flies are much less able to walk in a coordinated manner. Beyond this weight threshold, physical constraints prevent the fly's neuro-muscular system to function properly. Similar threshold-dependent kinematic and physiological effects have been seen in human weight lifting, where increases in spinal load are observed only when boxes above 20 kilograms are lifted [63].
Our results also highlight some of the ways in which flies promote stability while carrying weights (major kinematic shifts are summarized in Figure 6E). These include an increase in swing speed and a higher duty factor ( Figures 4C and S7A) which, interestingly, were also observed in flies walking upside-down, suggesting that these may be commonly used solutions to deal with a variety of challenging situations. Moreover, weight bearing also promoted tarsal contacts to be positioned further away from the body ( Figure 5A-C) thus leading to an increased area of support and static stability [48]. Animals carrying extra weight also shifted their interleg coordination parameters such that during tripod transition periods all legs were often in contact with the substrate.
In response to carrying 2.026 their body weight, some kinematic parameters, including average speed ( Figure 4B); swing speed ( Figure 4C) and footprint positioning ( Figure 5A-C), remained different from those of control animals, even after one week. This trend could be the result of physical fatigue. Interestingly, it was not observed in animals carrying the lighter and intermediate loads (0.666 and 1.146), which could sustain their walking speed even after one week of load bearing ( Figure 4B). However, we observed a decrease in the full stance index after one week for flies bearing the heaviest weight. The fact that these flies showed a reduction in full stance phase suggests that they were eventually able to at least partially adapt to the heavy load. In sum, our observations suggest that these long-term effects are the result of an adaptive process that is less robust for flies carrying the heaviest of weights. Motor neurons and CPGs exhibit neuronal plasticity in order to cope with new challenges. Such an adaptive process may be analogous to spinal cord injury models, where recovery has been suggested to depend on locomotor training and CPG plasticity [64,65].
Our data also suggest a role for the leg chordotonal organ as a sensor for gravitational load (Figure 7 and S8). In flies with this proprioceptor impaired, we observed an increased sensitivity to lighter loads and an inability to cope with these loads. In addition, nanchung mutant flies did not survive long-term exposure to intermediate weights, further supporting the importance of proprioception in weight bearing (data not shown). The leg chordotonal organs are highly sensitive to angle variations in the femur-tibia and tibia-tarsus joints caused by increases in gravitational load which feedback to preserve posture, thus indirectly reporting gravitation load variation. Similarly to the campaniform sensilla, the femoral chordotonal organ can also target both motor neurons and spiking and non-spiking interneurons [55,56], indicating this proprioceptor can promote reflex responses upon weight bearing. Work in the stick insect has also shown that the campaniform sensilla can modify the reflex pathway mediated by the femoral chordotonal organ, suggesting that these two organs act cooperatively [66]. Thus, these data suggest the chordotonal organ can assist the campaniform sensilla to resolve weight detection. It is also plausible that the femoral chordotonal organ directly acts as a sensor of body load. Consistent with this idea, the dendrites of the femoral chordotonal organ are attached to a connective tissue ligament that inserts into a cuticular apodeme in the proximal tibia [55,67], detecting forces in the femoral-tibia joint and making this organ mechanically competent to detect strains caused by load variations [55,56,66]. Other insect proprioceptors have been suggested to mediate responses to weight bearing such as multipolar muscle tension receptors present in the cockroach, stick insect and locust [67][68][69]. However, these structures have not been identified in Drosophila.
In summary, our results underscore the ability of multi-jointed organisms to respond kinematically to changes in walking conditions. Such plasticity is dependent on sensory input, which can directly or indirectly target pattern generators. Moreover, adaptability may not be immediate (reflex-based) but rather a time dependent process possibly involving several locomotor centers or even genetic networks. Future studies should address what neuronal units and genes are responsible for such adaptability. Finally, it is worth noting that the strategies and mechanisms displayed by walking organisms can be implemented in artificial neuronal networks, which are able to autonomously control walking machines in a stable, adaptable and energy efficient fashion [70][71][72].

Fly strains
Wild type (Oregon R) and nan 36a flies were reared on standard cornmeal at 25uC. All flies used in this study were non-virgin females between 1 and 7 days old. All manipulations were carried out under cold anesthesia. For the experiments described in Figures 1-3, at least 12 independent trials were conducted for each experimental condition, with each trial including 3-5 flies. On average, ,3 videos per trial were recorded and analyzed, for a total of at least 23 videos. For the more technically challenging experiments described in Figures 4-7, $5 flies were examined for each experimental condition, for a total of at least 20 videos. In one condition (0.666 weight at 1 week), 20 videos were generated from three independent animals.

fTIR imaging and FlyWalker software
For the walking orientation experiments the fTIR setup was rearranged so that the fly could be visualized walking inverted on a ceiling or vertically (descending or ascending; Figure 1A). For the load experiments flies were imaged 2 hours, 24 hours, and 1 week after load attachment. Videos were quantified for kinematics using the FlyWalker software package. See [39] for details. In addition to the previously published kinematic parameters, four additional parameters were quantified: Wave index. Fraction of frames in a video that display leg combinations defined by the wave (or metachronal) gait [50].
Full stance index. Fraction of frames in a video in which the body is moving forward while all six legs are in a stance phase.
Tripod duration. Average duration of a single tripod stance. Only tripod stances that had at least three consecutive frames with the same leg combination were considered.
Inter-tripod time. Average time to transition from one tripod stance to the next tripod stance. Only tripod stances lasting three or more consecutive frames were considered. In addition, only videos that contained 20% or more of tripod and 40% or less tetrapod configurations were considered.

Attachment of body load
1/320 spherical ball bearings were used as body loads. Aluminum and tungsten carbide ball bearings were obtained from McMaster-Carr Supply Co. (New Jersey, USA). Brass ball bearings were obtained from Salem Specialty Ball Co. (Connecticut, USA). Aluminum, tungsten carbide and brass ball bearings were determined to be about 0.66, 1.14 and 2.02 times the weight of an individual female fly, respectively. Each fly was considered to have 1.1460.05 mg (n = 39). Flies were cold anesthetized throughout the load attachment procedure. Ball bearings were attached to the fly notum under a dissection microscope using a UV-curable glue from Loctite. Weight loading took about 30 seconds per fly. Loaded flies were kept on standard cornmeal at 25uC with vials turned horizontally so that they were free to access the food while minimizing the possibility of falling into the food. They were allowed 2 hours to recover after load attachment.

Statistical analysis
Each data point comes from a single video. Since many of the measured gait parameters vary with speed (Swing speed, Step length, Stance duration, Stance linearity, Footprint clustering and gait indexes), we analyzed the data for these parameters by determining the best-fit regression model for the control experiment and then determining the residual values for each experimental group in relation to this regression model. Data was then expressed as the difference to the residual-normalized line. Boxplots represent the median as the middle line, with the lower and upper edges of the boxes representing the 25% and 75% quartiles, respectively; the whiskers represent the range of the full data set, excluding outliers. Outliers are defined as any value that is 1.5 times the interquartile range below of above the 25% and 75% quartiles, respectively. Statistical differences between experimental groups in Figures 1-3 were determined using Kruskal-Wallis analysis of variance (ANOVA) followed by Dunn's post hoc test (for non-normal distributions) or one-way-ANOVA followed by Tukey's post hoc test (for normal distributions). For figures 4-7, S7 and S8, tests for significance were done using a 2-way or 3-wayANOVA followed by Tukey's post-hoc test (GraphPad Prism). Box plots represent the median as the middle line, with the lower and upper edges of the boxes representing the 25% and 75% quartiles, respectively; the whiskers represent the range of the full data set, excluding outliers. Circles indicate outliers. Statistical significance was determined using 3-way-ANOVA with post-hoc ttests, where *p,0.05; **p,0.01; ***p,0.001. Statistically significant increases or decreases are indicated in red and blue, respectively. (TIF) Video S1 Representative video of a fly carrying a metal ball bearing. (AVI)