UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

A movement planning heuristic package for quadruped ambulation over rough terrain Buckland, Kenneth M. 1989

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
831-UBC_1989_A7 B82.pdf [ 8.34MB ]
Metadata
JSON: 831-1.0064928.json
JSON-LD: 831-1.0064928-ld.json
RDF/XML (Pretty): 831-1.0064928-rdf.xml
RDF/JSON: 831-1.0064928-rdf.json
Turtle: 831-1.0064928-turtle.txt
N-Triples: 831-1.0064928-rdf-ntriples.txt
Original Record: 831-1.0064928-source.json
Full Text
831-1.0064928-fulltext.txt
Citation
831-1.0064928.ris

Full Text

A M O V E M E N T PLANNING HEURISTIC P A C K A G E FOR QUADRUPED AMBULATION OVER ROUGH TERRAIN Kenneth M . Buckland B . Sc. (Electrical Engineering) University of Calgary A T H E S I S S U B M I T T E D IN P A R T I A L F U L F I L L M E N T O F T H E R E Q U I R E M E N T S F O R T H E D E G R E E O F M A S T E R O F A P P L I E D S C I E N C E in T H E F A C U L T Y O F G R A D U A T E S T U D I E S D E P A R T M E N T O F E L E C T R I C A L E N G I N E E R I N G We accept this thesis as conforming to the required standard T H E U N I V E R S I T Y O F B R I T I S H C O L U M B I A August 1989 © Kenneth M . Buckland, 1989 In presenting this thesis in partial fulfillment of the requirements for an advanced degree at the University of British Columbia, I agree that the Library shall make it freely available for reference and study. I further agree that permission for extensive copying of this thesis for scholarly purposes may be granted by the head of my department or by his or her representatives. It is understood that copying or publication of this thesis for financial gain shall not be allowed without my written permission. Department of Electrical Engineering The University of British Columbia 1956 Main Mall Vancouver, Canada Date: A b s t r a c t Legged walking machines offer a number of advantages over conventional wheeled or tracked vehicles. They can reach terrain that is inaccessible to conventional vehicles, and they leave fewer traces of their crossing behind on terrain that has not been prepared for transportation. This thesis details the de-velopment of a heuristic package that can be used to determine the movement plan of a longitudinally oriented quadruped walking vehicle ambulating over rough terrain. An investigation of walking machine research to date revealed that such work had not been done for quadrupeds that adjust their attitude to follow the terrain. This terrain following strategy was employed in the development of these heuristics because it provides superior movement capabilities on sloped terrain. The heuristics were tested exten-sively on a variety of simulated terrain conditions. These conditions consisted of different combinations of underlying terrain attitudes and terrain roughness levels. The heuristics performed well during the simulations, and the simulated machine responded as the theoretical analysis had indicated. During the course of this work, a number of new ideas related to quadruped ambulation were devel-oped. These included how to generate the overall movement plan of a quadruped walking machine, how foothold locations can be guided to best facilitate smooth machine turning, how the speed of a walking machine can be maintained at consistent levels, and how to prevent any possibility of leg collisions. In addition, in-depth analyses were made on how stride length affects quadruped machine speed, what conditions force such machines to halt their forward movement, and how a practical machine should be designed. ii Table of Contents Abstract ii List of Figures viii List of Variables x Acknowledgements xii 1 Introduction 1 1.1 Statically and Dynamically Stable Walking 1 1.2 Hexapods, Quadrupeds, and Quasi-Dynamic Walking 2 1.3 The Purpose of This Study 3 1.4 The Structure of This Paper 4 2 Walking Machine Research Efforts 5 2.1 Work at Ohio State University 5 2.1.1 Foot placement strategies 6 2.1.2 Free gaits and wave gaits 7 2.1.3 Body movement planning 7 2.2 Work at the Tokyo Institute of Technology 8 2.2.1 Body movement planning 9 2.3 "Approximate Straight Line Mechanism" Work 10 2.4 Work at Odetics 11 2.5 Other Work 12 2.6 Summary 13 3 General Characteristics of Quadruped Ambulation 14 3.1 The Walking Machine Design Used in the Study 14 3.2 The Quadruped Crawl 15 i i i 3.2.1 Description of the quadruped crawl 15 3.2.2 Difficulties with free gaits 16 3.3 "Follow The Leader" Gaits 18 3.4 Stability Triangles 19 3.5 Control of Movement 21 3.6 Speed Considerations 22 3.6.1 The ideal gait 23 3.6.2 The effect of stability margins 25 3.6.3 The effect of swing overhead time 27 3.6.4 The relationship between swing time and swing distance 29 3.6.5 The effect of altering the machine stance width 31 4 Heuristic Specification 33 4.1 The Overall Heuristic 34 4.2 Coordinate System Specification 35 4.3 The Orientation Vectors 36 4.4 The Assess Movement Heuristic 36 4.5 The Calculate Predicted Body Orientation Vectors Heuristic 39 4.6 The Update Swing Leg Heuristic 41 4.7 The Half-Cycle Movement Planning Heuristic 41 4.7.1 Trajectory planning 41 4.7.2 Attitude and orientation planning 42 4.8 The Calculate Target Angles Heuristic 43 4.9 The Foothold Determination Heuristic 44 4.9.1 Rear foot placement 44 4.9.2 Front foot placement general requirements 44 4.9.3 Front foot placement strategies 45 4.9.4 Determining the placement plane 45 4.9.5 Determining the search starting point 47 4.9.6 Determining the maximum forward placement distance 50 4.9.7 Scanning system following of the placement rules 53 iv 4.10 The Check Stability Heuristic 53 4.11 The Speed Calculation Heuristic 54 4.11.1 Determining the termination point 55 4.11.2 Speed calculation during the front leg swing phase 56 4.11.3 Speed calculation during the rear leg swing phase 56 4.11.4 Speed calculation during the creeping phase 59 4.11.5 Speed control strategies 61 4.12 The Swing Leg Kinematics Heuristic 62 4.12.1 Determining the placement state 62 4.12.2 Hovering 64 4.12.3 Calculating the joint angles with a valid placement state 64 4.13 The Approximate Step Times Remaining Heuristic 66 4.14 The Adjust Attitude Heuristic 66 4.14.1 Preventing failures by making footholds accessible 67 4.14.2 Adjusting the attitude to facilitate front foot placement 67 4.14.3 Adjusting the rotational orientation to facilitate rear foot placement 69 4.14.4 Halting conditions and the applicability of the Adjust Attitude heuristic 70 4.14.5 Machine failure summary 73 4.15 The Body Kinematics Heuristic 74 4.16 The Prevent Leg Collision Heuristic . 75 4.16.1 Preventing contact when both feet were placed 75 4.16.2 Preventing contact during the rear leg swing 77 5 Practicalities of Quadruped Design 81 5.1 Machine Dimensions 81 5.1.1 Leg dimensions 81 5.1.2 Platform dimensions 82 5.1.3 Model dimensions 83 5.2 Angular Range Limitations 85 5.2.1 Factors in the angular range limitation 85 5.2.2 Angular range limitations of the model 85 v 5.3 Maximum Rates of Change . . 86 5.3.1 Maximum joint angle change rates 86 5.3.2 Maximum body rotational change rates 86 5.3.3 Maximum acceleration 86 5.4 Machine Stance 87 5.4.1 Width of stance 87 5.4.2 Machine height 88 5.4.3 Length of stride 89 5.5 Stability Controlling Distances 90 5.5.1 Stability margin 90 5.5.2 Buffer distance 90 5.5.3 Following distance 91 5.5.4 Maximum turning rate 91 5.6 The Settling Factors 91 5.6.1 Movement, tilt, and roll settling factors 91 5.6.2 Rotational settling factor 92 5.6.3 Front placement angle learning rate 92 6 Heuristic. Simulation 83 6.1 The Simulation Format 93 6.2 The Performance Measures Collected 94 6.3 The Simulated Terrain 96 6.3.1 The planar structure of the simulated terrain specification 96 6.3.2 The "Roughness" of the simulated terrain specification 96 6.3.3 Comparative analysis of this terrain simulation method with others 98 6.3.4 Terrain changes 99 6.4 The Effects of Terrain Roughness 100 6.4.1 A benchmark: perfectly smooth and flat terrain 101 6.4.2 The limits of smooth terrain performance 101 6.4.3 Varying the roughness 102 6.4.4 Roughness selection for further simulations 107 vi 6.5 The Effects of Differing Terrain Attitudes 107 6.5.1 Varying the tilt 107 6.5.2 Varying the roll 109 6.5.3 Varying the tilt and roll together 112 6.6 Turning 115 6.6.1 Varying the desired turning rate 115 6.6.2 Turning on slopes 118 6.7 Performance During Terrain Changes 120 6.7.1 Changes in terrain tilt 120 6.7.2 Changes in terrain roll 122 6.8 The Effects of Varying the Stance of the Machine 125 6.8.1 Varying the stride 127 6.8.2 Varying the stance width 128 6.8.3 Varying the stance height 133 6.9 The Effects of Roughness in Varying Terrain Conditions 133 7 Conclusions and Recommendations for Further Work 136 7.1 Summary of the Study 136 7.2 Results of the Simulations 137 7.3 Contributions of This Work . 140 7.4 Future Work Possibilities 141 7.4.1 Dynamic application of the LOGHAQ heuristics 141 7.4.2 Improvements to the LOGHAQ heuristics 141 7.4.3 A complete movement control package 142 A Glossary of LOGHAQ Terms 144 B The LOGHAQ Code 146 References 176 vii L i s t o f F igures 3.1 The Structure of the Machine Used in the Study 15 3.2 The Quadruped Crawl 17 3.3 Linked Stability Triangles . . 20 3.4 The Creeping Distances That Result From Addition of a Stability Margin 26 3.5 Plotofi, = i . i = 2 f £ 28 3.6 Swinging of Legs About Their Shoulder 29 3.7 .Plot o f f = i . T T R ^ 30 3.8 The Effects of Stance Width on the Creeping Distance 32 4.1 The Coordinate System Used 37 4.2 Conversion of Joint Angles Into Shoulder to Foot Offset Distances 40 4.3 Compensation of the Lateral Foothold Spacing Under Roll Conditions 46 4.4 Minimum Stability Triangle Size 49 4.5 Stability Triangle Sizing During Machine Turning 52 4.6 Positioning Relationships When the Rear Foot is Behind the Front Foot 59 4.7 Calculation of the Vertical Angle 75 4.8 Configuration for Leg Contact Prevention 76 4.9 Rear Leg Swing Contact Prevention 80 5.1 The Effects of Differing Leg Segment Lengths 82 5.2 The Kaiser Spyder X5M 84 6.1 Foothold Perturbation Determination 97 6.2 Performance During the No Roughness Benchmark Simulation 101 6.3 The Effects on Completion Rate of Varying the Terrain Roughness 103 6.4 The Effects on Distance Travelled of Varying the Terrain Roughness 104 6.5 The Effects on Speed of Varying the Terrain Roughness 105 6.6 The Effects on the Tilt and Roll Errors of Varying the Terrain Roughness 106 viii 6.7 The Effects on Completion Rate of Varying the Terrain Tilt 108 6.8 The Probability of Adjustments and Halts for Different Terrain Tilts 109 6.9 The Effects on Completion Rate of Varying the Terrain Roll 110 6.10 The Probability of Adjustments and Halts for Different Terrain Rolls I l l 6.11 The Effects on Completion Rate of Varying the Terrain Tilt and Roll Together 112 6.12 The Probability of Adjustments and Halts for Different Terrain Tilts and Rolls 113 6.13 The Effects on Speed of Varying the Terrain Tilt and Roll Together 114 6.14 The Response to Various Turning Rates Per Half-Cycle 116 6.15 The Effects on Speed of Turning 117 6.16 Response to Varying Slope Attitudes While Turning at 5° per Half-Cycle 119 6.17 The Effects on Completion Rate of Various Terrain Tilt Changes 121 6.18 The Average Number of Adjustments and Halts During Flat to Tilted Changes 122 6.19 The Average Number of Adjustments and Halts During Tilted to Flat Changes 123 6.20 The Effects on Completion Rate of Various Terrain Roll Changes 124 6.21 The Average Number of Adjustments and Halts During Flat to Rolled Changes 125 6.22 The Average Number of Adjustments and Halts During Rolled to Flat Changes 126 6.23 The Relationship Between Front Foot Travel and Stride Length 129 6.24 The Effects on Completion Rate of Varying the Stride Length 130 6.25 The Effects on Speed of Varying the Stride Length 131 6.26 The Effects on Completion Rate of Varying the Stance Width 132 6.27 The Effects on Completion Rate of Varying the Stance Height 134 6.28 The Effects of Roughness on the Completion Rate of Different Terrain Conditions . . . . 135 ix List of Variables 8 the horizontal angle of the leg of a machine (see Figure 3.1). <f> the vertical angle of the leg of a machine (see Figure 3.1). e the extension angle of the leg of a machine (see Figure 3.1). wmax the maximum angular change that can occur in a joint per sample time. ip the tilt angle of a machine platform (see Figure 4.1). cr the roll angle of a machine platform (see Figure 4.1). p the rotation of a machine platform. s the stride length. h the height of a machine stance. w the width of a machine stance. Pp the planned center of gravity of a machine at the end of a half-cycle (see Section 4.7). Pf the location of the next planned foothold. A the forward orientation vector (see Section 4.3). S the lateral orientation vector (see Section 4.3). N the platform normal orientation vector (see Section 4.3). J a vector from the center of a machine to one of its shoulders. x D a vector from one of the shoulders of a machine to the corresponding foot. da the distance between the shoulder and foot of a leg in the forward direction. d, the distance between the shoulder and foot of a leg in the lateral direction. dn the distance between the shoulder and foot of a leg in the vertical direction. v the velocity of a machine. xi Acknowledgements I would like to thank the mountains north of Vancouver, and all those who challenged them with me. I would also like to thank the ocean. In addition, I would like to thank my incredible wife for not smashing that one last glass, for typing in some of the references, and for consistently providing a great time. I would like to thank Dr. Peter Lawrence for his guidance, and for allowing me a great deal of freedom (but not so much freedom that I never produced a thesis about which acknowledgements could be made). Finally, I would like to thank my Mom for the Mykit System 7 150-in-l Electronic Project Kit that she gave me Christmases ago. This would be an entirely different thesis if she had given me a lump of coal like she threatened. I'd probably be a Geologist like my sister. xii Chapter 1 Introduction Over the past 25 years there has been considerable research interest in constructing artificial walking machines. Such machines would be of use in many military, industrial, and space applications, as they can cross terrain that is impassable to conventional wheeled and tracked vehicles. The range of mobility is increased with legged vehicles because they require only a limited number of footholds, not a smooth path, to facilitate their movement. One need only consider the terrain that can be reached by a mountain goat to realize the superior characteristics of legged vehicles. At present, no one in the field of walking machines would propose that these machines could access the difficult terrain of mountain goats, but there are still many areas they could reach that, without proper route preparation, conventional vehicles could not. In addition, the limited number of footholds required by walking machines results in less disturbance of the terrain that they walk over. So even though both legged and conventional vehicles may have the ability to cross a given field for example, the legged vehicle would leave far fewer traces of its crossing behind. Thus walking machines could be of value in applications where decreased environmental impact is desired. 1.1 Statically and Dynamically Stable Walking Walking machine research has traditionally been divided into two basic fields, those that involve either statically or dynamically stable machines. Static stability refers to maintaining machine stability by continually keeping the center of mass of the machine inside a stability region defined by the convex hull of the horizontal projection of all its supporting feet (Song, 1987). If a statically stable machine stops its movement at any time, it remains standing. Dynamic stability relies on the active modulation of leg forces to maintain balance. These machines are effectively always "falling". Completion of their fall is prevented by the movement of their legs into new positions, and the careful application of leg forces. Dynamically stable walking machines have been designed and constructed (Raibert, 1983, Miura, 1984, Takanishi, 1984), but this type of stability was 1 Chapter 1. Introduction 2 not considered in this study. Dynamic stability, at least in the research to date, results in a very rough "ride", and is not very applicable to heavy machinery, the kind that would be of use in most practical applications. 1.2 Hexapods, Quadrupeds, and Quasi-Dynamic Walking In the realm of statically stable machines, most of the early research was on quadruped, or four-legged, vehicles. This may have been because four-legged creatures are very familiar to us. The concern with quadrupeds continued until Bessonov and Umnov (1973) released a paper describing the superior stability characteristics of hexapod, or six-legged, vehicles. This superiority is due to the fact that the six legs can be lifted in a variety of combinations that maintain a very stable base, even when more than one leg is being lifted. Another advantage of hexapods is that they can walk with four or more legs on the ground, allowing for redundant support should one of the legs give way. It is interesting to note that insects, creatures that typically restrict their walking to statically stable gaits, always have six or more legs (if they have any at all). Conversely land mammals, animals that typically have four legs (this researcher not included), use dynamically stable gaits. Insects may make use of six-legged statically stable gaits because these gaits make more restricted requirements on their simple nervous systems. Therefore hexapod walking could be seen as a more primitive form of walking, and as such, should probably be investigated first. Possibly for this reason, and definitely for the reason of improving static stability, most of the significant statically stable walking machine research in North America and Europe concentrated on hexapods after 1973. In the past decade, work on quadrupeds has reemerged in Japan (Hirose, 1984a and 19846, Adachi, 1987) and Tiawan (Lee, 1986a and 19866). The motivation for this work may be partially, as described in Hirose et. al. (1978), to decrease machine complexity. Making use of quadrupeds not only reduces the control requirements, it also decreases the number of legs which would have to be mechanically maintained in practical applications. A more significant justification for quadrupeds however, may be their greater suitability to dynamically stable operation. Work in this regard has been done by Adachi et. al. (1987). This work has not gone to the extent of replicating galloping animals in the manner of Raibert (1983), but it has extended the capabilities of statically stable machines. It has involved traditional statically stable machine designs that are in no way similar to those used by Raibert. Such designs, with the current understanding of machine walking, cannot incorporate a significant amount of Chapter 1. Introduction 3 dynamically stable operation. They can however, use some dynamic balance at the "edges" of their static balance range. This could include going slightly beyond the statically stable region when a swinging foot that will restore stability is soon to be placed, or using dynamics to compensate for miscellaneous forces affecting the machine. In general, the inertia of the machine's body is used to reduce the rigid stability constraints placed on the operation of the machine. It is in the potential for this "quasi-dynamic" walking that quadrupeds have the advantage. Four legs can more easily be controlled for this type of ambulation. Hexapods walking quasi-dynamically would require much more complex control systems to keep all of their legs functioning smoothly, and to prevent collision between the legs. 1.3 The Purpose of This Study When quadrupeds were abandoned in 1973 as a viable walking machine solution, the work on four-legged gaits at that time had progressed only as far as to specify generally the patterns that the gaits should follow. No work at all had been done on the complexities of gait planning over rough terrain. Recent work in Japan and Taiwan has either not considered rough terrain or, in the case of Hirose et. al. (1984a and 19846), has done so in a manner that is rather restricted. The machines that were designed by Hirose et. al. handled rough terrain walking in the manner of expert systems, not "terrain followers". That is, when these machines were presented with terrain that had many inaccessible areas and varying foothold heights, they carefully determined where the best foot placement locations were. They moved slowly, chose their footholds precisely, and maintained a perfectly level attitude, regardless of terrain. This method of walking was felt by this researcher to be too restrictive in terms of adapting to the terrain. To best cross uneven terrain, a vehicle should adjust its attitude to match that of the terrain, and move on a more or less constant trajectory defined by the longitudinal axis of its body. Without such adjustments, extremes of terrain slope become unnegotiable due to the simple fact that the down hill legs get extended drastically, and the up hill ones get pulled in too close to the machine. If walking continues in this manner, leg range limits are eventually reached, and the machine must halt. The terrain following strategy was used in most of the work done on hexapods, as will be detailed in the next chapter. The purpose of this study was to develop a collection of walking machine control heuristics that ap-plied general terrain following hexapod walking strategies to quadrupeds. These heuristics were designed to generate an attitude adapting, longitudinally oriented gait plan that provides a smooth, consistent Chapter 1. Introduction 4 "ride" over rough terrain. Such work has never been performed on quadrupeds, as the groups that have developed longitudinally oriented, terrain following gait planners have concentrated on six-legged machines. As stated previously, the advantage of having four instead of six legs, is the ease with which the former could be converted to quasi-dynamic operation when the requirements of such become better known. This study did not actually include quasi-dynamic walking strategies, its purpose was instead to do a thorough investigation of statically stable quadruped walking that would further the progress towards towards quasi-dynamic ambulation. More specifically, this study resulted in the development of a complete quadruped movement planner consisting of a number of heuristics. The collection of heuristics was entitled, "Longitudinally Oriented Gait Heuristics for Ambulating Quadrupeds" (LOGHAQ). These heuristics did not provide dynamic con-trol. They simply generated a gait plan that a dynamic controller could follow. It was not assumed that this plan would be followed precisely however. The heuristics completely reconstructed their plan from the current machine state every sample time to facilitate a realistic response to machine performance. 1.4 T h e S t ruc tu re o f T h i s P a p e r This paper will first discuss historical walking machine work and its relationship to the heuristics. Next the general operation of the heuristics will be described, including how they were developed from consideration of the characteristics of quadruped walking. This will be followed by more specific details of the heuristics' operation. Then general guidelines for using the heuristics on an actual machine will be discussed. In parallel with this, the development of a simulation model will be detailed. Finally, simulations performed to evaluate the heuristics will be described, and conclusions drawn. Chapter 2 Walking Machine Research Efforts This chapter will discuss the walking machine research that has occurred over the past 15 years. The purpose of this discussion is to provide a background for the work done in this study, and to explain how it helps further the understanding of the field. The time period of 15 years was selected as it was in this period that walking machines evolved to the point where they could handle more than smooth, flat terrains that could be easily traversed with inflexible gaits. The reason for this evolution was a combination of simple advancement based on previous work, and the availability of portable, powerful microprocessors. 2.1 Work at Ohio State University Extensive walking machine research has been carried out at Ohio State University. O.S.U. has had the most comprehensive agenda in this field of any institution. The work at O.S.U. has centered around two machines, the O.S.U. Hexapod and its successor, the Adaptive Suspension Vehicle (ASV). The six legs of the Hexapod were powered by electric motors, and were "reptilian" in design (Klein, 1983, Messuri, 1985, McGhee, 1984). By "reptilian" it is meant that the legs had two degrees of freedom at the shoulder, and thus the upper leg segment could move freely about this joint. In addition it had a knee joint, providing another degree of freedom, that allowed the lower leg segment to swing in the vertical plane defined by the upper leg segment. In general then, the upper leg segment remained mainly horizontal, and the lower remained vertical. (Figure 3.1 illustrates four reptilian legs.) The two segments rotated in a vertical plane around the shoulder to facilitate movement. This leg construction, and in fact the machine itself, is a common design for hexapods and will be referred to henceforth as that of a "standard hexapod". Another characteristic of both the Hexapod and standard hexapods is that they have a longitudinal leg configuration. That is, the legs are attached in two groups of three down each side of a long body. This design differs from one where the legs are spaced equally and symmetrically around a roughly circular body. The comparison is similar to that of an ant and an idealized spider. 5 Chapter 2. Walking Machine Research Efforts 6 The ASV, as stated above, was the successor to the Hexapod, and while still six-legged and longi-tudinally configured, it incorporated a number of advances in leg design (Waldron, 1984 and 1986). In order to increase energy efficiency, the legs used in the ASV were designed to isolate the horizontal and vertical leg forces. This allowed for the forward driving forces to be kept separate from those used to simply keep the machine standing, and decreased the overall power consumption (Waldron, 1984). The legs looked like those of a large mammal. The leg segments were both vertically oriented in a plane that ran parallel to the length of the machine's body. There was a knee joint with one degree of freedom, a shoulder joint that allowed rotation of the leg in the plane parallel to the body, and a third joint that allowed the leg plane to tilt a limited amount away from vertical. Not only did this design result in an energy efficient stance similar to that of a large mammal, it had a narrower profile, allowing for the easier negotiation of obstacle filled terrain. Of course this narrower profile also decreased the lateral stability of the machine. 2.1.1 Foot placement strategies While the two O.S.TJ. machines were somewhat different in design, they were similar in how their feet could be placed and moved relative to their bodies. The legs in both machines had three degrees of freedom. So the gaits that were developed for use on the Hexapod were easily extended and enhanced for use on the ASV. A few of the many gait strategies that were used on the two machines will be described below. One of the first considerations in rough terrain negotiation is that of foot placement. This problem was solved, in one strategy, by letting the legs move to wherever the ideal foothold location was, and using proximity sensing to control the downward placement of the feet (Tsai, 1986). This method of placement assumes that the terrain, regardless of its roughness, has no regions were feet cannot be placed. The foot placement problem was also solved by allowing the machine operator to take over the exact placement of each foot (Messuri, 1985). Another solution involved using a vision system to locate potential footholds indicated by the operator with a laser beam (Ozguner, 1984, McGhee, 1984). The concept of "constrained working volumes" was employed to limit the area of foot placement to one that ensured machine stability (Lee, 1986c). The ideal foot placement was then defined by the point on the front edge of the working volume that the planned leg trajectory passed through. Placement locations of feet other than the front two were often determined using a "follow the leader" strategy that placed these feet in or near the footholds used by the front feet (Ozguner, 1984, McGhee, 1984). This strategy Chapter 2. Walking Machine Research Efforts 7 eliminates the need to identify footholds for each foot, and allows knowledge obtained by front foot placements, such as ground firmness, to be made use of. 2.1.2 Free gaits and wave gaits The actual order of foot placement is a major issue, and was determined in the O.S.U. machines using both the "wave gait" patterns studied extensively by McGhee (1984), and "free gait" heuristics (McGhee, 1979). The former of these involves fixed foot placement orderings that result in a high degree of vehicle stability, and often reflect animal gaits. The latter involves the continuous determination of the optimal foot to move at any time to ensure maximum stability and smooth body movement. One goal of free gaits is to keep as many feet off the ground as possible. The more feet that are off the ground, the more rapidly new support areas can be established, and the faster the machine can move. The fastest wave gait is the "alternating tripod" gait, one that involves having three legs, the maximum number, of a hexapod off the ground simultaneously. 2.1.3 Body movement planning Numerous strategies were developed at O.S.U. to determine body movement once the foothold selections had been made. One was to define a new body centroid based on where the feet would be when those off the ground were placed (McGhee, 1984). A movement plan was then developed that would take the machine's center of gravity to that predicted centroid. This plan, like all of those used, also reoriented the machine heading to a more appropriate direction. Another strategy was developed that determined the radius of curvature for a desired center of gravity path (Orin, 1982). The radius of curvature calculation was made based on direction specifications made by the machine operator and could, of course, be infinite. The algorithm used then supervised movement along this path. A third strategy was to determine, using relaxation techniques, an ideal body position that maximized the "energy stability margin" (Messuri, 1985). The energy stability margin is determined by the minimum energy required to tip a machine over when it is in a given state, and is possibly a better measure of stability than that normally used, the distance from the center of gravity to the nearest edge of the stability region (the horizontally projected region whose corners are defined by the placed feet). Movement of the machine into the most energy stable body position was accomplished by following a calculated maximal stability path. The energy stability technique is calculation intensive, and the high degree of stability it produces may not be necessary under the normal operating conditions of a walking machine. It would be Chapter 2. Walking Machine Research Efforts 8 most useful in extreme terrain slope situations or when solid positioning is needed to do work that will subject a machine to various disturbing forces. Many other movement plans were developed at O.S.U., but those presented previously seem to be the ones that have the most general application and are the most representative of particular methods of approach. Another aspect of motion planning that should be considered is body attitude control. Body attitude is adjusted to provide the largest possible stability margins for varying terrain attitudes. Terrain attitude was typically determined at O.S.TJ. by somehow averaging the elevations of the machine's feet. The averaging sometimes considered intended footholds that had been chosen, but not yet reached (Lee, 1986c). A number of strategies were adopted to match the body attitude to the perceived terrain one (Lee, 1986c, Waldron, 1984, Orin, 1976). All of these strategies included restrictions that kept the tilting of the body within reasonable ranges. Strategies that maintained a horizontal attitude were used as well. Many of the attitude controlling strategies also incorporated height control. Lessening the machine height decreases ground clearance, but increases stability when the machine body is tilted (Waldron, 1984). In addition to the work described above, additional walking machine capabilities were developed at O.S.U.. These included strategies for obstacle crossing (Waldron, 1984, Choi, 1988), turning in place (Orin, 1982), side-stepping (Orin, 1982), and foot slippage control (Wong, 1988). The work done on the Hexapod and the ASV thoroughly considers the problems of ambulation confronted by hexapod machines. While both of the machines developed at O.S.TJ. were hexapods, much of the work done there was considered while developing the heuristics described in this paper. These machines were similar in two fundamental ways that allowed for translation of ideas. The machines had three degree of freedom legs, and they were longitudinally oriented. The existence of two extra legs made some of the schemes developed for these machines inappropriate, but many O.S.TJ. strategies were developed for use on the LOGHAQ heuristics. The references to such will be apparent through the paper. The fact of the matter is that no greater body of research exists for longitudinally oriented machine walking. 2.2 Work at the Tokyo Institute of Technology Three walking machines have been developed at the Tokyo Institute of Technology. These are the KTJMO, the PVII (Perambulating Vehicle II), and the TITAN-III (Hirose, 1984a and 19846). The former of these Chapter 2. Walking Machine Research Efforts 9 was an early, simple design and will not be considered. The TITAN-III was an improved version of the PVII that was capable of supporting its own weight (the PVII was supported by a cable while walking). Both machines were quadrupeds with legs that were very long relative to their body size. The legs were located at the corners of basically square bodies and could swing more or less equally in either direction. The design was therefore not a longitudinally oriented one, but of an idealized spider nature. The legs themselves were reptilian, and had a knee joint with one degree of freedom and a shoulder joint with two degrees of freedom. Like the O.S.U. Hexapod, the two segments of the legs denned a vertical plane, and that plane could swing about the shoulder joint. The upper segment was kept mostly horizontal, the lower vertical. Much of the work done on these machines was concerned with energy efficiency. The legs made use of a pantograph design that isolated the vertical and horizontal force components. This allowed the horizontal driving forces required to move the machines to be kept separate from the vertical support forces. Thus the vertical support forces could be made mechanically passive. That is, the vertical support mechanisms could be locked, and energy expenditures to support the machine thereby eliminated. 2.2.1 Body movement planning The movement control of these two machines involved a free gait heuristic. This heuristic operated by making a movement plan based on the required general direction of movement. It then went through a thorough evaluation process to determine how this movement should be made. It carefully selected the best leg to swing at any given time to best facilitate continued smooth motion, it chose the best new foothold for that leg based on those that were available in the environment, and it calculated the best body movement path. The gait, given terrain where it could place its feet almost anywhere, eventually took on the pattern of the quadruped crawl, but it was not forced to do so. The quadruped crawl is the most practical wave gait available to four-legged walking machines. Overall, the gait determination system had more of an expert system nature than the more structured gait systems used on the O.S.U. machines. The PVII and TITAN-III, possibly as a result of having two fewer legs, walked in a manner that emphasized careful foothold selection, as opposed to continued longitudinal movement. In fact, the orientation of the machines' bodies was rarely associated with the direction of movement. Also, the machines always assumed a perfectly horizontal attitude from which deviations were prevented. Hirose (1984a and 19846) argues that this is desired for transporting people and goods in a smooth fashion, but it does limit access to more highly sloped terrain. It seems possible that either machine could have Chapter 2. Walking Machine Research Efforts 10 adopted nonhorizontal attitudes mechanically, but the control strategy would in no way have been able to handle this. This characteristic of being limited to horizontal attitudes only, highlights again that these machines were more oriented to choosing footholds carefully in terrain that did not have a lot available, than they were to terrain following in the manner of the O.S.TJ. machines. Another disadvantage of these machines was that, to function well, they required legs that could swing widely in either direction about the corners on which they were mounted. This was necessary so that they were not restricted to longitudinally oriented walking, and could move in any direction. While this type of operation does have its advantages, the complexity of the mechanisms required, and the load bearing problems associated with them, can be eliminated by simply using a longitudinally oriented design. Such designs require only a restricted range of leg motion. So while these machines were quadrupeds, not much of the gait strategy developed for them was of use in the heuristic described in this paper. Their existence does prove however, the feasibility of four-legged walking. 2.3 "Approximate Straight Line Mechanism" Work A series of six-legged walking machines, M E L M A R K Marks I, II and III, were built at the Mechanical Engineering Laboratory in the Tsukuba Science City in Japan. These machines made use of "approx-imate straight line mechanisms" that mechanically ensured that their foot movements occurred along straight lines parallel to their longitudinal axes. These mechanisms were used on each of the machines' six legs. The legs were configured three per side on a longitudinally oriented body, and were very close to the body. The effect of the approximate straight line mechanisms, that of isolating the horizontal driving forces from the vertical support ones, was similar to that of the pantographs used by the ASV, PVII and TITAN-III, but the mechanisms involved were quite different. The reason for the design was different too. While this arrangement may have increased energy efficiency, the main purpose of it was to provide decoupled degrees of freedom in the machines. That is, by isolating the horizontal movement component in the legs, and mechanically connecting it in all of them, there was effectively a single degree of freedom in the direction parallel to the longitudinal axes of the machines. Thus the mechanism eliminated the complexity of dealing with the extensive number of degrees of freedom found in walking machines that have three degrees per leg. It is interesting to consider the evolution of the M E L M A R K series. Mark I had only one degree of freedom, its straight line mechanisms moved all six legs simultaneously in the same direction. Mark II Chapter 2. Walking Machine Research Efforts 11 was designed so that two groups of three legs, each group consisting of one middle leg and the two end legs on the opposite side of the body, could rotate relative to each other about a vertical axis in the center of the machine. It could thus turn as well as move forward and backward, and had two degrees of freedom. Mark III, designed for rough terrain, had eight degrees of freedom. It incorporated leg length variation in each of the six legs. So its body could turn, move in a given direction, and maintain its stability in that direction by adjusting the leg lengths to match the ground height variations. The design of Mark III was extremely simple, and it could handle rough terrain, but it has to be questioned whether all this simplification was necessary. The designers' justification was that it decreased computing complexity, but that is not really a great concern with modern computers. The price paid for the control simplicity was a significant decrease in adaptability. The Mark III could have only one gait, the possible placement locations of its feet were highly restricted, and it could not readily change its attitude. Unlike the PVII and TITAN-III, this last problem was not due to limitations of the movement planner. The mechanism itself could not change attitude unless foot slippage occurred. So the limitations of the Mark III in rough terrain conditions were quite extensive, and none of this work was really considered in the heuristic design. Adachi, Nakano and Koyachi (1987) developed a quadruped machine that also made use of approxi-mate straight line mechanisms. This machine, the TURTLE-1, was similar to the Mark I in that it could only move forward and backward, but as the legs were not mechanically connected, it was not restricted to one overall degree of freedom. The TURTLE-1 had the ability to move in a quasi-dynamic fashion. It used a trotting gait to do so. It also had the ability to follow a fairly structured quadruped crawl gait. The TURTLE-1 has not yet been developed to handle uneven terrain. It does however, provide an example of what may be possible in terms of quasi-dynamic walking once an adaptive rough terrain gait for quadrupeds has been developed. 2.4 W o r k at Odet ics The Advanced Intelligent Machines Division of Odetics Inc. has developed a series of similar walking machines for use in nuclear installations (Bartholet, 1986). These ODEX machines take full advantage of the extent of present technology in order to have high power efficiency and high strength to weight ratios. They are the only true walking machines being used in practical applications. These machines all have a very tall and narrow aspect ratio that allows them to go where humans on foot can. They have six Chapter 2. Walking Machine Research Efforts 12 legs distributed uniformly around a vertical tubular body, and are thus configured like idealized spiders. Each leg has three degrees of freedom, and operates in a reptilian fashion where the two segments rotate together in a vertical plane. The legs make use of a mechanical linkage design that isolates the vertical support and horizontal driving forces required to operate them. Different capability motor and gearing systems are then applied in these two directions to provide very strong lifting capability and very energy efficient forward movement. Under normal operating conditions these machines can run for one hour using their on-board battery system. Separating the two force directions in this fashion requires that the machine bodies not be oriented in any but a straight vertical posture, but this is not such a short-coming with these machines. Their tall, vertical nature makes it undesirable to tilt them anyway, and their narrow horizontal dimensions greatly decrease the negative affects of not having the machine body attitude match that of the terrain upon which it is walking. All of the ODEX machines, excluding the first version of the first model, have had vision systems and arm/grippers attached. The vision systems provide for teleoperation of these machines, a feature first implemented over a radio link, and later over an automatically played out and retrieved umbilical cord. This link did not connect the machines to an external processor, all of the processing necessary for walking was done on-board, but it did allow remote specification of machine velocity, heading and rotation rate. All other aspects of walking are automatic, although factors such as height, and width in the direction of travel, can be specified. These machines make use of foot and shin sensors to feel their way through uneven terrain. They can negotiate stairs automatically. The gait that they make use of is the alternating tripod gait, the fastest member of the hexapod wave gait class. Bartholet (1986) does not discuss the gait determination scheme used in great detail. It is clear however, that it was one that followed closely the commands given by the operator, and that it assumed that the footholds it sought, while not necessarily at a consistent elevation, would always be available. 2 . 5 O t h e r W o r k The National Chiao Tung University in Taiwan has constructed a walking machine called the N.C.T.U. Quadruped-1 (Lee, 1986a and 19866). This four-legged machine has the popular reptilian style legs with three degrees of freedom. These legs are distributed uniformly around a circular body in an idealized spider fashion. While this machine has the capability to ambulate over rough terrain, and while nothing about its design prevents it from adopting varying attitudes, this aspect of performance has not yet been Chapter 2. Walking Machine Research Efforts 13 investigated. Instead the work by Lee and Shih (1986a and 19866) has focused on the mathematical determination of ideal walking performance over smooth terrain. This work was of use in characterizing the fundamental gait of the heuristics described in this paper. Lee has also worked with others (1985 and 1988) analyzing, in a similar manner, the alternating tripod gait in simulated hexapods. Joint work done at the U.S.S.R. Academy of Sciences and Moscow State University (Gurfinkel, 1981), and work at the University of Paris (Kessis, 1981), has involved hexapod walking machines. The former made use of a standard hexapod design. The latter a longitudinally oriented machine with two degree of freedom pantograph legs whose plane of operation was parallel to the longitudinal axis of the machine. Both machines made use of rather structured gaits, and neither has been developed to operate on uneven terrain. Sutherland developed a standard hexapod that was large enough to transport a man (Raibert, 1983). This machine made use of an alternating tripod gait, and maintained its stability by tightly controlling the freedom of movement of the hardware. Each leg had three degrees of freedom, but walking was limited to small steps. The machine was powered by a hydraulic system that effectively linked the legs together. Further, the feet of this machine were very wide, adding to its inherent stability. This machine did walk, but in a very structured manner that did not respond to the terrain conditions. It was not a design that could be easily extended to rough terrain applications. 2.6 Summary In summary, while the quadruped work of Hirose et. al. (1984a and 19846), Lee and Shih (1986a and 19866), and Adachi et. al. (1987) provided inspiration for this study, it was the hexapod work at O.S.U. that was found to be the most valuable during the development of the LOGHAQ heuristics. Chapter 3 General Characteristics of Quadruped Ambulation This chapter will consider the general characteristics of statically stable quadruped ambulation. To remain statically stable, a four-legged machine must operate under a large number of movement restric-tions. These restrictions result in a well defined general movement pattern. The factors that determine this pattern, and how the design of the LOGHAQ heuristics was affected by them, will be described in the following sections. 3.1 The Walking Machine Design Used in the Study The LOGHAQ heuristics were designed to be of use on a machine similar to that shown in Figure 3.1. The actual dimensions of the machine and its legs are not of great importance as long as the feet on either side have the "access range" to be placed near each other throughout a wide volume of space on their side. The center of gravity was placed, throughout the study, in the center of the plane defined by the shoulders of the machine. This was not a requirement however, it could have been placed anywhere near the center of the machine. Each of the legs on the machine must have three degrees of freedom, as shown in Figure 3.1. The leg design used for the study was the popular reptilian one (see Section 2.1). It had a shoulder that could swing in two directions. These were horizontally (relative to the machine) about an axis perpendicular to the machine platform (specified by 0), and vertically (relative to the machine) about an axis parallel to the side of the machine (specified by <$)} The third degree of freedom was in the knee joint extension angle (specified by e), which allowed rotation of the lower leg segment in the vertical plane (relative to the machine) defined by the upper segment. The two leg segments were, for this study, made the same length. The overall leg design was necessary for the correct operation of the heuristics. With some modification however, any design with three degrees of freedom could be used. 1 T h e horizontal and vertical lines of the 8 and <j> symbols can be used as mnemonics. 14 Chapter 3. General Characteristics of Quadruped Ambulation 15 Figure 3.1: The Structure of the Machine Used in the Study 3.2 The Quadruped Crawl The first consideration in developing the LOGHAQ heuristics was determining what type of gait should be used. The possibilities were to have either free or structured gaits, and it was decided that a structured gait was more appropriate. Structured gaits have a fixed and recurring leg lift pattern that is followed by the machine as it moves forward. There are only six feasible recurring leg lift patterns for quadrupeds (McGhee, 1968). Of these, the "quadruped crawl" is the one that affords the largest stability margins over the complete walking cycle (McGhee, 1968). It is also the gait used by mammals walking at slow speeds. This gait is uniquely suited to statically stable, longitudinally oriented, quadruped walking. Thus the quadruped crawl was chosen as the overall gait pattern for the LOGHAQ heuristics. 3.2.1 Description of the quadruped crawl The quadruped crawl is illustrated in Figure 3.2. It operates as follows. In position 'A' leg 4 is the next to be swung forward. This cannot occur though, until the center of mass of the machine, and its surrounding "stability margin", move into the "stability region" defined by the three front feet. So the r Chapter 3. General Characteristics of Quadruped Ambulation 16 machine must "creep" forward until this requirement is met.2 Once this has occurred, at position 'B', leg 4 can safely be lifted and swung forward. As this takes place, the machine can continue moving forward, possibly to a location around ' C . At this point foot 4 can be placed behind foot 2. When this occurs, leg 2 can immediately be lifted and swung forward. The stability region, due to this exchange of supporting feet on the right side, does not change much, so stability is maintained. As leg 2 is swung forward, the machine can continue its forward movement, as long as its center of gravity does not go past the front edge of the stability region. When foot 2 is placed, the machine should ideally have moved forward to position 'D', a location just within the stability region. At this point the stability region has been extended, and the machine is in a configuration that is a mirror image of its starting one. Legs 3 and 1 can then be moved in a similar manner, but not until the machine has again moved forward into the stability region defined by the three front legs. The movement of the machine that occurs when the two legs on either side are swung forward in turn, will be referred to throughout this paper as a "half-cycle". 3.2.2 Difficulties with free gaits Free gaits, as described in Section 2.1, operate in the manner of an expert system, where the leg to be moved at any one time is chosen carefully based on a number of criteria. Hirose et. al. (1984a and 19846), as stated Section 2.2, used such a gait on their quadruped, but it did not move in the longitudinally oriented fashion desired by this researcher. Other work on free gaits has involved hexapods, where longitudinally oriented walking is made use of, but where there is a more significant question of which leg should be lifted at any given time. To maintain static stability, any given walking machine must have at least three legs on the ground all of the time. So unlike quadrupeds, which can only lift one leg at a time, hexapods can lift as many as three. The advantage of using a free gait strategy on such a machine is that the free gait controller can determine which leg should be lifted among a number of possibilities. This is not necessary with quadrupeds. The next leg that a quadruped should lift is determined most often by which leg has moved farthest backward, and thus follows a natural pattern. At certain points during quadruped ambulation it may be advantageous to break the pattern to increase stability in the short term, but the resulting interruption in the smooth flow of the gait could eventually lead to gait failure. It would be extremely difficult to determine before-hand what the long term effects of breaking the pattern will be, so doing so is inadvisable. Thus the decisions made by free gait controllers about 2 "Creeping", throughout this study, refers to movement with all four legs supporting and none in the swing phase. Chapter 3. General Characteristics of Quadruped Ambulation 17 Chapter 3. General Characteristics of Quadruped Ambulation 18 which leg should be lifted are clearly useful for hexapods, but they are of little use, and could potentially be disastrous if employed on quadrupeds. Less structured gaits are of use on quadrupeds when turning in place, or large obstacle avoidance are required. The are also of use when movement is desired in directions other than that denned by the longitudinal axis of the machine (Hirose, 1984a and 19846). This study concerned heuristics that produced continuous, longitudinally oriented, forward motion however, and thus did not consider these capabilities. The main goal of the study was to develop techniques that maintained forward motion over rough terrain. It was envisioned that, once a complete forward motion heuristic package was developed, these extended capabilities could be added to produce a final system. 3.3 "Follow The Leader" Gaits One interesting walking technique that many animals use, especially insects, is the "follow the leader" gait (Pearson, 1984, McGhee, 1984). Follow the leader gaits were also used on the two Ohio State University machines, as described in Section 2.1 (McGhee, 1984). This technique simply involves placing the back feet on both sides of the vehicle in, or near, the footholds used by the front feet on that side. Restricting them to nearby placements is necessary when these footholds are already occupied. The advantage of this technique is that footholds used for the back feet in this manner, have already been investigated, both visually and through actual placement of the front feet, and are known to be good locations. This removes the burden of finding new footholds for each foot, and requires only a system to locate footholds for the two front feet. (It is interesting to note that large cats use follow the leader gaits while stalking prey so that they can be assured of silent foot placement.) This technique, for the reasons given, was adopted in the LOGHAQ heuristics. There are in fact, disadvantages to not using a follow the leader strategy on a quadruped machine. If the rear footholds are chosen at points other than near.the front footholds, they should be located either ahead of, or behind, them. Placing them in positions laterally offset from the front footholds is also possible, but serves no purpose and just adds the foothold locating burden with no compensatory benefits. Placing the rear feet ahead of the front ones pushes forward the front edge of the stability region and allows the machine to travel further before the front foot is placed, thus hastening the entire movement. This is not possible however, unless a considerable sacrifice is made. This is due to the fact that the rear feet of a quadruped are placed before the front ones are lifted from the same area, Chapter 3. General Characteristics of Quadruped Ambulation 19 so extensive computations would have to be made to find footholds that will not result in the legs colliding. Collisions would have to be prevented while the rear foot is being placed, when both feet are on the ground, and when the front foot starts its swing forward. It will be shown in Section 4.16 that collisions can be easily prevented as long as the rear foot never goes further forward than the front one. Thus placing the rear feet ahead of the front ones is inadvisable. For reasons identical to those above, placement of the rear feet behind the front ones results in a decrease in speed. Such placements move the front edge of the stability region back, and thus decrease the travelling range. So this results in no benefits, and again requires extra foothold locating effort. 3.4 Stability Triangles If the stability regions of a quadruped crawl that uses a follow the leader gait are mapped out over a number of steps, an interesting pattern develops, as shown in Figure 3.3. Each movement half-cycle takes place within a triangular stability region that borders those in front of, and behind it. This creates a continuous track of "stability triangles". The LOGHAQ heuristics made extensive use of this linking triangle pattern. Machine movement was considered in each of these triangles separately. That is, complete movement plans were developed to determine body motion through each triangle, and to control the swinging of the two legs that had to to be relocated during the crossing of the triangles. Further, the direction of movement, and the machine attitude and orientation were determined by the stability triangles. The vector between the two unmoving legs on the external side of the triangles was used to define the trajectory that the machine was to adopt during each half-cycle. The machine adjusted its tilt and rotational orientation to match that of the vector. That is, the machine oriented itself so that its longitudinal axis would be parallel to this vector. Its platform attitude was set to match that of the apparent ground planes defined by the three corners of the triangles. McGhee et. al. (1984) averaged all of the foothold elevations of the O.S.U. Hexapod to determine its ground plane in a similar manner. It was considered whether or not using just three footholds to determine the apparent ground plane, and thereby the machine attitude and orientation, was wise. Doing so could result in exaggerated reaction of the machine to new footholds. Past footholds, or even the next forward foothold, could have been averaged in to the ground plane determination to decrease this effect. It was decided however, that past footholds were past, they reflected conditions which were no longer prevailing. It was the reality of the Chapter 3. General Characteristics of Quadruped Ambulation 20 Figure 3.3: Linked Stability Triangles Chapter 3. General Characteristics of Quadruped Ambulation 21 current machine situation that was of the most importance. The next forward foothold location, while possibly of use, was not known when the movement plans for the half-cycle were made. Further, it was felt that in general the three footholds best reflected what was actually happening to the machine. While these footholds might not have accurately indicated the attitude of the ground underneath the machine, and while they did not indicate upcoming radical terrain changes that should have been prepared for, they did specify the conditions that the machine currently had to work with. If they were not used as a guide, the machine might have adopted orientations that were awkward relative to its foot positioning. Thus it was decided to make use of only these footholds. Possible exaggerated reactions to them were dampened by using "settling factors" to promote smooth transitions from one prescribed trajectory and attitude specification to the next. Doing this did incorporate information about old footholds into the motion plan, but in a indirect manner. The exact operation of the settling factors is described in Section 4.7. The stability triangles were defined by the foothold locations, and these triangles in turn determined the movement of the machine. So the operation of the heuristics depended entirely on the series of footholds presented to them. No other information was available. This was the general philosophy of the heuristic design. The movement planning problem centered on how to best move along a path in space determined by the isolated footholds. Other aspects of the terrain, such as the location of large obstacles, were not considered. It was assumed that the operator of the machine would prevent them from becoming problems. This does not mean that the LOGHAQ heuristics unconditionally accepted any footholds presented to them however. Section 4.9 details how the Foothold Determination heuristic guided the selection of the next foothold so that it would best facilitate the movement desired by the operator. Thus some control was exerted over the actual positioning of the foothold series, and thereby the stability triangle pattern. 3.5 Control of Movement As stated in the Introduction, the purpose of the LOGHAQ heuristics was to generate a longitudinally oriented movement plan for a quadruped crossing rough terrain. The heuristics were designed to be used on a machine that had an operator (or teleoperator) who specified the general direction of movement by setting a desired turning rate, pc. This turning rate indicated the amount that the machine should rotate about the platform normal every half-cycle. Given the footholds available in the direction specified, the Chapter 3. General Characteristics of Quadruped Ambulation 22 heuristics then calculated the desired joint angles to facilitate smooth walking. The heuristics did not choose a course around major obstacles, this was perceived as the task of the operator. The heuristics were designed to work out the details of the walking motion under general direction. Further, they were not designed to be of use in extremely difficult terrain conditions where each leg must be placed carefully in awkward foothold locations. The main application of the heuristics was over rough, but not impassable terrain, where, under general guidance, they provided the plan necessary for a smooth, steady gait. Aside from specifying the turning rate, the operator could also set other heuristic parameters. These included control values that could be altered occasionally, but did not require constant adjustment. They were the height of the machine above the ground, h, the width of the stance, w, the "stride length", a, and a number of settling factors (described in Section 4.7) that determined how quickly the machine adjusted to new conditions. The LOGHAQ heuristics, for the purposes of this study, did not include speed control. One of goals of the investigation was to observe, given a set of maximum joint angle velocities, what speeds a simulated machine could maintain. Slower speeds were not of interest, as operating at reduced speeds did not affect machine stability or any other aspect of performance. In a practical application, speed control could easily be added to the heuristics. In addition, the heuristics did not require, or even allow, operator control of the machine attitude in the manner of Waldron et. al. (1986). Another goal of the study was to observe how well the heuristics performed this function themselves. Attitude control could also be easily added in a practical application. 3.0 Speed Considerations The main objective of the LOGHAQ heuristics was to maintain a smooth ride over rough terrain. This goal could have been accomplished by making extremely slow movements and allowing plenty of time for leg repositioning, but this would hardly have been a significant accomplishment. So a further goal of the heuristics, as mentioned in the previous section, was to maintain the highest speed possible. This section will consider some of the factors that influence the operational speed of quadruped machines, and examine how these affected the heuristic design. It should be noted that this section departs from conventional walking machine gait analysis. The reason for this is that most gait analysis work (ie.; Song, 1987, Lee, 1986a) has concerned how the Chapter 3. General Characteristics of Quadruped Ambulation 23 stability margins are affected by different aspects of the machine design and performance. This was not a concern with the LOGHAQ heuristics. The minimum stability margin was a defined constant in these heuristics, and was always maintained. This was considered a safe and practical way of implementing a gait planner. As a result, while traditional analyses have considered how to improve the stability margin for a machine walking with a given leg duty cycle (effectively a defined speed), this analysis will consider how the top machine speed was improved with a given stability margin. Like most gait analyses, this one considers only the locations of the feet and the center of gravity of a machine. It is never concerned with the locations of the shoulders of a machine. This may seem unusual, as the shoulders would seem to be intimately involved in the walking process, but they are not really of concern from a speed analysis point of view. It is only the stability triangles, as defined by the footholds, that need to be considered. The practical aspects of a machine design, including the relationship between the shoulders and feet, will be discussed in Chapter 5. 3.6.1 The ideal gait Following Song and Waldron (1987), an ideal quadruped crawl gait will first be considered. This gait has the connected stability triangle pattern shown in Figure 3.3, but it does not have any creeping period. It is so well timed that the crossing of each of its stability triangles coincides exactly with the placement of a forward foot that defines a new one. No stability margin is used. The machine moves right to the edge of the stability region and makes use of precise timing to constantly remain (theoretically) statically stable. With an ideal gait the machine body maintains a constant speed. One leg is always swinging, and all of the legs swing forward the same amount. The uniform swing distance is due to the fact that each foothold is spaced the same distance from the one behind it, and the fact that the body moves forward exactly the same amount for each swing period. The latter of these two conditions is true because each leg does swing forward the same amount, thus taking the same amount of time, and resulting in the same machine movement distance at the constant speed. So a complete cycle of all four legs consists of four equal duration periods in which each of the legs swings forward the same amount. The time required for each of them to swing forward is: ^max Where w m a x is the maximum angular velocity of the forward swing, and 9j and 9i represent the final and initial leg horizontal angles respectively. Chapter 3. General Characteristics of Quadruped Ambulation 24 The length of time that each leg supports the machine while rotating backward, is Zt,. This is because during the support period the other three legs, one at a time, all swing forward. Now it is apparent that the amount that the legs swing forward is exactly equal to the amount that they rotate backward as the machine moves ahead. So: _ Oj - 6i _ Of ~ 6i _ Of - 6i _ "max /„ "backward- ^ - ^ " 3(0, - 6 \ ) /<«W ~ 3 ^ Therefore, unless there is some mechanical limitation that forces the backward leg rotation to be much slower than the forward swing, it will always be the maximum forward angular velocity that limits the speed of the machine. That is, there is always plenty of time for the machine to move forward as a leg swings, so it is the swing time itself that is the limiting factor. It is this time that determines, as one leg after another swings, how long it will take the machine to cross each stability triangle. Considering the total time required for one leg to complete its entire cycle, including its backward drive and forward swing, the following is apparent: , , , support time of leg ti St, „ __ .„ „. duty cycle = -fZ- — * = — i — = - i = 0.75 3.3 total cycle time ij + tt At, This result agrees with McGhee's (1968) conclusions, from similar ideal gait consideration, that the lowest possible duty cycle for a quadruped is 0.75. As the gait moves farther away from an ideal one, ij grows relative to ta, driving the duty cycle up. Now the distance travelled during the total cycle must be such that it returns the machine to the same position relative to its feet. The front feet, when they are placed, are spaced apart in the forward direction of the machine by a distance s (the stride length). As two front foot movements take place in one complete cycle, the total distance travelled is 2s. So the machine velocity is: 2s 2s s v = = — = — (3.4) ti+t, 4i, 2t, K ' Now the time required to swing a leg forward is related to the distance that it has to swing. The exact relationship is difficult to determine however, as it depends on details of the machine design. For the sake of clearer analysis and, as will be shown later, because doing so has no significant detrimental effect on these calculations, a linear relationship will be assumed between the swing time and the swing distance of a leg. With this assumption: Chapter 3. General Characteristics of Quadruped Ambulation 25 t, =k(2s-±2s) = ^ (3.5) Where k is the constant of the linear relationship, and the swing distance is calculated by subtracting the distance that is travelled by the machine during the swing from the distance between the footholds. Combining this with Equation 3.4: v = ^ = Yk ^ So the velocity of the machine's movement, given the assumption of a linear relationship between the leg swing distance and the swing time, is entirely determined by the constant of proportionality between the two. The faster the swing leg can cover a given relocation distance, the faster the machine can move. This emphasizes the fact that it is the leg swing time that determines the speed of the machine, and reveals the rather interesting fact that theoretically, the stride distance does not affect it at all. This finding agrees with the ideal gait analysis done by Song and Waldron (1987). They found that, "for any [stride], no matter how small, the vehicle can move at a speed determined by the stepping frequency" (p. 68). In practice this is not the case however, and the next subsection will detail further investigations into the realities of the effects of stride length on walking speed. 3.6.2 T h e effect o f s t ab i l i ty marg ins Now that it has been used to establish the basic relationships, the ideal gait must be discarded to permit a more practical analysis. To prevent machine collapse, stability margins must be added. Doing so requires that creeping movements occur in the regions near the edges of the stability triangles. This is shown in Figure 3.4. In this figure, c is the distance that the machine must creep before and after its stability margin circle crosses into a new stability triangle. A result of adding the creeping distance is that the distance the machine travels during its swing periods is reduced. Equation 3.5 must be altered accordingly: i, = k{28 - i(2s - 4c)) = * ( y + c) (3.7) Now it is assumed that the velocity of the machine as it passes through the creeping regions is the same as that during the leg swing periods, so the time required to cross these regions is: Chapter 3. General Characteristics of Quadruped Ambulation 26 v = v = 2s 8 k(3s + 2c) + 2f - * ~ 2 c ~ Jfe(3* + 2c) 1-24 v = 3Jfe + 2ife^  (3.9) (3.10) (3.11) (3.12) Where c is restricted to a range of: Chapter 3. General Characteristics of Quadruped Ambulation 27 0 < 4c < 2s (3.13) So it can be seen that the velocity of a machine is affected by the ratio of the creeping distance to the stride length. As shown in Figure 3.5, as that ratio gets larger, the velocity decreases. Thus it would be best, given a Axed creeping distance, to make the stride length as large as possible. If the stride length is made so much larger than the creeping distance that | approaches zero, the velocity becomes the familiar: « = Tk (3.14) If the stride length is reduced to its minimum value of 0 1 2c, which would correspond to the elimination of any area over which the machine could travel while swinging its legs, the resulting velocity is zero. This is because the velocity during the creeping periods is restricted to that of the swinging periods. If the velocity of the creeping periods were allowed to be infinite (accomplished by setting te to zero), the velocity equation would become: (3.15) 3Jfc + 2k j And it would still be best to make the creeping distance to stride length ratio as small as possible. None of the results of adding the stability margin to the ideal gait are particularly surprising. It follows intuitively that, since it is the leg swing time that fundamentally determines machine velocity, the creeping time during which swinging does not occur should be minimized. As two fixed sized creeping distances must be crossed in every stability triangle, this is accomplished by increasing the size of the stability triangles (a direct result of the stride distance) and thus reducing the number of creeping distances over a given distance of travel. 3.6.3 T h e effect o f swing overhead t i m e Another factor that determines how the stride length affects the velocity is the leg swing overhead time. A real walking machine will have extra time delays at the start and finish of its leg swings to provide for initial ground clearance and accurate foot placement. These time delays will add directly to the total swing time required, and will not follow the linear relationship that was assumed between the swing time and the swing distance. To minimize the effect of this overhead, the stride length should be made Chapter 3. General Characteristics of Quadruped Ambulation 28 Figure 3 . 5 : Plot of » = * • Chapter 3. General Characteristics ot Quadruped Ambulation 29 5 Figure 3.6: Swinging of Legs About Their Shoulder as large as possible. With fewer steps over a given distance of travel, the resulting total overhead will be less. 3.6.4 The relationship between swing time and swing distance As stated previously, the exact relationship between the time and distance of a leg swing is difficult to determine. It is affected by specifics of the walking machine design and the machine state at the beginning and end of the swing. The swing will generally be circular in nature however, so the following analysis can be made. Although it is not required, to most easily access the greatest range, each leg of a walking machine should swing more or less symmetrically about its shoulder under normal operation. Thus, as shown in Figure 3.6, a typical swing would start at a point behind the shoulder and end at a point roughly an equal distance in front of it. Now from Figure 3.6: So, as shown in Figure 3.7, as s increases, f decreases, indicating that as the stride is made larger, the resulting increase in the angular movement of the swing does not grow as quickly. This means that the swing time grows more slowly as well, and again points to making the stride length as long as (3.16) da R (3.17) ds R2 + s2 Chapter 3. General Characteristics of Quadruped Ambulation 30 0 1 2 3 4 s/R Figure 3.7: Plot o f f = £ . possible. Further, it shows why consideration of the actual swing time to swing distance relationship was not necessary throughout this analysis. Such consideration would have made the analysis unnecessarily complex, and when it was made, merely added to the general trend of the findings. It is interesting to note that f also decreases if R is increased. This is because, with a longer radius of swing, the same angular change results in a larger forward foot movement. Such a change in the design of a machine involves other considerations however, such as the additional force required to support the longer extension. These issues are discussed in Chapter 5. Based on all of the results considered above, it was felt that the best strategy for determining the stride length was to make it as long as possible within the physical constraints of the walking machine concerned. Chapter 3. General Characteristics of Quadruped Ambulation 31 3.6.5 The effect of altering the machine stance width Increasing the stride length resulted in the longest possible external edges on the connected stability triangles. Now consideration will be made of how the maximum speed of the machine is affected by altering the lengths of the other two edges, the front and back ones. These edges are lengthened simultaneously by increasing the width of the machine stance, w. Changing the width of the stability triangles does not have a significant effect on the stability triangle pattern, and has no effect at all on the distance travelled across each triangle. The pattern becomes wider as the stance does, but the number of triangles necessary for a given distance of forward movement is not altered. Thus the number of creeping distances that must be crossed is not altered either. Widening the stance does affect the creeping distance itself however, as seen in Figure 3.8. As the stability triangle becomes wider, its front and back edges tend toward being perpendicular to the direction of travel. As this happens, the creeping distances, which are a result of the contact between the circular stability margins and the edges, decrease in size. The extreme result of this process is that the creeping distances become simply the radial line from the center of the stability margins to their contact point on the stability triangle edges. In this case the creeping distances become equal to the stability margin. Using similar triangles, the relationship between the various lengths is: c _ V* 2 + w stability margin w Which can be altered to: c = stability margin • (3.19) Thus the larger w is made in relation to «, the smaller c becomes. The benefits of decreasing c in relation to s, in terms of increasing maximum velocity, were described earlier in this section. The changes that are possible in the size of c are somewhat restricted however, and making them by increasing w may not be as effective in increasing velocity as simply extending the stride length. So while having a wide stance is preferable, it is not a high priority. Other reasons for altering the stance, such as improving lateral stability, would be of more importance in a practical machine design. These issues will be discussed further in Chapter 5. (3.18) Chapter 3. General Characteristics of Quadruped Ambulation 32 Figure 3.8: The Effects of Stance Width on the Creeping Distance Chapter 4 Heuristic Specification This chapter will explain the details of the LOGHAQ heuristic package, beginning with the overall heuristic structure. The heuristics operated in a cyclic fashion performing the following basic functions: 1. Determine the joint angle changes made by the machine in the last sample time, and assess the effects of these changes on the position of the machine in space. 2. Check to see if the swinging leg has touched down. If so, plan the overall movement of the machine accordingly and determine the foothold for the next swing leg. 3. Check the stability status of the machine. If it is about to become unstable, halt it. If it has entered a new stability triangle, lift its swing leg. 4. Use the overall movement plan to calculate the machine speed over the next sample time. 5. Use the planned speed to determine the swing leg joint angles that will move the leg smoothly towards the foothold. Calculate the number of sample times required for this to take place. 6. Use the planned speed to determine the body translation. Use the number of remaining sample times to determine the body attitude and orientation changes. 7. Determine the joint angles necessary in the support legs to produce the desired translation, and the desired attitude and orientation changes. 8. Use the desired joint angles calculated to drive a machine dynamic controller. The second function performed, that of planning the overall movement and determining the new foothold, was the only one that involved any long term planning. This function was used only when a foot had just been placed, an event that resulted in an entirely new machine state. The rest of the functions were performed continuously, every sample time, and used the overall movement plan as a guide. These functions used the current machine state to calculate a movement plan for just the next 33 Chapter 4. Heuristic Specification 34 sample time. It was not assumed that the short term plans of these functions would be followed exactly by the machine dynamic controller. These plans were completely recalculated every sample time. 4.1 The Overall Heuristic More specifically, the overall heuristic operated as follows: repeat: Assess Movement, both translational and rotational, from last sample, Calculate Predicted Body Orientation Vectors from target angles if Swing Leg Kinematic section previously indicated possible touchdown: check foot sensors to see if this has occurred if touchdown has occurred: set LIFTED to false set HALTED to false Update Swing Leg if either front leg was swinging: do Half-Cycle Movement Planning Calculate Target Angles for body when new foot is placed re-Calculate Predicted Body Orientation Vectors from target angles make new Foothold Determination if machine is not HALTED: Check Stability if machine has reached edge of stability region: set HALTED to true if machine was creeping and reached new stability triangle: set LIFTED to true if machine is still not HALTED: make Speed Calculation otherwise: set speed to 0 Chapter 4. Heuristic Specification 35 if o leg is LIFTED: calculate Swing Leg Kinematics at specified speed (while doing so return number of sample times remaining for swing) otherwise: Approximate Step Times Remaining in half-cycle movement if swinging leg cannot reach foothold and machine is HALTED: Adjust Attitude to reach foothold calculate Body Kinematics using speed and remaining sample time values if the machine cannot move because a leg is at the end of its movement range: set HALTED to true if either rear leg is swinging: Prevent Leg Collision from resulting from planned changes Each of the tasks indicated with capital letters in the above pseudo-code constituted a component heuristic of the LOGHAQ package and will be elaborated on in the following sections. To begin with, the coordinate system used will be described, as well as the extensively used "orientation vectors". It should be noted that, for the purpose of clarity, many of the small details of the heuristics have been omitted in the following sections. The complete heuristics, in the form of "C" code, can be found in Appendix C. 4.2 C o o r d i n a t e S y s t e m Speci f ica t ion All points of concern to the LOGHAQ heuristics were specified in a Cartesian coordinate system with its origin maintained at the center of the machine, as shown in Figure 4.1. The x and y axes of this coordinate system remained horizontal at all times, regardless of the attitude of the machine, and the y axis always pointed in the direction of the longitudinal axis of the machine. The attitude of the machine was described with two angles, tj) and <r. t{> was the angle between the longitudinal axis of the machine and the y axis, and was positive when the front of the machine was tilted upward. <r was the angle of rotation of the machine body about its longitudinal axis. It was zero when a line running across the breadth of the machine was horizontal, and became positive as the right side of the machine rotated higher than the left side. These two angles were specified to match what the output of a gyroscopic leveling device would be if its outer axis were made parallel to the longitudinal axis of the machine. Chapter 4. Heuristic Specification 36 Its outer axis rotation would then be cr, and its middle axis rotation ip. Its inner, spin axis would be vertical. The heuristics made use of no other coordinate systems. To maintain the validity of this coordinate system as the machine moved, all points of concern to the heuristics were recalculated each sample time to compensate for any translational or rotational movement. This was not an excessively time consuming task, as there were only two points of significance. These were the new front foothold location, Pj, and the planned final location of the machine at the end of the half-cycle, Pp (to be described in Section 4.7). There were also two orientation specifying angles that required only rotational compensation. 4.3 The Orientation Vectors The orientation vectors were used extensively throughout the LOGHAQ heuristics. They consisted of three orthogonal unit vectors that specified the attitude of the machine. One ran forward along the longitudinal axis of the machine, A, another ran laterally across the machine from the left to the right side, 5, and the third was normal to the machine platform, N (see Figure 4.1). These vectors were calculated from the attitude specifying angles as follows: t . = 0 (4.1) ja = cos ip (4.2) ka=sinip (4.3) i, = cos cr (4-4) j, = sin cr sin ip (4-5) kg — — sin cr cos ip (4-6) N = SxA (4.7) 4.4 The Assess Movement Heuristic After machine movement occurred during a sample time, the Assess Movement heuristic determined the changes to the position of the machine in space. It recalculated the positions of the feet of the machine from the leg joint angles, used the new positions to determine how the machine had moved, and performed compensatory translation and rotation of various points. Chapter 4. Heuristic Specification 37 Figure 4.1: The Coordinate System Used Chapter 4. Heuristic Specification 38 The only information the LOGHAQ heuristics had about the position of the machine in space was the gyroscopic attitude indication, and the location of the supporting feet. It was assumed that the feet were firmly planted and could only move insignificant distances. Using this assumption, the Assess Movement heuristic determined the machine movement by comparing foot locations before and after the sample time. The resulting movement estimate was used to do the compensatory translation and rotation of the relevant values. The heuristic only considered the three firmly planted supporting feet, not the foot of a swinging leg or a leg that had just finished swinging. This latter specification ensured that the feet it used for its calculations had as much time as possible to settle firmly into new footholds. The heuristic operated as follows: The Assess Movement Heuristic calculate the orientation vectors with the current tp and o~ calculate the new location of each foot: a = it — e — <f> (see Figure 4.2 for clarification) da = (Lu cos <j> + LL cos a) sin 6 (Lu and LL are the upper and lower leg segment lengths) d, = {Lu cos <f>+ LL cos a) cos 9 dn — Lu sin <j> — !/£, sin ct J — A • forward distance to shoulder + 5 • lateral distance to shoulder D - Ada + Sd, + Ndn PLt = J + D calculate the horizontal angular difference between vectors running between pairs of new support foot locations and old support foot locations, where xn and yn are foot coordinates: Ap = tan-x[(y2 - y[)/(x'2 - x[)] - tan-1[(y2 - yi)/{x2 - a>i)] average the three differences calculated for an overall rotational estimate deduct this amount from the planned and target rotational angles required in the remainder of the half-cycle (to be described in Sections 4.7 and 4.8 respectively) do a compensational rotation of Pj, Pp, and the old support foot locations by this amount calculate three dimensional translation between old (compensated) and new support foot locations average these three translation values for an overall translation estimate do a compensational translation of Pj and Pp by this amount obtain speed measurement by determining magnitude of translation Chapter 4. Heuristic Specification 39 The rotations were accomplished by setting: x' — \/x2 + y2 cos t^an 1 —^) + desired rotation) (4-8) y' = \Jx2 -\-y2 sin ^tan - 1 —^) + desired rotation) (4-9) 4.5 The Calculate Predicted Body Orientation Vectors Heuristic This heuristic was responsible for calculating the predicted orientation vectors of the machine. That is, it determined what these vectors would be if the machine achieved, when its next footfall occurred, the target attitude and orientation angles, i/)t, <rt and pt (see Section 4.8). These vectors were used in many of the other heuristics and had to be kept up to date. Machine rotations caused them to become invalid after every sample time. They could have been rotationally compensated in the Assess Movement heuristic, but they were used so widely that it was felt best to recalculate them. This also prevented cumulative errors. In addition, limitations were placed on the angular velocities of the machine movement during each sample time. If, with these limitations, there were not enough sample times left in any phase of machine motion to reach the target angles, this heuristic compensated accordingly. It determined the angles that the machine could reach in the remaining sample times, and it used these to calculate the predicted orientation vectors. The remaining sample times in the movement phase were calculated in the Swing Leg Kinematics heuristic, and passed to this heuristic as the variable "REMAINING". The calculation of the predicted orientation vectors was made using Equations 4.1 to 4.7, and the achievable target attitude angles. After this was done, each of the three vectors was rotated about the z axis by the target orientation angle, pt (using Equations 4.8 and 4.9). This heuristic also determined the predicted shoulder location of the swing leg when the next footfall occurred. This was calculated by simply multiplying the predicted body orientation vectors by the appropriate machine dimensions and adding them together for each leg (see Figure 3.1): Jp = Ap • forward distance to shoulder + Sp • lateral distance to shoulder (4-10) The predicted swing leg shoulder location was used by both the Speed Calculation and Swing Leg Kinematics heuristics. Chapter 4. Heuristic Specification 40 Figure 4.2: Conversion of Joint Angles Into Shoulder to Foot Offset Distances Chapter 4. Heuristic Specification 41 4.6 The Update Swing Leg Heuristic When a foot touchdown occurred this heuristic determined, using the quadruped crawl sequence, which leg should next be lifted. In addition, it maintained a running estimate of the expected final horizontal angles when the front feet touched down. This estimate was used in the Speed Calculation heuristic. When a front foot was placed, the horizontal angle at which the placement occurred was merged into the running estimate as follows (where the prime indicates the new value of the variable): e!}' = 6J + (ej - fl]) • learning rate (4.11) This was done independently for each of the two front legs. 4.7 The Half-Cycle Movement Planning Heuristic 4.7.1 Trajectory planning As described in Section 3.4, the machine movement plan over a half-cycle was based on the triangle defined by the three footholds of the stability triangle. There were two aspects of movement planning that had to be considered, the trajectory of the movement, and the final attitude of the machine body. The trajectory was calculated by first determining the ideal final location, Pi, of the machine at the end of the half-cycle. The ideal location was to have the machine center of gravity right at the front edge of the stability triangle. To keep its lateral movements reasonable, the point half way along the front edge of the stability triangle was chosen as Pj. So Pi was calculated by simply averaging the coordinate values of the two footholds that defined the front edge of the stability triangle. The desired machine height, h, was added to the z value thus obtained to keep the machine that distance above the ground. It should be noted that adding to the z value in this manner foreshortened the actual ground clearance distance when the machine was on anything but level ground, but, as described by Lee and Orin (1986c), this increased the stability of the machine when crossing sloped terrain. The following were the calculations required: * = ^ <4-12> * = ^ (4-13) « = (4.14) Chapter 4. Heuristic Specification 42 Once Pi had been determined, it was merged with a point reflecting the old trajectory of the machine, P0. Doing so prevented the machine from making drastic alterations to its trajectory as a result of one inconsistent stability triangle. P„ was determined by first rotating the current forward orientation vector, A, about the normal orientation vector, N (these were calculated using Equations 4.1 to 4.7). The amount of rotation was the turning rate specified by the operator, pc. The three dimensional rotation of the orientation vectors was accomplished with the following: £= j-j^P' (4.15) \A — Stan p c | S'= i+XJ™P< (4.16) |S + ,4tanp c| These equations were made simpler by the fact that the orientation vectors involved were unit vectors. The results of the calculations were also unit vectors. The vector generated by the rotation was then multiplied by \Pi\ to produce P0. The coordinate values of P„, thus determined, were merged with those of Pj using the following settling formulas: ajp = x0 + (x{ — x0) • movement settling factor (4-17) yP = y0 + (j/i — y0) • movement settling factor (4-18) zp = z0 + (zi — z„) • movement settling factor (4-19) With the result being, Pp, a point that indicated the planned center of gravity location at the end of the half-cycle, and thus the planned trajectory. 4.7.2 Attitude and orientation planning A planned machine body attitude for the end of the half-cycle was also determined by this heuristic. As stated in Section 3.4, the desired attitude and rotational orientation of the machine were determined by the stability triangle. The ideal rotational change angle, p,-, and tilt angle, fa, were calculated by considering the vector that ran between the two feet on the external (or unmoving) side of the stability triangle, L. This vector specified the orientation that machine body should have at the end of the half-cycle. From it, pi and if>i were calculated as follows: Pi = tan- 1 l^j (4.20) Chapter 4. Heuristic Specification 43 j>i = tan- 1 | -J^ ) (4.21) To calculate the ideal roll angle, o~i, another vector was generated, C. This vector crossed from the rear foot on the unmoving side of the machine to the front foot on the other side. From it, o~i was determined as follows: U = CxL (4.22) # = £ x | 0 , 0 , l | (4.23) V = H xL (4.24) ,t=in-i(0'*M*A (4.25) \(U.V)/\V\) The three ideal angular values were then merged with angles representing the old machine attitude and orientation. These latter angles were also calculated using Equations 4.20 to 4.25, but P0 was used for the orientation vector, L, and the normal orientation vector, N, was used for U. The ideal and old angles were merged as follows: pp — p0-\- (p,- — p^ • rotational settling factor (4.26) ij)p = iji0 + (Y>i — TJ)g). tilt settling factor (4.27) <rp = <r0 + (<Ti — <r0) • roll settling factor (4.28) 4.8 The Calculate Target Angles Heuristic The target angles, -0t> °~t a n d pt, were the attitude and rotational orientation specifying angles that the machine attempted to adopt before each new leg placement was made. They were derived simply from the planned angles, i[>p, <rp and pp, that were calculated in the Half-Cycle Movement Planning heuristic. The target angles for when the rear foot was placed were defined as angles half way between the current ones and the planned ones. The target angles for when the front foot was placed, and the half-cycle ended, were defined as the planned angles. Chapter 4. Heuristic Specification 44 4.9 The Foothold Determination Heuristic As described in Section 3.4, the movement plan that the LOGHAQ heuristics developed was based en-tirely on the footholds presented to them. The location of these footholds was thus of critical importance. This section will consider how the Foothold Determination heuristic guided a foothold scanning system so that reasonable foothold choices were made. 4.9.1 Rear foot placement The follow the leader gait eliminated the need to consider the footholds required for the rear feet, they simply fell in behind the front feet. Their location was determined by moving back from the front feet a short distance in the reverse direction of the predicted forward orientation vector. This distance, the "following distance", was empirically chosen so that the feet were as close together as possible, with a large enough margin between them to prevent the two legs from striking each other. If leg 3 was being lifted, the foothold for it was calculated as follows: Pf = Pi - i p • following distance (4.29) 4.9.2 Front foot placement general requirements The foothold locations for the front feet were a much larger concern. They had to be chosen to facilitate continuous smooth, stable movement of the machine. The footholds could not be chosen too far forward, or too close, and they had to produce a series of stability triangles that at least generally lead in the direction chosen by the operator. The footholds also had to be placed within a reasonable lateral proximity of the machine. Meeting all of these criteria, especially when the machine was being instructed to turn, was the most difficult part of the work done in this study. The movement of the machine body followed from the footholds, and if they were not placed so that a smooth flow of motion could be maintained, the machine inevitably reached an unworkable situation. The main difficulty in determining the footholds was that they could not just be chosen as desired. The assumption was made, throughout the heuristic development, that some sort of scanning system would actually make the choice. This system would operate in parallel with the LOGHAQ heuristics, searching for reasonable footholds in the general area desired. The task of the Foothold Determination heuristic was to guide the scanning system's search. To do this it provided three pieces of information to Chapter 4. Heuristic Specification 45 the scanning system. One was the normal vector to a plane, K. This plane was more or less vertically oriented, and the foothold search was to take place in it. The second piece of information was an actual point in this plane, P,, that indicated the lateral displacement of the plane from the machine, and the point from which the search should proceed forward. That is, the scanning system had to return a foothold that was ahead P,. The last piece of information was a maximum distance, dm, that the foothold could be away from P,. After the search was completed using this information, the scanning system simply returned the new foothold location, Pj. 4.9.3 Front foot placement strategies Two main strategies were used in guiding the front foothold selection. One was that the foothold should be located ahead of the other front foot by roughly the stride length, s. Not having such relative positioning between the two front feet resulted (in earlier versions of this heuristic) in the separation between them decaying as placement errors accumulated. This eventually lead to distortion of the stability triangle pattern. Such a condition occurred for example, if the forward placement distance was made relative to the old foothold on the same side of the machine. The footholds on the two sides of the machine eventually got out of alignment. So to maintain a consistent stability triangle pattern, it was critical that new footholds be located relative to the front foot on the other side of the machine. The other strategy that was used was to locate the footholds at a fixed "lateral foot placement distance" from the machine, d\. This lateral spacing was not made from the center of the machine, but from a point under the center by the distance h. As shown in Figure 4.3, if the machine had any roll to it, to keep the horizontal projection of the center of gravity half way between the horizontal projections of the feet on both sides, the footholds on the machine's lower side had to be further away from it than those on its upper side. Placing the footholds at lateral distances relative to the point under the machine ensured this. The equal spacing of the horizontal projections was necessary to maintain a consistent stability triangle pattern. 4.9.4 Determining the placement plane Immediately after each front foot placement was made, a new stability triangle was formed, and the machine started a new half-cycle in which it crossed this triangle. To guide the choice of this foothold location, the Foothold Determination heuristic had to determine ahead of time what the trajectory of the machine would be in the new half-cycle. The planned trajectory for the new half-cycle was determined Chapter 4. Heuristic Specification 46 Figure 4.3: Compensation of the Lateral Foothold Spacing Under Roll Conditions Chapter 4. Heuristic Specification 47 by the stability triangle corner locations, as explained in Section 4.7, but it was determining one of these corner locations that this heuristic was concerned with. So the planned trajectory could not be known. It could be estimated however. When the transition was made from the old half-cycle to the new one, the trajectory of the machine was denned by the predicted forward orientation vector, Ap. So to estimate the trajectory in the new half-cycle, the predicted forward orientation vector was rotated about the predicted normal orientation vector by the desired turning rate specified by the operator, pc (Equations 4.15 and 4.16 were used to do this). The result was A. Estimating the trajectory in the new half-cycle in this fashion was reasonable. This is because the Foothold Determination heuristic was mainly concerned with the rotational orientation of this trajectory, and the rotational orientation was not greatly affected by the actual foothold location chosen. There were two reasons for this. The first was that, as will be explained in Section 5.6, the rotational settling factor used in the Half-Cycle Movement Planning heuristic was kept very small. Thus the rotational orientation of the trajectory was determined almost entirely by the desired turning rate specified by the operator. The location of the new front foothold affected it little. The second reason was that this heuristic attempted to place the foothold so that it would be in line with the estimated future trajectory. Thus the foothold was even less likely to perturb the actual trajectory away from the estimated one. Determined in a manner identical to the estimated trajectory, the estimated lateral orientation vector, S, was normal to the plane in which the machine would move in the new half-cycle. If it followed the estimated trajectory, the center of the machine would move forward in this plane from around the Pp of its current half-cycle towards the Pp of its new half-cycle. For the new foothold to be a fixed lateral distance from the center of the machine, it had to fall in a plane parallel to the one that the center of the machine was going to move through. Thus: K = I (4.30) 4.9.5 Determining the search starting point To ensure that the new foothold was the stride distance ahead of the front foot on the other side of the machine, the point in the placement plane defined by K had to be determined that was laterally opposite the other front foot. This point, P0, was along a line in the direction of K that started at the other front foot. Now, as stated above, the footholds had to be chosen at distances laterally offset from a point under the center of the machine by a distance of h. This point effectively defined a center Chapter 4. Heuristic Specification 48 plane, whose normal was K, that the footholds had to be spaced laterally from. So this center plane was parallel to the placement plane, and the two were separated by the lateral foot placement distance, dj. Figure 4.3 clarifies this. The line from the other front foot intersected the center plane perpendicularly and at point P c. If foot 2 was to be placed, Pe was calculated as: Pe = Pl + K{{{Pv-hk)-Pl)»K) (4.31) Where k was a unit vector in the vertical direction. From Pe, P0 was calculated: P0 = Pe + Kdi (4.32) Equations 4.31 and 4.32 were combined to produce: P 0 = P i + ^ ( ( ( P p - M ) - i J 1 ) » - ^ + ^) (4-33) Once P0 had been determined, P, had to be calculated from it. The initial strategy used was to simply set P, equal to P„ and set the maximum separation distance, dmt to s. The foothold search then began from P 0 and was constrained to be within the stride length. This did not work however, because there was a minimum distance that P, had to be in front of the last foothold on its side of the machine. If the footholds were too close, as shown in Figure 4.4, the stability triangle could not support the machine. There had to be enough space in the center of the triangle for the complete circular stability margin and, as will be explained in the next section, the following distance. If there was not, the machine would stop at the front edge of the new stability triangle, and would still require the old triangle for stability. Thus the rear leg that defined that triangle could not be lifted. To ensure that the minimum distance requirements were met, the horizontal projection of the line between the two feet that defined the back end of the stability triangle was determined. If foot 2 was being placed: y = y±^VL{x _ X i ) + y i ( 4 3 4 ) XA — Xi y = m(x — xi) + yi if: m = — — — (4.35) Xi - Xi The line running from P 0 in the direction of the horizontal projection of A was specified parametrically as: Chapter 4. Heuristic Specification 49 Figure 4.4: Minimum Stability Triangle Size Chapter 4. Heuristic Specification 50 x =iit + x„ y — j&t + y0 (4.36) The intersection of the two lines was then determined by combining the two equations: t = mX° ~ m X l ~y° + V l (4 37) j a — min Referring to Equation 4.36, it is apparent that —tyjt^ + jf was the distance from P0 to the back side of the stability triangle along the horizontal projection of A. Now, by considering similar triangles, the total distance from the back side of the stability triangle to P, along the horizontal projection of A had to be roughly: 2(2 • stability margin + following distance) (4.38) From this, the distance that the two footholds were already separated could be subtracted. This produced a required minimum distance along A of (with the following distance added in twice more for an extra margin): 4(stability margin + following distance) t\J*i + i\ dc0 = , (4.39) 4(stability margin + following distance) . . «co = , 1-1 (4-40) Where the denominator in Equation 4.39 converted the horizontally projected separation distance into a distance actually along A. Finally: P,=P0+ Adco (4.41) 4.9.6 Determining the maximum forward placement distance With P, and K determined, it remained only to calculate dm, the maximum distance that Pj could be away from Pt. The determination of dm depended on whether the foot that was being placed was on the inside of a machine turn or not. As shown in Figure 4.5, during machine turning, the inside footholds had to be closer together. This was because the two sides of the machine were following circles of different radius. The strategy adopted during turning was to space the outside footholds apart by twice the stride Chapter 4. Heuristic Specification 51 length, and to space the inside footholds by less than 2s. Now assuming that the stability triangles on the outside of a turn were perfectly shaped, from Figure 4.5: So, for an inside triangle: a = t a n - M - ) (4.42) "= t «- 1 UJ-^ (4-44) dm =6tan(/3) - d„ (4.45) drn = 6tan(tan - 1 (^j^J ~ Pc) - deo (4.46) Where b was simply derived from Equation 4.33 as: b = K(((Pp - hk) - P f r o n t f o o t) . K + d,) (4.47) To compensate for any movement of Ps away from P0, dco was subtracted in Equations 4.45 and 4.46. When dm had been calculated, it was checked to see if it was less than zero. If so, the operator specified turning rate was requiring that the foothold be placed behind P,. This was not allowable, so dm was set to zero and a new turning rate was calculated by reversing the process above: (4.48) This revised turning rate, p a , was temporarily used by the Half-Cycle Movement Planning heuristic in place of pc, when the next half-cycle began. This allowed this heuristic to make a movement plan that better suited the foot placement that had been made. When the turning rate was modified in this fashion, a message was sent to the operator advising him that he was attempting too difficult of a turn on the current terrain. If 2di and b were set to w, Equation 4.48 could also used to determine the maximum rate of turning. On flat terrain, with perfectly shaped stability triangles, this was defined when: dco = 2(stability margin + following distance) (4.49) Chapter 4. Heuristic Specification 52 Figure 4.5: Stability Triangle Sizing During Machine Turning Chapter 4. Heuristic Specification 53 If the foot placement was occurring on the outside of a machine turn, or if no machine turning was taking place, dm was set to: dm = s-dco (4.50) Where deo was again subtracted to compensate for any movement of P, away from P0. A check was also made to ensure that the new foothold would not be too far away from the last one on that side: d t = (P, - Pizst foothold) • & ( 4 - 5 1 ) if: dh + dm> 2s then dm = 2a-di (4.52) 4.9.7 Scanning system following of the placement rules In the manner described above, K, P, and dm were calculated. These values were passed on to a scanning system that located the actual foothold, Pj, and returned its position. The scanning system sought the foothold in the vertical plane defined by K and P,, and it restricted its search to the area in front of Ps. It attempted to locate the foothold at a distance dm away from P,. These rules did not have to be strictly followed however. Realities of the terrain, such as roughness, small obstacles, and unfirm areas, could result in footholds being chosen that were not in the specified plane. The distance to the foothold could also be highly variable. Although it was preferred if Pj was exactly dm in front of P,, it could be closer. This was expected to occur. Pj could also be further away than dm, although this was less desirable, as the risk of a leg over-extension increased. One rule that could not be broken was that Pj always had to be in front of Ps. If it was not, a machine failure would inevitably result. 4.10 The Check Stability Heuristic This heuristic simply determined whether the machine was within the stability region defined by its supporting feet. To be stable, the horizontal projection of the center of gravity of the machine had to be within the horizontal projection of the region defined by the supporting feet. Given an indication of which legs were actually supporting the machine, this heuristic returned a binary value indicating whether the machine was stable or not. To determine this, it performed simple vector calculations to find the distance from the machine's center of gravity to the closest stability region edge. For example, Chapter 4. Heuristic Specification 54 consider how the calculation was made for the edge running between feet 1 and 3. The horizontal projection of the vector defining this edge was: ie = x3-x1 Je = 2/3 - 2/i (4.53) Now the perpendicular to this edge was: h =3t JP = (4.54) So the distance to this edge along the perpendicular to it, was determined by projecting a vector to either of the two feet defining the edge unto P: _i_V1.P _*Jr + yijP _xj -yiit ( 4 5 5 ) These distances were calculated for each supporting edge, and the smallest distance then had to be greater than the prescribed stability margin for the machine to be verified as stable. There was one special case dealt with by this heuristic. When the machine was approaching the edge defined by the two front feet while one of its rear feet was being swung, the required distance to that edge was increased. That was because when the rear foot placement was made, the foot was placed behind the corresponding front foot by the following distance. When the front foot was lifted, this rear foot location defined the new front edge of the stability region. This had the effect of shifting the front edge back slightly (Figure 3.2 clarifies this). So if the machine had moved right up to the front edge of the stability region before the exchange of the rear and front feet, it would have been immediately defined as unstable. To prevent this, the required stability margin for this edge was increased by the following distance. This extra margin was more than enough because the center of the stability region edge, the place where the machine would likely contact it, only shifted back by roughly half the following distance. 4.11 The Speed Calculation Heuristic The three heuristics that performed the bulk of the calculations necessary to determine the desired joint angles for each sample time were the Speed Calculation, Swing Leg Kinematics, and Body Kinematics heuristics. The rest of the heuristics were concerned with longer term planning, determination of machine Chapter 4. Heuristic Specification 55 status, or simply aided these three heuristics. The Speed Calculation heuristic only determined one value, the desired speed of the machine, v,-, but all of the other sample time motion planning was based upon this. To determine the desired joint angles of both the swinging and supporting legs, the speed, and thus the time required before the machine reached various target points, had to be known. The speed also had to be carefully determined to ensure smooth body motion. For a given half-cycle of movement, the speed calculation was largely based on the time required to swing the two legs into place. As the distance to Pp, the planned center of gravity location at the end of the half-cycle, was known, the time required to cover this distance had to be determined. This time, as discussed in Section 3.6, depended entirely on the time required to swing the two legs. So accurate estimates of the swing times were essential. 4.11.1 Determining the termination point The first point considered in the speed calculation was that the denned final center of gravity position, P p , was not a realistic one. It was a location on, or near, the edge of the stability triangle and could not be approached at the end of the half-cycle. If the machine had done so, it would simply have had to halt some distance away from it to avoid becoming unstable. Halting in this manner every half-cycle would have resulted in a very inconsistent "ride". So a new termination point, P t , was calculated that was a "buffer distance" back from the stability region edge, but in the same direction as Pp. The buffer distance was empirically chosen so that it was large enough to prevent the machine from having to halt, but not so large that the machine ended the half-cycle at a point far behind where it could have safely moved: ^ ^ i ^ j ^ A ( 4,6 ) The termination point could have been calculated in a different manner. It could have been deter-mined once when Pp was, and then moved relative to the machine by the Assess Movement heuristic in the same manner as Pp. It was felt however, that even if the machine moved laterally and vertically off the original trajectory denned by Pp, it should always keep heading towards this point. Thus Pt constantly had to be recalculated to be in the direction of Pp. Chapter 4. Heuristic Specification 56 4.11.2 Speed calculation during the front leg swing phase Once Pt was determined, one of three strategies was followed to calculate the leg swinging time. This depended on what phase of the half-cycle movement the machine was in. The first phase was when the machine was creeping forward so that it could swing its rear leg. The second was when this leg was being swung. The third was when the front leg was being swung. If the front leg was being swung, the ideal speed of the machine was simply that which would bring it to Pt in exactly the time required to complete the leg's forward swing. The forward swing time of the leg depended on its horizontal angular change. As the current position of the leg was known, only the final angle of the leg had to be determined. This was calculated by first constructing a vector from the predicted shoulder location, when the foot touched down, to the foothold (see Figure 3.1): Dp = P f - {Pt + fp) (4.57) Then 6J was determined as follows: Including the calculation of the time required for the leg to swing forward, the ideal speed was calculated i{ = -L (4.59) Wmax vi=1-^ (4.60) ** . 4.11.3 Speed calculation during the rear leg swing phase If the rear leg was being swung forward, a more complex calculation had to be made. This complexity resulted from the fact that there was no specified position that the center of gravity had to be in when that leg touched.down. It was possible to determine this position however, so that a constant speed would be maintained throughout both leg swinging phases. During the rear leg swing phase, the center of the machine moved an arbitrary distance, dr, towards the termination point, Pt. During the front leg swing phase, its center moved the remaining distance, df, to the termination point: \Pt\ = dr+df (4.61) Chapter 4. Heuristic Specification 57 So to maintain constant speed: i ~ v. (4.62) Which was manipulated into a proportionality equation: Now if a future body position was specified for when the rear leg touched down, it was trivial to calculate the distance that had to be travelled to that position, 0%. The swing time of the rear leg, tr,, could also be calculated, in a manner identical to that of the front leg swing time calculation (using Equations 4.57 to 4.59). The difficulty lay in determining the total swing time, as the front leg swing time, t{, was not known and could not be known. This was because the final angle of that swing depended on where the new front foothold was to be, a determination not made at this point. It was possible to calculate the starting angle of the front leg swing from the rear leg placement angle, but the final angle had to be estimated. This was done by considering previous front leg placement angles. Over terrain of consistent attitude, it was expected that there be some consistency in the final angles. This was because the machine, with its relatively fixed stride length, should pass through roughly similar states as it completes each walking cycle. So an estimate of the typical final angles was maintained, in the Update Swing Leg heuristic, for each of the two front legs. There was some question as to whether using an estimated value for was reasonable. There was little choice though, as it was not possible to get an actual value. Further, the speed calculation that used this value did not have to be highly accurate during the rear leg swing phase, so errors in the estimate were not an enormous concern. This was because, as stated, the machine position at the end of this phase was arbitrary. It was only the speed consistency between the rear and front foot swing phases that was affected by speed miscalculations. The starting angle of the front leg swing was calculated from the predicted final angle of the rear leg swing, as shown in Figure 4.6. Ignoring the slight difference in the position of the two feet, the follow the leader gait ensured that: d{=<r, = £>;.§; (4.64) Chapter 4. Heuristic Specification 58 d{ = distance between shoulders of two legs — cTa (4.65) d{ — distance between shoulders of two legs — Dp • ATp (4.66) From these values the following was calculated: 6{ = tan"1 ( | ) (4.67) t{ = -j—%- (4.68) So given a machine body position where the rear leg was to touch down, and the equations derived above, the swing time values that would result from this position could be determined. The inverse was not true however, as there was a nonlinear relationship, due to the inverse tangent calculation, between the distance and time equations. That is why Equation 4.63 was put in a proportional format. The proportional value, p, had to be solved iteratively. This was accomplished with a binary search algorithm that went through 20 cycles. The algorithm attempted to match pj, the distance proportionality factor, and Pi, the time proportionality factor. It operated as follows: The Algorithm to Determine Speed When a Rear Leg is Swinging set UPPER to 1, LOWER to 0 repeat 20 times: pd = I( UPPER + LOWER) set Pt to PdPt (effectively dr) in Equations 4.57 to 4.59 to determine tra use Equations 4.64 to 4.68 to determine t{ pt = <:/(<:+<;) ifPt < Vv-the machine travelled too far resulting in swing being too small, so set UPPER to pp to keep search below this value otherwise set LOWER to pp for converse reason After this search ended, the final values of tTt and PdPt (effectively dr) were used to determine the ideal speed in Equation 4.60. The speed calculated in this manner should remain consistent throughout the remainder of the half-cycle. Chapter 4. Heuristic Specification 59 Figure 4.6: Positioning Relationships When the Rear Foot is Behind the Front Foot It should be noted that the iterative search covered a complete range. It sought a proportionality value between 0 and 1, covering all of the possible machine positions along the line to Pt. A valid position was sure to exist along this line as long as the initial location of the rear foot was behind its new foothold. In fact, there were an infinite number of positions available, each of which represented various combinations of machine and swing leg motion. The purpose of the iterative search was to find the one combination that met the requirement of producing consistent speed throughout the remaining two phases of the half-cycle. 4.11.4 Speed calculation during the creeping phase The final phase of machine motion that had to be considered during the half-cycle was when the machine was creeping. During this period, the machine was moving forward so that the rear leg could begin its swing. The creeping phase was one in which very high forward speed was possible. As all four legs were placed, the forward swinging time of a leg that was repositioning was not the limiting factor. The four legs could have driven the machine forward at near their maximum angular speeds. As discussed in Section 3.6, this would have resulted in a machine speed roughly three times that of when a leg was being swung. It was decided that operating the machine at such speeds was not advisable however. Doing so Chapter 4. Heuristic Specification 60 would have resulted in large accelerations at the beginning and end of the creeping phase, disrupting any speed consistency. The strategy adopted was to set the speed during this phase to the higher of the two speeds before and after the phase. As the speed before the creeping phase was known, it remained to estimate the speed during the upcoming rear leg swing phase. The speed during the rear leg swing swing phase, vr, was estimated by first determining where the machine would be when that phase began. This point, PT, was determined by doing a simple vector calculation to find where the horizontal projection of the line to Pt intersected the horizontal projection of the rear edge of the next stability triangle. If leg 3 was to be lifted when the machine entered the next stability triangle, the horizontal projection of the rear edge of that stability triangle was defined by the line: y= V 4 ~ V l {x-x1)+y1 (4.69) y - m(x - xi) + yi if: m = MlZJl (4.70) X4- Xl The horizontal projection of the line running to Pt was specified parametrically as: x = xtt y= yti (4.71) The two equations were combined to produce: t=yi~mxi y% - mxt Referring to Equation 4.71, it is apparent that t\/x\ + yf was the distance to Pt. Now the machine would not start its rear leg swing until it had passed the rear edge of the next stability triangle by the stability margin distance. This distance was also a horizontally projected one, so it was added in as follows: Pr = 7777 (t\J*2 + V2 + stability margin) ' f 1 (4.73) Pr = P t ( t + S t & h f l m a f n ) (4.74) Where the last multiplicand in Equation 4.73 converted the horizontal projection total into a distance along the line to Pt-Chapter 4. Heuristic Specification 61 Once Pr had been found, it was used as the current position in the rear leg lift phase speed calculations presented in the previous subsection. These calculations also required a value for the initial horizontal angle of the rear leg, 9\. During the actual rear leg swing phase, the current value of that angle was used, but in this case it had to be estimated. This was done as follows: D = Pswing foot - (PT + fp) (4-75) * < « • > Using PT and &[ in the search algorithm above provided an estimate of the speed that the machine would adopt when it began the rear leg swing. When the speed at the end of the creeping phase had been estimated, vr, the higher of it and the current speed was made the ideal speed, t>j. If vr was chosen, the machine accelerated towards it. If not, the machine maintained its pace. In the latter of these two cases, extra calculations were made to prepare the machine for the end of the creeping phase. As will be described in the next subsection, the LOGHAQ heuristics were subject to maximum acceleration limits. So to ensure that the machine speed was near vT when the rear leg swing phase began, the machine was made to accelerate negatively during the end of the creeping phase. The acceleration required to meet the new speed specification was calculated as follows: dv v? — v"2 , — = , , (4.77) dt 2\Pr\ K 1 When the magnitude of this acceleration was greater than 0.9 times the maximum acceleration per sample time, v% was set to v less the maximum acceleration per sample time. A number of other strategies were explored to determine speed during the creeping phase. Most allowed greater speeds than the finally selected strategy. This was done to take advantage of the high speeds possible during this phase. All of the strategies were found to result in highly inconsistent speeds however, and were thus discarded as viable alternatives. The final strategy selected performed extremely well, except, as will be noted in Chapter 6, when the machine was turning. 4.11.5 Speed control strategies The speed calculations involved one final stage that ensured reasonable machine performance. This stage limited the overall speed changes that could occur during any sample time to defined maximum Chapter 4. Heuristic Specification 62 accelerations. If, as a result of the calculations described in this section, V{ differed from the current speed, v, more than was permitted, it was set to v plus the appropriate maximum acceleration value. In addition, this stage limited the minimum speed to values based on the maximum acceleration. The creeping speed was maintained at three times the maximum acceleration, and the speed during leg swings was maintained at the maximum acceleration. These lower limits were chosen empirically. 4.12 The Swing Leg Kinematics Heuristic Once the ideal speed of the machine had been determined by the Speed Calculation heuristic the position of the machine in the future became known. The machine would simply be a distance along the line to Pp determined by the ideal speed and the time it had to move in. Thus the desired joint angles of the swinging and support legs could be calculated to match this motion. This heuristic determined the desired joint angles of the swinging leg. If the machine was in a creeping phase, this heuristic was not used. 4.12.1 Determining the placement state The swing leg calculations first involved estimating how many more sample times were needed to complete the current leg swing. The basic strategy behind the swing leg control was to swing the leg in the horizontal direction at the maximum angular velocity, u>m a x. The extension and vertical angle movements were then calculated to match the horizontal swing. At the start of the swing, the leg was lifted rapidly to a clearance height. It was kept there until the horizontal swing neared its end, and then dropped down so that the foot touched the ground just as the horizontal rotation finished. Further details on how the three angular changes were made relative to each other will be provided later in this section. The horizontal angle typically underwent the largest change though, so the time required to complete this change had to be determined first. The heuristic did this by assuming that the idea speed determined in the Speed Calculation heuristic would be constantly maintained. Then an iterative approach was taken to determine when the foot would touch down with the machine travelling at that speed: Chapter 4. Heuristic Specification 63 The Algorithm to Determine When the Swing Leg Will Touch Down set VALID to false set REMAINING to 1 set Atrial t° & °f SVJing leg A r i a l = 10,0,01 (the present location) repeat until a position is VALID or Atrial 9oes weH beyond the horizontal angle limit: -^ trial Ptrial + vi' duration of each sample time(Pp/\Pp\) da = D • Ap (see Figure 4.2 for clarification) d, = D • Sp dn = D*Np 0p = tan"1 (d a/d.) ep = cos_ 1[(X^ + L\ - \D\2)/(2LuLL)} (cosine law) <j>p = tan - 1 (dn/\fd\ + dj) + s in - 1 (LL sinep/\D\) (see Figure 4.7 for clarification) if all of these angles are in the leg movement range set VALID to true ^trial = Atrial + wmax */0[ r i a l < Op set VALID to false (this is the case when there has not been enough time for the leg to swing into place) if VALID is false increment REMAINING To summarize the above, the iterative scheme operated by starting at the current center of gravity location and successively adding, in the direction of travel towards Pp, units of distance equal to those which could be traversed in one sample time at the ideal speed. Simultaneously, the maximum angular change that could occur in one sample time was repetitively added to the initial horizontal angle. Thus the state of the machine at points in the future was estimated. When a state was reached where all the joint angles were within the range of motion of the swing leg, and 9p was less than that of the accumulated horizontal swing, the search was terminated. The first state had been found in which the foot placement could occur. The heuristic also handled cases in which backwards swinging was necessary. It did this by first checking to see if the swing leg, with the machine in its current position, should be swung backwards to reach the foothold. If so, it used the same iterative search algorithm, but subtracted wm ax from 0trial Chapter 4. Heuristic Specification 64 during each cycle instead of adding it. The verification of the size of Atrial w a s &^so reversed. If the swing leg was being swung forward, and the foothold was within reach of the machine, a valid foot placement state would almost always be found that entailed continuous forward swinging. This was because the foot movement can be seen as being composed of two different actions. One was movement in a lateral plane so that the foot was positioned directly behind the foothold, and the other was forward movement to meet the foothold. The latter movement consisted of both the forward leg swinging and the actual machine motion. Now as long as the swing time was large enough for the former movement to occur, there was no way for the foothold to be missed. With the lateral preparations made, the foot moved forward towards the foothold with a combination of machine movement and leg swinging, and when it got to it, simply dropped down into place. Unless the foothold was displaced laterally a large distance, it could not miss the foothold. 4.12.2 Hovering If no valid future state was found in which the foot placement could occur, this heuristic operated under the assumption that as the machine moved forward, the foothold may become accessible. So as the machine continued on at the ideal speed, this heuristic swung the leg into a forward position that would best prepare it for when the foothold was accessible. The extension angle, e, was left as it was when the foot started its swing. The vertical angle, <f>, was set to an empirically defined "ground clearance angle". If either front leg was being swung, 6 was set as close to 9p as possible within the movement limits of the leg. These settings made the leg "hover" over the foothold preparing to reach for it when it became accessible. 4.12.3 Calculating the joint angles with a valid placement state If a valid foot placement state was found, the three swing leg angles were controlled carefully to ensure a smooth swing with a well timed placement. One objective of this control was to keep the leg as high above the ground as possible while it swung, without allowing the vertical movement times to affect the overall swing time. This portion of the heuristic operated as follows, where REMAINING was the number of sample times that were required to complete the horizontal swing (calculated as described previously): Chapter 4. Heuristic Specification 65 The Algorithm to Determine the Swing Leg Joint Angles if the leg has just lifted, increase <j> maximally (the other angles were kept as they were to insure ground clearance) otherwise: calculate sample times needed to make e change to ep if this is > REMAINING, reset REMAINING to this value calculate sample times needed to make <j> change to <j>p if this is > REMAINING, reset REMAINING to this value (these would be unusual, but not impossible events) increase or decrease e maximally until it reaches ep if REMAINING is 1 (foot is ready for placement) or if touchdown already initiated: set 9 to 0p decrease <f> maximally to drop leg activate touchdown sensing otherwise: increase or decrease 6 maximally until it reaches 6p if the sample times required to decrease <j> to <f>p are > REMAINING — margin; decrease <j> maximally otherwise if <j> < empirically determined ground clearance angle: increase <j> maximally correct <f> if it has exceeded either of its movement limits The "margin" included above ensured that the leg began dropping into place a short time before it was absolutely necessary for it to do so. This prevented any movement errors from resulting in a situation where changes to <j>, and not 6, determined the time required for the swing to complete. The margin was set to 2.5 after empirical observation of performance. To prevent jerky motion of the leg in the vertical plane, changes to <j> were passed through an equation that effectively lowpass filtered them: (initiate or continue touchdown sequence) 9' =9 + {9d -9) + A9 2 (4.78) Chapter 4. Heuristic Specification 66 Where O4 was the desired joint angle, and AO was the difference between 0' and 0 during the last sample time. In this manner, given only a speed specification, the Swing Leg Kinematics heuristic determined how the joint angles of the swinging leg should be altered to provide a fast, smooth, ground clearing transition. The heuristic also calculated the estimated number of sample times remaining before foot placement, REMAINING. This value was used in the Body Kinematics heuristic, as will be described Section 4.15. 4.13 The Approximate Step Times Remaining Heuristic During the creeping phase of a half-cycle, no leg was being swung, so the Swing Leg Kinematics heuristic was not used. Thus no value was calculated for the number of sample times remaining before the next foot placement. This value was needed by the Body Kinematics heuristic, and so had to be determined somehow. The Approximate Step Times Remaining heuristic approximated it as follows: \PtI — buffer/cosib REMAINING ~ — —- -4.14 The Adjust Attitude Heuristic The goal of the heuristics described in this paper was to facilitate continuous smooth walking over rough terrain with the highest possible speed. It was possible for the heuristics to fail however. They could place the machine in a state where it had to halt all further forward progress, and where there were no options, available to restart movement. With the many degrees of freedom of a quadruped, it would be an enormous computational task to prevent all possible undesirable states. Doing so was not the goal of the LOGHAQ heuristics, instead it was to guide the machine in a manner that kept it away from such states. This section will consider in detail the conditions that brought about failure and how these were avoided.. It will also describe how some failure conditions were solved using the Adjust Attitude heuristic. (4.79) Chapter 4. Heuristic Specification 67 4.14.1 Preventing failures by making footholds accessible Failures were defined as occurring when a complete halting of the machine took place. That is, when all leg movements had stopped. As the goal of the LOGHAQ heuristics was to maintain smooth walking, this was really the only absolute form of failure that could occur. Inconsistent or excessively slow movement could have been produced by the heuristics, and such was not desired, but as long as movement continued, the heuristics had not completely failed. To be fully halted, the machine must have stopped all movement. In addition, if any leg was swinging, that leg must have halted its swing. This could only occur when the leg could not reach the foothold chosen for it. That is, when the Swing Leg Kinematics heuristic was not able to access the foothold, and had moved the leg to a hovering position above it. If the swing leg could reach its foothold, it moved continuously until it did so. Thus, if a leg was swinging, failure could only occur if that leg was unable to reach its foothold. The purpose of this heuristic was to adjust the attitude of the machine in this case, in an attempt to make the foothold accessible. If this was accomplished, the foot could be placed, and movement could continue. This would prevent a failure. When the machine halted with a swing leg in the air that could not access its foothold, one of two strategies was used to make the foothold more accessible. One strategy determined the attitude adjust-ments necessary when a front foot could not reach its foothold. The other determined the adjustments when a rear foot was unable to touch down. In either case, adjustments were made by replacing the target body attitude and rotational orientation angles with new ones that oriented the machine in a more advantageous direction. Neither strategy included translational movement. Possible adjustments could have included vertical movement, or "backing up", but the former was felt to be unwise without operator control, as the ground clearance was affected, and the latter would not aid in reaching footholds that were already further ahead than the machine could reach. So both strategies were restricted to rotation of the machine about its current center of gravity. 4.14.2 Adjusting the attitude to facilitate front foot placement To make the front footholds more accessible, the following operations were performed: Chapter 4. Heuristic Specification 68 The Algorithm to Determine Attitude Adjustments set REMAINING to 1 (this is done because the attitude adjustment is calculated to happen one sample time at a time) calculate the normal orientation vector (use Equations 4.1 to 4.7) P,=Pj+ Nh if leg 1 is being swung set at = tan - 1(z(/|a5;|) otherwise set <rt = — tan-1(zj/|a!j|) ensure that crt does not differ from or by more than one third of the maximum body roll rate recalculate the complete set of orientation vectors using at and the current tilt Pf = Pj + N'h (using the new normal orientation vector) ensure that ipt does not differ from ip by more than the maximum body tilt rate This attitude changing strategy basically rotated the machine so that a vector from the center of the machine to the point Pi, at height h above the foothold would be in the plane defined by the platform of the machine. This positioning ensured that the shoulder was well situated for the leg to reach the foothold if such was possible at all. Under this one constraint however, the platform could adopt an infinite number of attitudes. This was because the plane could effectively rotate about the described vector. The heuristic operated by choosing as its final plane, the one that consisted only of machine rolling. The rate of rolling towards this plane was limited so that it occurred at one third of the maximum allowable roll rate. While the gradual rolling took place then, tilt angles were calculated that would adjust the platform attitude so that the vector to Pi was contained in it. The tilting required to do this was allowed to take place at the full allowable tilt rate. Thus the attitude adjustment initially consisted mainly of tilting towards Pj. Later, as the roll increased, the tilting abated and the attitude adjustment consisted mainly of rolling towards Pj. If the foothold become accessible at any point in this process, the attitude adjustment stopped. If the foothold never became accessible, the process completed and a failure was declared. If, in the course of adjusting the attitude, a leg was brought to the limits of its range, the process also stopped and a failure was declared. U L S' x P, V x S' Chapter 4. Heuristic Specification 69 It was preferred that the machine tilt towards the foothold more than it rolled towards it. Excessive tilting could be recovered from more easily and did not have as drastic effects on the range of operation of the supporting legs. As well, it was felt that should the machine platform contain a seated operator, this operator would be able to handle tilting more easily than rolling. This heuristic adjusted the attitude in a manner that made machine tilting more likely than rolling. It started off by mainly tilting, and only if this did not make did the foothold accessible did it continue on and began rolling the machine excessively. The machine height, h, was added to Pj in the direction of the normal orientation vector, not, as would be expected, in the vertical direction. This was because the goal of this heuristic was to make the foothold accessible. This was best accomplished by having the shoulder offset from the foothold by h in the platform normal direction. If h had been added to Pj in the vertical direction, the offset would have been foreshortened for any nonhorizontal machine attitudes, and the leg access range then have been reduced. 4.14.3 Adjusting the rotational orientation to facilitate rear foot placement To make the rear footholds more accessible, the machine could only be rotated. Adjusting the attitude would have had little effect as the rear footholds were not out in front of the machine, they were along side it. The front footholds were constrained by the Foothold Determination heuristic to be in the forward range of the machine. When they were inaccessible, it was typically because they were out of range laterally or vertically (relative to the machine). Thus adjusting the attitude in their direction was beneficial. When rear footholds were inaccessible, it was typically because they were too far forward. That is, the machine had not advanced enough to bring them in range. They were not likely to be out of range in other directions, as they were located immediately behind the front feet, and the LOGHAQ heuristic package was designed to ensure that once the feet were placed, they moved down the length of the machine at a fairly close distance. So, when a rear foothold was inaccessible, the strategy adopted was to move it further down the length of the machine. This was accomplished by rotating the back end of the machine, on the side of the swinging foot, towards the foothold. The heuristic simply set the target rotational angle each sample time to half of the maximum body rotation rate in the direction required. The heuristic did not move the machine towards a final orientation gaol as it did when adjusting the attitude to reach front footholds. It just kept rotating the machine until either a leg reached its range limit, in which case a failure was declared, or the foothold became accessible. This part of the heuristic, Chapter 4. Heuristic Specification 70 like the part that facilitated front foot placements, made the orientation changes one sample time at a time. Thus it also set REMAINING to 1, indicating that the changes specified would take place in one sample time. 4.14.4 Halting conditions and the applicability of the Adjust Attitude heuristic As detailed above, if the machine halted and it had a swinging leg in the air that could not reach its foothold, the Adjust Attitude heuristic attempted to alter the machine orientation to bring the foothold in range. It will now be examined under what conditions the machine had to halt, and in which cases the heuristic was useful. There were two possible causes of forward body movement cessation: 1. The center of gravity (buffered by the stability margin) had reached the front edge of the stability region. 2. A support leg had reached the limit of its range. The former of these was most likely occur during the front leg swing phase of a half-cycle. The other two phases of the half-cycle, the creep into the new stability triangle and the rear leg swing phase, both took place earlier in the movement across the stability triangle and normally ended long before the machine approached the front edge of the stability triangle. If the machine reached the end of the stability triangle during the front leg swing phase, it stopped and awaited placement of the front foot. Then, if the foot could reach its foothold, the next stability triangle became available, and the machine continued on. If the foothold was not accessible, the Adjust Attitude heuristic attempted to bring it into range. Failure of the heuristic to do so resulted in a general failure declaration. It was this situation, that of the machine reaching the end of the stability triangle with the front foot unable to reach its foothold, that most often resulted in the Adjust Attitude heuristic being used. As stated previously, it was unlikely that the machine would reach the front edge of the stability triangle during the rear leg swing phase. Normally this phase ended with the machine close to the center of the triangle. The machine was most likely to completely cross the triangle only when it could not make the rear foot placement. In that case, it continued moving, with the swing leg in the hovering position, until the triangle had been crossed. At this point the Adjust Attitude heuristic was used to facilitate placement. If it failed to do so, a general failure was declared. Although rare, it was possible for the machine to cross the stability triangle before the rear foot had had time to reach its foothold. Chapter 4. Heuristic Specification 71 This was most likely to occur when the stability triangle was small. In that case, the machine simply stopped and awaited placement. The end of the stability triangle could not be reached during the creeping phase. The Foothold Determination heuristic ensured that the stability triangles were always large enough to prevent this from happening. The second cause of machine body halting was when one of the machine's supporting legs reached the limit of its range. Normally this meant that the leg was over-extended. That is, the leg had been forced to reach so far outward that one of its joints reached a limit. Typically over-extensions occurred in the backward direction. This was because the legs were extended forward the farthest they would be when their feet were placed, and this placement was not permitted to be made out of the leg range. After the placement was made, the machine moved forward, and the forward extension was continually lessened. It was the rear extension that grew as the machine moved forward, and it is this problem that will first be considered. The leg that had the greatest backward extension at any time was most likely the one that was next to be swung forward. It was this leg that was farthest through its backward stroke. So in the first phase of a half-cycle, the creeping phase, it was the rear leg that was about to swing that was the most likely to over-extend. If this happened, it indicated that the rear boundary of the next stability triangle was too far forward, and that the feet had been too aggressively placed. That is, the stride length had been made too long relative to the range of the legs. If halting occurred for this reason, there was nothing that could be done, and failure was declared immediately. Although such an occurrence was not likely, if any leg other than the next one to be swung reached the end of its range during the creeping phase, failure was again declared immediately. After the creeping phase ended, the rear leg began its forward swing, and it was the leg in front of it that was then most likely to over-extend. If this happened, the machine halted, but the swing leg was able to continue forward. In fact, the more that the front leg was over-extended, the further its foothold, and the new rear foothold immediately behind it, had moved into the range of the rear leg. Thus the more likely it was that the rear foothold was accessible. If the foothold was inaccessible, the Adjust Attitude heuristic attempted to bring it into range, and failing that, a general failure was declared. If the rear foot could be placed, the over-extension of the front leg was no longer a concern, because that leg immediately began a forward swing. So a front leg over-extension in this phase of the half-cycle was not a problem unless, as a result of an unusual machine state, the rear leg could not reach its foothold. Chapter 4. Heuristic Specification 72 The sudden halting due to such over-extensions resulted in inconsistent machine movement however, and was best avoided by adjusting the stride length to better suit the range of the legs. If either leg on the other side of the machine over-extended during the rear leg swing phase, the machine again halted and awaited the foot placement. After this had occurred, the front leg began its swing, but the machine had to remain halted until that foot too was placed. At this point failure was declared. The reason for this was that the machine then had to creep into the next stability triangle to facilitate swinging of the other rear leg. It could not move however, because the over-extension problem still existed in one of the two legs on that side. This problem was not eliminated in the course of the two leg swings. In effect, this over-extension failure condition was an early occurrence of the creeping over-extension problem described earlier. Occurrence of this problem indicated that the stride length was far too aggressive. Over-extensions could also occur when the half-cycle was in its last phase, the front leg swing phase. In this case, it was most likely the rear leg on the opposite side that over-extended. If this happened, it indicated that the stride length was far too aggressive. This over-extension problem was a milder form of that described above, and was again effectively the same as the creeping over-extension problem. When the swinging front leg was placed, the machine entered the creeping phase of the next half-cycle, but the over-extension condition still existed, so the machine could not move forward. Failure was then declared. Over-extensions were not necessarily the cause of all the machine haltings due to legs reaching the end of their range. Under-extensions, which occurred when the legs were compressed inward too much, also resulted in halting. TJnder-extensions could occur at any time during a half-cycle, although they were most likely when the feet were laterally opposite their shoulders, as this was when the legs were their shortest. In a given set of conditions, the effects of under-extensions were exactly the same as over-extensions in terms of forcing halts and resulting in failures. They were more easily avoided though, as they were not as directly affected by the series of footholds presented to the machine. Over-extensions typically resulted from poorly positioned footholds that spread the feet out over too large of an area. Having the footholds laterally too close to the machine caused under-extensions, excessive foothold spread did not. The lateral proximity of the footholds was increased by widening the stance. Widening the stance also increased the extension of the legs when they were farthest back in their stride, and thus had to be accompanied by a decrease in the stride length. So trade-offs had to be made between the stride length and the stance width based on empirical analysis of machine performance. Chapter 4. Heuristic Specification 73 In summary, if a leg reached the end of its range, a failure resulted in most cases. This was true even when a leg was being swung when the over-extension or under-extension occurred. If a leg was being swung when the machine reached the end of a stability region and halted, the placement of that foot could form a new stability region into which the machine could move. Having a new stability region did not solve leg extension problems. The only time a leg extension problem could be solved was when the leg that had reached the end of its range became the swing leg. This only occurred when a front leg had reached the end of its range, and it was waiting for the rear leg behind it to touch down before it began its swing. All other conditions required additional forward motion of the machine, which was impossible with a leg extension problem. So leg extension problems were serious in nature, and were best avoided by limiting the stride and keeping the stance wide. In a more complete walking package than the LOGHAQ heuristics, leg over-extension problems could be corrected. A strategy that could be used would be to move the machine backwards somewhat, and then shuffle the feet to reduce their placement spread and make the next stability triangle more accessible. Poor foothold locations could thus be corrected. Doing this was not in the realm of this study however. The goal of this study was to develop a collection of heuristics that provided smooth forward movement. Shuffling the feet of a machine would result in a significant break in its forward flow. This is not an acceptable option if continuous forward motion is desired. The approach that was taken in this study was to avoid the conditions that required this response. 4.14.5 Machine failure summary In general, failure of the LOGHAQ heuristics to provide continuous movement occurred mainly when an overly aggressive stride length had been used. Footholds chosen too far forward were out of range of the front feet. It was possible to correct this using the Adjust Attitude heuristic, but such action was not desirable. Additionally, a series of aggressive footholds often forced a support leg to over-extend as the machine moved forward, resulting in a more serious problem that could rarely be corrected. Too narrow of a stance resulted in under-extension failures. Widening the stance to solve this required a decrease in stride length. As explained in Section 3.6, it is best to make the stride as long as possible. But long stride lengths resulted in many problems that disrupted continuous machine motion. To prevent failures and to maximize speed, the stride length has to be chosen carefully. Chapter 4. Heuristic Specification 74 4.15 The Body Kinematics Heuristic The Body Kinematics heuristic calculated the desired angles of the supporting legs for the next sample time. It did so by determining where the shoulders of the machine would be if the desired movements were made, and then using vectors from the shoulders to the current foot locations to determine what combination of angles the legs should adopt to facilitate this change. The desired body movements consisted of translation, and attitude and orientation changes. The extent of the attitude and orientation changes was determined by the number of sample times remaining before the next footfall occurred. This value was passed to the Body Kinematics heuristic from the Leg Kinematics heuristic as REMAINING. The heuristic operated as follows: The Body Kinematics Heuristic Pd — Vi • duration of one sample time • (ip/|P P |) (Pi is desired center for next sample time) Pi = pt/REMAINING fa = V- + (fa - i>)/REMAINING <Td = (r + (<rt- a)/REMAINING ensure that none of the attitude and orientation changes exceed their maximum amounts calculate the orientation vectors with fa and <7<j (use Equations 4.1 to 4.7) rotate orientation vectors around the vertical axis by amount pi (use Equations 4.8 and 4.9) set RESET to false calculate the joint angles for each supporting leg: Ji = Ai • forward distance to shoulder + Si • lateral distance to shoulder D = P f o o t - (Pd + Jd) da — D • Ai (see Figure 4.2 for clarification) d, = D • Si dn = D • Nd 0d = taa.-1(da/dl) ed = c o s - 1 [(2^ + L\ - \D\2)/(2LuLL)] (cosine law) fa = t an - 1 {dn/y/d2 + d2)•+ s in - 1 ( i / i sined/|D|) (see Figure 4.7 for clarification) if any of these angles are out of the leg movement range set RESET to true if RESET is true, cannot move, so: set all of the desired angles to their current values (for supporting legs only, not the swing leg) Chapter 4. Heuristic Specification 75 Figure 4.7: Calculation of the Vertical Angle The Body Kinematics heuristic was used every sample time, even if the machine was halted. That was because the machine could still make attitude and orientation changes in place. 4.16 The Prevent Leg Collision Heuristic This heuristic ensured that the rear leg of a machine, as it swung forward, did not strike the front leg. This was the only time that the legs of a machine operating under the LOGHAQ heuristics could strike. The nature of the heuristics, combined with some machine design limitations (to be immediately described), prevented all other possibilities of leg contact. 4.16.1 Preventing contact when both feet were placed If the two feet on one side of a machine are placed near each other, in the manner of a follow the leader gait, with the rear one slightly behind, the legs can contact each other. It does not seem at first that this could be the case. When seen from above, as shown in Figure 4.6, the two legs, and the machine side between them, simply form a triangle with one vertex at the feet. Should the knees of both legs extend outward beyond their feet though, they can strike. If only one knee is ever allowed to extend past its foot, the legs cannot contact. This is because, while one knee may extend past the vertex of the Chapter 4. Heuristic Specification 76 Figure 4.8: Configuration for Leg Contact Prevention triangle shown in Figure 4.6, the other leg will only butt up against this extra extension. So when the two feet on a side are placed together, to prevent the two legs from striking as the machine moves, it only has to be ensured that at most one knee at a time can extend past its foot. This can be guaranteed if the walking machine in configured as shown in Figure 4.8. In this figure, both legs are rotated towards each other so that their knees are as close as they can be, and they are not touching. The front leg is at its maximum backward horizontal angle, the rear leg is at its maximum forward horizontal angle, and both have a vertical angle of 0°. At these angles, the length of the machine side and the length of the upper leg segments are such that the knees cannot touch. Now the dashed line in Figure 4.8 indicates the furthest range of each knee when viewed from above. If either foot is out of this range, its knee can clearly not extend beyond it. So it can be seen that the two feet can never be in a position where both knees are extended past them. The feet can be in the circular area defined by the knee of either leg, and when they are in these areas one knee can extend past its foot, but the feet cannot be in both areas simultaneously. This is because the two areas have been prevented from overlapping by the configuration shown in Figure 4.8. The feet can be in either knee area, or outside both, but never in both simultaneously. Chapter 4. Heuristic Specification 77 4.16.2 P r e v e n t i n g contact d u r i n g the rear leg s w i n g Contact of the two legs on either side was prevented when both feet were placed by use of the above described configuration. It remained then to ensure that the legs did not contact when one of them was in the swing phase. When the front leg started its swing, it was guaranteed by the configuration of Figure 4.8 not to be in a position that would produce leg contact. From that position it rotated forward quickly while the rear leg rotated backward somewhat more slowly. So the two legs, from the moment of lifting, moved away from each other. This ensured that front leg swings could never result in striking of the legs. This was not true of rear leg swings however. As the rear leg ended its swing, approaching the front leg, it rotated forward quickly while the front leg rotated backwards towards it. During this time, it was possible for the legs to contact, and it was preventing this that this heuristic was devoted to. The heuristic started by checking that the front knee was extended past its foot. If the front knee was not extended past its foot, there was no contact problem. The nature of the Swing Leg Kinematics heuristic ensured that the rear leg did not swing past the front leg, so if the front knee was not extended past its foothold, the rear leg would simply butt up against the front foot. This would occur regardless of the position of the rear knee. There was no danger of the front knee beginning to extend past its foot when it had not done so previously, because as the leg continued rotating backward it got further away from this condition. The heuristic also checked to make sure that the two legs were actually close enough to strike. So both of the described checks made sure that there was at least of a possibility of leg contact. Then the heuristic performed the following calculations (see Figure 4.2): = Lu cos $ (4.80) kl — Lu sin 4>? (4.81) fl = Lu cos 4>* + Li cos(ir -V -<<) (4.82) fi = Lu sinc^ — Li, sin(7r -4>} -**) (4.83) k\ — Lu cos <j)T (4.84) k[ = Lu sin <j>r (4.85) fl — Lu cos <j>T + LL COS(TT -4 - o (4.86) fl = Lu sincV" — LL sin(ir -4>r - o (4.87) Chapter 4. Heuristic Specification 78 Where these were the horizontal and vertical distances to the knees and feet of the two legs, as indicated by the subscripts. These values and others are illustrated in Figure 4.9. Now the horizontal distance to where the extension of the front leg intersected the rear leg was calculated using the sine law: sin(— -f- 0^} iTh = distance between the shoulders • . 2 —rr (4.88) h sin(0 r -0/) v ' Next irJ, the vertical height of the intersection, was determined. If the intersection occurred in the extension range of the rear leg, this value was determined by interpolation as follows: # =hrv-LL sinfo' + er)§—£ (4.89) Otherwise this value was simply set to the height of the rear foot: fl (4.90) Thus a value indicating the approximate height at which the two legs would contact, should the rear leg continue swinging forward at the same height, was calculated. This value was then used to determine the horizontal distance that the rear leg should be away from the front shoulder to prevent contact, i£. This distance included the horizontal extension of the front leg to the vertical contact point and a safety margin. There were two cases considered. The first was when the height of contact was higher than the front knee, which was the farthest extension of the front leg. In this case: i£ = + safety margin (4.91) The second case was when the height of contact was below the knee. This condition occurred as the leg dropped downwards until its foot reached the ground. In this case, i{ was interpolated: i{ = fi + (ki - f l ) ^ 4 + s a f e t y mar&in (4-92) kv — fv The limiting distance, i{, could be interpreted as a barrier that blocked the forward swing of the rear leg from approaching the front leg too closely. The barrier ran a fixed distance behind the lower segment of the front leg up to the height of the front knee. Then it maintained this distance and continued vertically up to infinity (or at least to the end of the atmosphere). A rear leg that contacted the barrier was held back in its forward progress and, as it dropped towards its foothold, "slid" down the barrier. Chapter 4. Heuristic Specification 79 When the front leg stretched back far enough to eliminate any extension of its knee past its foot, the barrier effectively disappeared. Finally, with i{, the maximum forward horizontal angle of the rear leg was calculated: This angle was then used to restrict the forward motion of the rear. leg as it approached the front one. It should be noted that this angle was not a fixed one. As the front leg rotated backward, the barrier determining the angle tilted forward until it became vertical and disappeared. The effect of this heuristic then, was simply to block the forward progress of a rear leg that was swinging too aggressively. In the vast majority of cases, the Swing Leg Kinematics heuristic ensured that the Prevent Leg Collision heuristic was not needed. The Swing Leg Kinematics heuristic normally dropped the rear leg down towards its foothold long before it could make contact with the front leg. The purpose of this heuristic was just to ensure that this happened. (4.93) •er 4. Heuristic Specification 80 Figure 4.9: Rear Leg Swing Contact Prevention Chapter 5 Practicalities of Quadruped Design This chapter will discuss the factors that must be considered in a practical quadruped design. These factors include ones that result from general quadruped characteristics, and ones that result from the constraints placed on a machine that is to use the LOGHAQ heuristics. To illustrate the points presented, and to prepare for the chapter on the simulation of the LOGHAQ heuristics, the model used in the simulations will be developed throughout the chapter. 5.1 Machine Dimensions As mentioned in Section 3.6, the actual dimensions of a quadruped machine are not very important in themselves. It is the access range of the feet that is the largest concern. The access range of the feet determines how long the stride can be, and thus, the speed at which the machine can operate. As a general rule, the greater the range of the feet the better. The freedom of operation of the machine, and the kinds of terrain conditions it can handle, depend on the extent of the access range. The access range is determined jointly by the dimensions of the machine, the length of the legs, and the angular limits on the movement of the legs. All of these factors can be traded against each other to produce a machine with the desired range of foot access. The considerations when these tradeoffs are made include the power of the actuators available, the useful range of these actuators, and the loads that the joints, legs, and machine platform will bear. 5.1.1 Leg dimensions The leg dimensions are a function of the capabilities of the available actuators, and of the loading that will be placed on the legs. As a general rule, the legs of a walking machine should be made as long as possible relative to the body. This provides for the greatest foot access range. This is best illustrated by considering the limited range of a large body with very short legs, as compared to a small body with very long legs. 81 Chapter 5. Practicalities of Quadruped Design 82 Figure 5.1: The Effects of Differing Leg Segment Lengths Once a leg length is chosen, it has to be decided how this length should be divided up between the two segments. Now a three degree of freedom leg could be constructed by having a two degree of freedom shoulder and a straight telescoping leg. The advantage that a leg with a knee has over this design is that obstacles between the shoulder and the foot are more easily cleared. The top segment of the leg can pass over them roughly horizontally, and the lower segment can run vertically down to the foot. To take best advantage of this, the two segments should be about the same length. As shown in Figure 5.1, if the upper segment is very short compared to the lower one, the knee will be close to the shoulder, and the lower leg segment will run directly from that close knee to the foot in the manner of a telescoping leg design. As shown in Figure 5.1, if a short lower segment is used, a similar condition occurs. Further, the extendibility range of legs with uneven segments is less than those with even segments. So the legs should be made as long as possible and have equal segment lengths. 5.1.2 Platform dimensions In general, a longitudinally oriented walking machine should be longer than it is wide. To prevent the legs on each side from striking, there must be enough distance between their shoulders to keep them apart in their range of access. Section 4.16 details how the minimum side length should be determined from given leg lengths and horizontal angular limits to prevent leg contact. This section also states that Chapter 5. Practicalities of Quadruped Design 83 the legs should be close enough so that the two feet can move together throughout a wide range. So preferably the shoulders should be placed no further apart than the calculated minimum side length. Thus the desired length of a machine is easily determined once the leg design has been made. The desired width is not as well defined. In fact, as the legs do not enter each other's range across the front and back of the machine, the width is arbitrary. As explained in Section 3.6, increasing the width of a machine does somewhat improve its maximum speed potential, but not significantly. Increasing the width also improves the lateral stability, but the laterally stability margin will normally be much greater than the margin in the direction of travel anyway. In fact, as the legs add to the effective width of the machine stance, even a narrow platform has a very wide stance. Considering that a narrower stance would be of benefit in traversing terrain with obstacles that have to be avoided (Song, 1989), the machine should be made as narrow as is feasible. 5.1.3 Model dimensions To simulate the LOGHAQ heuristics, a model was developed that was based on the Kaiser Spyder X5M (see Figure 5.2), a commercially available legged machine. The standard Kaiser does not have three degree of freedom legs. It has two degree of freedom legs that are somewhat restricted in their range. The rear legs are rather short and have powered wheels at the end of them. The front legs are somewhat longer with simple foot pads. In the model developed from this machine, four uniform length, three degree of freedom legs were used to replace those of the standard design. The modelled legs had two segments, each of length 1.2m. This length was based on the length of the standard front legs so that it would remain in a practical realm. In addition, this length was short enough to prevent leg contact with the horizontal angular limits chosen (to be described in the next section). The commercial machine has a base that is wider than it is long. In addition the legs rotate horizontally along the front and back edges, not along the sides. So in the model, the base was turned about 90". This made the length greater than the width, and moved the horizontal leg movement range to the sides. The resulting model was 1.78m long and 1.16m wide. er 5. Practicalities of Quadruped Design Figure 5.2: The Kaiser Spyder X5M Chapter 5. Practicalities of Quadruped Design 85 5.2 Angular Range Limitations 5.2.1 Factors in the angular range limitation To provide the greatest foot access range, the angular range of the joints should be made as large as possible. In a practical machine design however, limitations have to be placed on the range of the joint angles to ensure that the machine can be supported properly. Loading on the joints determines the angles through which they can move. The joint angles are also limited by the functional range of the actuator systems that are powering the joints. The forces exerted on both the joints and the actuators are a direct result of the length of the legs, and the machine loading. So the angular range of the legs is determined by the total leg design, and the desired range should thus be considered when the design is made. As explained in Section 4.16, the horizontal angular limits affect whether or not the legs can strike each other as the machine moves. These angular limits should be determined in conjunction with the length of the machine, and the length of the upper leg segments. 5.2.2 Angular range limitations of the model The model used for simulation had horizontal angular limits of 45° in front of a line extending laterally from the machine, and 45° behind it (6 in Figure 3.1). In reference to the same lateral line, the vertical angular limits were 45° above it, and 45° below it in Figure 3.1). The extension angle (e in Figure 3.1) was limited to a minimum of 40° and a maximum of 155°. These limitations were chosen to provide a reasonable foot access range, without being so large that they were mechanically impractical. The total extension angle range was greater than that of the other two angles. This was because substantial leg extension capability is required for a reasonable foot access range, and because the knee can have a greater range of motion with less mechanical difficulty. The latter reason is due to the fact that the knee is a one degree of freedom joint, and the fact that while the machine platform is likely to be crowded with equipment, the extension mechanics can be situated by themselves on the upper leg segment. The vertical angle that the legs assumed when they could not access their footholds and were hovering over them was set to 36° in the simulation. This provided reasonable ground clearance without being too close to the maximum vertical angle. Chapter 5. Practicalities of Quadruped Design 86 5.3 Maximum Rates of Change 5.3.1 Maximum joint angle change rates The angular rate of change that can occur in any joint of a practical machine is entirely dependent on the linkage and actuator system used. As shown in Section 3.6, the maximum horizontal angle rate of change in the forward swing direction is the main factor that limits machine speed. Thus it is critical that the machine be designed to drive the horizontal angle forward as quickly as possible. The fact that the legs are not loaded during the forward swing could be used to advantage. If dynamic performance is not considered, the absolute rate of angular change in the machine joints is not important to a movement planner. Instead, the angular change that can occur in one sample time is what must be considered. During simulation of the LOGHAQ heuristics, the angular changes that could occur per sample time could be set arbitrarily small. To allow for accurate control and good graphic output resolution, the maximum angular change rates were set to 2.5°/sample time for all of the joints. This rate provided the needed resolution and did not result in excessive computational effort during long term simulations. 5.3.2 Maximum body rotational change rates To ensure that the accelerative forces, both translational and rotational, that a practical walking machine is exposed to are not too severe, extensive dynamic testing should be performed. Such testing should consider loads experienced by the machine platform, the legs of the machine, and any onboard operator. To prevent excessive forces in any machine which might be controlled by them, the LOGHAQ heuristics placed limits on the rotational change rates allowed about three axes running through the center of the machine. These were the longitudinal axis, the lateral axis, and the vertical axis. The change rates allowed about each of these axes would normally be determines by knowledge of machine dynamic performance and the desired platform movement limitations. As this information was not available, the rotational change rate allowed about each of these axes was set to 2.5°/sample time. 5.3.3 Maximum acceleration Again to prevent excessive forces in any machine which might be controlled by them, the LOGHAQ heuristics placed a limit on the maximum acceleration allowed at the center of the machine. While Chapter 5. Practicalities of Quadruped Design 87 determining this also depended on knowledge of machine dynamic performance and the desired plat-form movement limitations, the effects of different acceleration limits could be more easily seen on the graphic display of the simulations. After empirical observation of the machine response, the maximum acceleration was set to O.OOlm/sample time2. This resulted in performance that was conservative, but not sluggish. When the machine was forced to halt, the acceleration limit was not used. The velocity of the machine fell to zero immediately. In a practical machine application, this could not be allowed. The machine would not be able to halt that quickly, and it would be subjected to excessive forces in its attempt to do so. The dynamic performance of a practical machine should be analyzed, and some sort of plan developed to anticipate sudden halts and initiate negative acceleration before hand. The stability margin could also be increased so that if the machine does overshoot its stability region, it will still remain stable. Such strategies are meaningless though, unless dynamic performance knowledge is available. It should further be noted that the maximum allowed acceleration during a sudden halt should not be determined in any way by considerations of desired platform movements. It is far more important to stop a machine before it collapses than to prevent extreme platform accelerations. While an onboard operator may be thrown against the front of his cab, that is far less of a concern than having him involved in the destruction of a very expensive machine. 5.4 Machine Stance 5.4.1 Width of stance Once the width of a machine platform has been determined, the width of the total machine stance is determined by the distance that the footholds are placed laterally relative to the machine. As stated in Section 3.6, a wider stance improves the maximum speed of a machine slightly, and, as stated in Section 5.1, a wider stance also increases the lateral stability, but neither of these are primary considerations of the stance determination. What is more important is how the lateral foot placement distance affects the access range of the feet. If the feet are placed far out, near the end of the leg range, the total foot movement for a given horizontal angular change is increased (see Equation 3.17). This means that longer strides can be taken, and the speed of the machine can be consequently increased. In exchange, the torques felt at the shoulders are also increased, and the foot access beyond the lateral foothold distance is reduced. The latter effect increases the chance of leg over-extensions occurring if the footholds should be Chapter 5. Practicalities of Quadruped Design 88 placed further away from the machine than expected. As detailed in Section 4.14, this could significantly affect the long term continuation of machine movement. Conversely, if the lateral placement distance is made too close to the machine, the likelihood of leg under-extensions occurring increases. The optimal lateral foot placement distance to provide the greatest freedom of leg movement is one that is half way between the near and far limits of the leg range. Empirical tests of the simulated model indicated that having the lateral placement distance set to 1.3 times the upper leg segment length best balanced the need for maximum leg freedom of movement, and the desire to have the feet extended as far out as possible. The stance width then, including the machine width, was 4.28m. 5.4.2 M a c h i n e height The height of a walking machine has important consequences on its walking pattern when it is on sloped terrain. If the terrain had a roll to it, as shown in Figure 4.3, the LOGHAQ heuristics followed a foot placement strategy that kept the horizontally projected machine center of gravity roughly half way between the horizontally projected footholds on either side of the machine (see Section 4.9). This resulted in the effective lateral placement distance on one side of the machine being larger than the other. The legs on that side were then correspondingly extended. Effectively, the platform of the machine was offset from the pattern defined by the feet. Similarly, if the terrain had a tilt to it, the platform was offset forward if the machine is going uphill, and backward if it was going down. The former condition caused the legs to be extended backward more than usual, and the latter caused them to be extended forward more than usual. So any terrain slope at all resulted in changes in the normal pattern of the leg extensions. As the LOGHAQ heuristics were designed to operate around fairly well maintained normal machine states, these effects were not desirable. To make them as small as possible, the effective platform offset had to be reduced, and this could only be accomplished by decreasing the height of the machine. Another reason that the height of a machine should be minimized is that doing so may increase the foot access range. If a machine design includes considerable leg movement capability above the shoulder height, this area is best utilized by getting the shoulder as close tb the ground as possible. The value of doing so depends on the actual machine design. The model used in the simulations of the LOGHAQ heuristics had equal vertical angle movement limits above and below the shoulders, and it was thus advantageous in this case to reduce the machine height. As stated in the previous subsection, the lateral extension of the machine legs should be made as large as possible to increase the distance covered as the legs rotate. This lateral extension should not be Chapter 5. Practicalities of Quadruped Design 89 increased to the point where there is danger of leg over-extension however. If the height of a machine is reduced, the same total leg extension can reach further laterally. Having a lower machine height has another advantage. As described in Messuri (1985), the "energy stability margin" of a walking machine is increased as the height of the machine is lessed. The energy stability margin is a measure of the effort required to tip over a machine when it is in a statically stable state. A machine with a high energy stability margin is more impervious to external disturbances. While the height of a walking machine should be reduced for many reasons, it must always be kept high enough to provide adequate ground clearance. The ability to cross normally impassable terrain is the main advantage of using walking machines over other forms of ground transportation. This ability should not be sacrificed. The height of a machine must then be made as low as possible, but not so low that its ground clearance is affected. The height of the simulation model, after empirical tests to determine this point, was set to 0.8m. 5.4.3 Length of stride Section 3.6 described in detail why longer stride lengths are necessary to improve the speed of a machine. If a machine stride is made too long however, the chances of its legs over-extending increases. The potentially disastrous results of this were described in detail in Section 4.14. Now assuming that the feet of a walking machine will normally move along its sides at the lateral foot placement distance (see Section 4.9), the maximum forward distance that the feet of the machine can travel is: lateral foot placement distance • tan 0m ax (5-1) Where 6max is the maximum forward horizontal angle of the legs of the machine. To ensure that over-extensions are avoided, the stride length should be made much less than this amount. After empirical observation of performance, the stride length of the simulation model was set to: 0.6 • lateral foot placement distance • tan 6max — 0.936m (5.2) Chapter 5. Practicalities of Quadruped Design 90 5.5 Stability Controlling Distances 5.5.1 Stability margin The stability margin chosen for a practical machine depends on the dynamic behavior of the machine when operating under the conditions produced by the LOGHAQ heuristics. The stability margin size determines the radius of a vertical cylinder that encloses the center of gravity of the machine. When the machine is subjected to dynamic forces, its effective center of gravity moves around its nominal one. As long as this effective center of gravity remains in the vertical cylinder, the LOGHAQ heuristics ensure that the machine will remain stable. Thus the stability margin has to be chosen based on expected machine behavior. The less affect dynamic forces have on a machine, the smaller the stability margin need be. Some effort should be made to minimize the size of the stability margin. As described in Section 3.6, the larger the stability margin is, the longer the creeping periods are, and the lower the maximum possible speed is. In addition, as will be described at the end of this section, the larger the stability margin is, the lower the maximum turning rate is. So the stability margin should be made as small as possible within the range of expected machine dynamic behavior. The stability margin was set to 0.15m in the simulations of the LOGHAQ heuristics. This seemed to produce a reasonably sized vertical stability cylinder. Such a judgement was difficult to make however with no knowledge of the dynamic behavior characteristics of the model. 5.5.2 Buffer distance The buffer distance determined, in the LOGHAQ heuristics, how far behind the planned center of gravity the machine should move before each half-cycle ended. As stated in Section 4.11, the machine could not move right up to the planned center of gravity, as this location was an unstable one. The planned center of gravity was used as a trajectory specifying point only. For ideal performance, the buffer distance should be set to exactly the stability margin distance. This would allow the machine to move as close to the front edge of the stability triangle as possible. Then, if the LOGHAQ heuristics calculated everything perfectly, a speed would be determined that brought the machine to this point just as the front foot touched down. A new stability triangle would be formed by the footfall, and the machine could continue on without stopping. The planning accuracy required to do this would be formidable however, especially if the machine exhibited significant dynamic response Chapter 5. Practicalities of Quadruped Design 91 characteristics. To prevent the machine from arriving at the termination point defined by the buffer distance, and having to halt suddenly because the next stability triangle has not yet been formed by the front footfall, the buffer distance should be made larger than the stability margin. The buffer distance should not be made too large though, as the further the machine is behind the planned center of gravity at the end of the half-cycle, the further it must creep to reach the next stability triangle. After empirically testing different buffer distances, a distance of 0.4m was chosen for the LOGHAQ simulations. This distance, although somewhat conservative, prevented the machine from having to halt suddenly in all but the most unusual conditions. 5.5.3 FoUowing distance The following distance determined, in the LOGHAQ heuristics, how far behind the front foot the rear foot was placed. As mentioned in Section 3.3, this distance should be made as small as possible to prevent excessive backward shifting of the stability triangle front edge when the rear foot takes over support, but it should be made large enough to prevent the legs from striking. It was set to 0.12m in the simulations, one tenth of the length of the leg segments. 5.5.4 Maximum turning rate For a given stride length and stance width, the maximum possible turning rate of the machine is largely defined by the following distance and the stability margin. It is affected by many other factors as well, such as the terrain slope, but these two values have the greatest overall effect on it. If 2d; is set to the machine stance width, w, and dco is set to twice the sum of the stability margin and the following distance, Equation 4.48 provides an approximation of the maximum turning rate when the machine is on flat terrain. The maximum turning rate for the simulation model, using this approximation, was 5.14° per half-cycle. 5.6 The Settling Factors 5.6.1 Movement, tilt, and roll settling factors In the LOGHAQ heuristics, the settling factors determined how quickly the machine adapted the terrain orientation indicated by its foot positions. The machine, when it entered a new half-cycle, had a trajec-tory of motion defined by the conditions it had previously encountered. The settling factors determined Chapter 5. Practicalities of Quadruped Design 92 how much of this old trajectory was maintained, and how much of the new one was adopted. This is discussed in detail in Section 4.7. After extensive empirical testing of the LOGHAQ heuristics, the move-ment (translational), tilt, and roll settling factors were all set to 0.6. This settling rate provided quick response to new terrain conditions, but maintained enough of the old trajectory to prevent exaggerated response to transient changes. 5.6.2 Rotational settling factor The rotational settling factor was set to 0.1 in the simulations of the LOGHAQ heuristics. This is because it is the operator of the machine who should specify any rotational change. If the movement plan developed from a half-cycle foothold configuration indicates that a certain tilt or roll should be adopted, this is most likely the case. These footholds reflect the attitude of the terrain over which the machine is moving. Further, the operator has no control over the tilt and roll of the machine. This is not the case with the rotation. The terrain cannot indicate which way the machine should turn, that is entirely the prerogative of the operator. The rotational settling factor was set to 0.1 to allow only a small amount of accommodation to the foothold locations. Not doing so to some degree could have resulted in the over-extension of legs whose feet were far away from their expected locations. 5.6.3 Front placement angle learning rate The front placement angle learning rate determined, in the LOGHAQ heuristics, how much each new front horizontal placement angle was averaged in to the running estimate of this angle. The placement angle estimate was, as stated in Section 4.6, maintained separately for each side of the machine. The learning rate was set to 0.4 in the simulations of the LOGHAQ heuristics. This rate responded well to change, but was conservative enough to prevent extreme cases from effecting the estimate excessively. Chapter 6 Heuristic Simulation In this chapter the simulations performed to evaluate the LOGHAQ heuristics will be described. The simulations were based on the model walking machine developed in the last chapter. To fully investigate the capabilities of the heuristics, a wide variety of terrain conditions were simulated. Each terrain condition will be described in the following sections, as well as the simulation response to it, and an analysis of that response. To begin with however, the general simulation format, the performance measures collected, and the manner in which the simulated terrain was constructed will be described. 6.1 The Simulation Format The basic format of the simulations was to start the machine in a standard position, allow it to proceed forward until it had failed or completed a specified number of steps, and then repeat the process a fixed number of times. The standard position in which the machine started was based on the original attitude of the terrain upon which it sat. The terrain attitude was specified, in terms of tilt and roll, before the simulation began. The attitude of the machine was set to match that of the terrain, and its center of gravity was placed at height h above it. The location of the feet of the machine were determined by locating them relative to the point on the terrain directly underneath its center of gravity (Figure 4.3 illustrates the effects of locating relative to this point when the terrain has a roll to it).: Pi •hk + l.bsA (6.1) P 2 (6.2) Pz hk - 0.5sA - —S 2 (6.3) Where h and w are the height and width of the machine stance respectively, s is the stride length, A and S are the orientation vectors (see Section 4.3), and k is a unit vector in the vertical direction. The original foot locations were similar to those of machine position A in Figure 3.2. 93 Chapter 6. Heuristic Simulation 94 From the original position, the simulated machine advanced forward using a movement plan generated by the LOGHAQ heuristics. The heuristics determined everything from the overall half-cycle movement plan to the joint angle changes required to follow it. The desired joint angles that were determined every sample time were immediately adopted by the simulated joints. Thus, perfect following of the movement plan occurred. Movement of the machine continued until it had failed, or a specified maximum number of steps (usually 100) had been made. Then the machine was reset to its original state and a new trial was begun. This continued until a specified number of trials (usually 100) had been completed. 6.2 T h e Per formance Measures C o l l e c t e d Many performance measures were recorded throughout the trials. In reference to the overall success of the trials, the following was output: • The number of successfully completed trials. • The number of failed trials, including a summary of the cause of the failures. • The average number of steps before the successes, and the standard deviation of this average. • The average number of steps before the failures, and the standard deviation of this average. For those trials that completed, the following values were output: . • The average and peak distance travelled during the trials. • The average and peak total rotation that occurred during the trials, where this rotation was measured relative to the initial orientation of the machine. • The average and peak total lateral movement that occurred during the trials, where this total lateral movement was the sum of all movements of the machine to either side of its longitudinal axis. • The average and peak number of attitude adjustments made to reach footholds. • The average and peak number of rotational adjustments made to reach footholds. e The average and peak number of sudden halts that occurred during the trials. The average speed of the machine immediately before these halts occurred was also determined. Chapter 6. Heuristic Simulation 95 For all of the trials, the number of attitude adjustments, rotational adjustments, and sudden halts were divided by the total number of steps taken to determine: • The probability per step of an attitude adjustment occurring. • The probability per step of a rotational adjustment occurring. • The probability per step of a sudden halt occurring. Statistics were also gathered on the performance of the simulated machine during individual sample times. These values indicated the finer performance of the LOGHAQ heuristics. For each of the measures below, average, peak, and standard deviation values were output: • The speed. • The absolute instantaneous (one sample time) lateral movement. • The absolute vertical error (the difference between the actual height of the machine above the terrain and the nominal stance height, h). • The absolute tilt error (relative to the terrain tilt). • The absolute roll error (relative to the terrain roll). • The absolute instantaneous (one sample time) rotational change. • The absolute rotational error per half-cycle. It was found during the simulations that some of the data collected did not provide any meaningful information about the simulated machine performance. For example, the simulated machine followed the plan developed by the LOGHAQ heuristics precisely, so the measure of the absolute rotational error per half-cycle was always very small. This value would be of more interest in a dynamic performance analysis. Many of the other statistics collected each sample time were of little interest for the same reason. They would simply be better used as measures of dynamic response characteristics. Another problem that was discovered was that many of the performance measures were meaningless in certain simulation conditions. The absolute instantaneous rotational change measure, for example, was meaningless when the simulated machine had been instructed to turn. While the machine was turning, the instantaneous rotational change that should have been occurring was impossible to predict, Chapter 6. Heuristic Simulation 96 so a measure of it could not be compared to anything. This value was only meaningful when the machine had been instructed to move straight ahead, in which case it indicated an error in performance. So in the analysis that follows, most of the performance measures collected during the simulations will not be detailed. Only those that were meaningful and that best illustrated the performance of a machine operating under control of the LOGHAQ heuristics. Far too much data was collected for all of it to be explicitly relayed. 6.3 The Simulated Terrain The highly unconstrained nature of walking machine movement provides room for researchers to adopt a wide variety of testing strategies when evaluating the performance of their machines. There are simply too many variables involved in the behavior of each machine for a standard testing strategy to be adopted. In addition, this researcher found very few structured walking machine tests, complete with detailed performance analyses, described in the literature. This was true in reference to both simulated walking machines and actual mechanical devices. Due to both of these reasons, a standard testing strategy was not available with which the LOGHAQ heuristics could be evaluated. As a result, a testing strategy had to be developed that would allow a meaningful performance analysis. 6.3.1 The planar structure of the simulated terrain specification The terrain was modelled in the simulations by simply denning a flat plane over which the machine moved. The tilt and roll of this terrain was specified before the simulation began. Now as stated in Section 3.4, the LOGHAQ heuristics were concerned only with the footholds presented to them, they were not concerned with any other aspects of the terrain. So the only time that the actual terrain structure was considered during the simulations was when the Foothold Determination heuristic (see Section 4.9) requested a new foothold. When this occurred, the simulator within which the LOGHAQ heuristics were running calculated the foothold location on the flat plane that best corresponded with the placement guidelines presented by the Foothold Determination heuristic. 6.3.2 The "Roughness" of the simulated terrain specification Once the best foothold location on the terrain plane had been determined, this location was perturbed in space by a variable distance. The direction of the perturbation was determined, as shown in Figure Chapter 6. Heuristic Simulation 97 Figure 6.1: Foothold Perturbation Determination 6.1, by randomly choosing the two angles of a polar coordinate system. These angles were restricted so that the direction of the perturbation would only be in the half sphere facing the walking machine. The other half of the sphere was not used because it only contained foothold locations that were further away from the machine than the maximum distance specified by the Foothold Determination heuristic. Once the exact direction of the perturbation was chosen, the magnitude of it was selected randomly to be within a defined distance. This maximum distance was referred to as the "roughness". All of the random choices were made with a uniform probability distribution. So the simulated terrain consisted of flat planes only, and the foothold selections were perturbed off these planes by random distances that were constrained to be within a specified roughness range. This seemed to be intuitively reasonable. When one observes a section of real terrain, the overall slope of that terrain is considered at first, and then the roughness of the slope surface. The random perturbations made in the simulations modelled the presense of surface variations due to things like dips and small rocks. For the purposes of structured analysis, the roughness of the simulated terrain used throughout this study had a consistent distribution, and a maximum range. Chapter 6. Heuristic Simulation 98 6.3.3 Comparative analysis of this terrain simulation method with others Hirose et. al. (1984a and 19846) state that simulated terrain can be composed entirely of "holes" and variable height "poles". These holes and poles are discrete components of a tightly packed simulated terrain grid. Holes represent locations that cannot be chosen as footholds, and the tops of the poles constitute the "solid" ground that the footholds can be made on. The grid within which holes and poles are contained is horizontally oriented. So an upward sloping terrain would consist of rows of poles that gradually increase in height. It is true that, if the size of the holes and poles are made small enough, holes and poles can model any given terrain, but there is some question as to whether they would do so in a useful manner. Certainly it does not seem that the best way to represent a mountain flank would be with poles that vary in height from zero to 2000 meters. Further, adding roughness with a known statistical distribution to such a simulated terrain would be awkward. This is because roughness would have to be implemented by varying the pole heights about some underlying terrain plane specification. The height of the poles is all that can be varied, and the direction of this variation is always along the length of the poles, so the distribution of the roughness will bear some correlation with the direction of the length of the poles. The statistical distribution of the roughness in directions other than this would be difficult to ascertain. Obviously it would be affected by the cross-sectional size of the poles, but many other characteristics of the hole and pole environment could affect it, including the density of the holes. It would be even more difficult to ensure a uniform roughness distribution in all directions. It may be desirable to have a terrain roughness distribution that is oriented in the direction of the poles when these poles are perpendicular to the underlying terrain plane (ie.: when the terrain is horizontal), but when terrain with an underlying slope is desired, it is unlikely that roughness that has a distribution that is oriented at some arbitrary angle relative to the slope would be permissible. It should also be noted that an underlying terrain plane would have to be made use of, as described above, to provide for any control over the roughness distribution at all. Such an underlying terrain plane was used in the terrain simulation method of this researcher, but the method of adding roughness to this plane was far simpler. Using a terrain plane in combination with holes and poles would seem to unnecessarily complicate the problem of constructing simulated terrain with roughness of a known distribution. Hirose et. al. (1984a and 19846) probably used this method of terrain modelling because it was well Chapter 6. Heuristic Simulation 99 suited to how their walking machines operated. These machines maintained a horizontal attitude, and performed an intensive search for available footholds. So having simulated terrain that was primarily horizontal and had a large number of holes in it was entirely appropriate. They could easily define the percentage of the terrain that consisted of holes, and then test the ability of their machine to cross this terrain. The hole and pole terrain simulation method was thus adequate for their purposes, but this researcher feels that it cannot be readily extended to general terrain modelling applications. Work done at Ohio State University (McGhee, 1984 and 1979) also made use of simulated terrain denned by holes and poles. Other work done there (McGhee, 1984) involved simulated terrain that was constructed of planar sections. These sections were denned in a random fashion. As a result, the roughness that the simulated machine encountered was not consistent, nor was its statistical distribution known. More strict terrain modelling methods may have been used in the work done at O.S.U., but such efforts were not found in the literature. The basic difference between the simulated terrain description methods used by other researchers, and the one adopted in this study is that the simulated terrain of most other researchers was completely denned before their simulations began. Only the underlying terrain structure, in the form of a simple plane, was predefined in the simulated terrain used in this study. Then, during the course of the simulation, the amount that each foothold was perturbed off this plane was determined. Thus the terrain roughness conditions that the machine encountered could be completely and independently controlled. Further, only the position of the current foothold locations were stored in the simulating computer at any given time. The terrain simulation methods used by other researchers required a complete description of the surface of the simulation region. Thus the method used by this researcher required less computer memory to maintain the simulated terrain, and less computational effort to track the relevant terrain locations as the machine moved relative to them. As well, there were no limits placed on where the machine could go. It could not encounter the edge of terrain defined by a limited database. The plane over which it walked was infinite. This allowed for more comprehensive testing of the LOGHAQ heuristics, as the simulated machine could be permitted to walk long distances. 6.3.4 Terrain changes To allow for more complex simulated terrains, another feature was incorporated in the simulator used to test the LOGHAQ heuristics. Different planar sections could be joined together to compose the underlying terrain structure. Each of these planes could then have any desired attitude. The junctions Chapter 6. Heuristic Simulation 100 between the planes, or "terrain breaks", consisted of vertical transition planes that were defined as being located in front of the machine. At a terrain break, one terrain plane ended where it intersected with the vertical transition plane, and another terrain plane began on the other side of the transition plane. Specifying terrain transitions in this manner facilitated the simulation of terrain changes between terrain planes that did not intersect at the location desired for the transition. The angle with which the machine encountered the terrain breaks, when viewed from above, was specified as desired. Normally it was set to 0°, which resulted in the terrain break being perpendicular to the forward direction of the machine. The relationship in space between the two terrain planes on either side of a terrain break was defined by the height difference between them directly in front of the machine. Multiple terrain breaks could be simulated in this manner. The distance across the plane between each successive pair of terrain breaks was specified in the forward direction of the machine. When a series of terrain breaks had been defined, the trial step number in which these terrain breaks would appear in front of the machine was also defined. When that step occurred, all of the terrain changes were constructed as specified. The distance from the machine to the first break in a series was either specified, or could be chosen randomly. The random selection feature facilitated unpredictable encounters with the new terrain conditions. Specifying simulation terrain changes in this manner maintained the solid underlying terrain structure needed for consistent performance analysis, yet provided the potential for a wide variety of terrain conditions to be simulated. These could include ditches, randomly scattered logs, rivers (a very deep trench could be constructed so that no footholds were available across a horizontal section), stairs, or simple folds in the terrain. 6.4 The Effects of Terrain Roughness Now that the method used to simulate the LOGHAQ heuristics has been described, the results of a number of simulations will be presented. Each of the simulations performed was designed to test some aspect of performance of a machine that is being controlled with the LOGHAQ heuristics. The results that will be presented in the following sections have been compiled from the large quantity of data produced to best illustrate the various aspects of performance. Chapter 6. Heuristic Simulation 101 Distance travelled 43.0m Average speed 0.0085m/sample time Standard deviation of speed 0.0005m/sample time Peek speed 0.0098m/sample time Total rotation 0.08° Total lateral movement 0.028m Average tilt error 1.28° Average roll error 0.27° Figure 6.2: Performance During the No Roughness Benchmark Simulation 6.4.1 A benchmark: perfectly smooth and flat terrain The first terrain that was simulated was perfectly smooth and flat terrain (no roughness). This is the least challenging terrain that can be presented to a walking machine, and the response to it was thus used as a benchmark against which the response to other terrain simulations was compared. During the simulation, the machine was made to take 100 steps and it travelled 43.0m during these steps. Due to the unchallenging terrain conditions, this distance was greater than that travelled in all of the other simulations (excluding one in which the stride length was increased). Correspondingly, the average speed, at 0.0085m/sample time, was also the highest. The standard deviation of the average speed was very low at 0.0005m/sample time. This indicated a high degree of speed consistency that was due to the smoothness of the simulated walking conditions. The peak speed attained, 0.0098m/sample time, was very close to the average speed, again revealing very consistent speed maintenance. This indicated that the techniques used in the LOGHAQ heuristics to maintain consistent speeds were effective. During the simulation the machine did not halt, nor did it make any rotational or attitude adjustments. All of these performance measures are summarized in Figure 6.2. During the simulation, the machine rotated a total of 0.08° away from its initial orientation, and moved laterally a total of 0.028m. These values were the lowest encountered throughout the simulations. This was again due to the unchallenging terrain conditions. The average value of the tilt and roll error measurements were also low at 1.28° and 0.27° respectively. 6.4.2 The limits of smooth terrain performance A number of simulations were performed in order to determine the limits of terrain attitude variation under which the simulated machine could operate when the terrain was perfectly smooth (no roughness). Chapter 6. Heuristic Simulation 102 When the terrain tilt was increased in 1° increments, with the terrain roll held constant, the simulated machine was able to continue walking until the tilt reached 50°. When the terrain tilt was decreased, a limit of —55" was reached. When the terrain roll was increased, with the terrain tilt held constant, a limit of 43" was reached. All of these performance limits represent the theoretical response of the simulated machine to perfectly smooth terrain. 6.4.3 Varying the roughness After the perfectly smooth and flat terrain had been simulated, further simulations were performed on flat terrain with varying degrees of roughness. The roughness was varied from zero to 1.0m in increments of 0.1m. The simulations consisted of 100 trials of 100 steps at each roughness level. Figure 6.3 shows the trial completion rates that occurred in each of these simulations. It can be seen that as the roughness increased towards 0.6m the machine was able to complete most of the trials. Beyond 0.6m, the roughness was simply too large relative to the 1.78m long machine, and failure rates increased. These failures were mainly due to the machine being unable to reach its front footholds, which was a result of the high variability of these foothold locations. Other failures were due to the vertical angles of the legs of the machine being forced too far upward when extremely high footholds were encountered. It will be shown, in Section 6.9, that the response of the simulated machine to increasing roughness levels was similar to the response that occurred in this simulation. That is, regardless of the underlying terrain attitude, a roughness level was reached beyond which a rapid decrease in the trial success rate occurred. The roughness level at which this took place depended on the terrain attitude. Figure 6.4 shows how the average distance travelled by the machine (during successful trials only) decreased as the roughness increased. This was expected because when the roughness increased, the footholds were often perturbed into positions behind where they would ideally have been located. This delayed forward progress. For the same reason, the average speed decreased as the roughness increased. Figure 6.5 illustrates this. Figure 6.5 also includes lines on both sides of the average speed line that indicate one standard deviation of the average speed. This can be seen to grow as the roughness increased and consistent speeds were more difficult to maintain. Figure 6.6 shows the average and peak, tilt and roll errors (relative to the terrain over which the machine was moving) as the roughness increased. It can be seen that both of these error measures grew as the roughness increased. This was due to the fact that at higher roughness levels, the variability of the foothold locations made the underlying terrain attitude more difficult to determine. Also, as the Chapter 6. Heuristic Simulation 0 0.2 0.4 0.6 0.8 1 Roughness in meters Figure 6.3: The Effects on Completion Rate of Varying the Terrain Roughness Chapter 6. Heuristic Simulation Figure 6.4: The Effects on Distance Travelled of Varying the Terrain Roughness Chapter 6. Heuristic Simulation 105 0.01 < Q — - T I r i t n 1 1 1 1 1 1 1 1 1 1 1 1 j 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 r r n ' T T r m T T r n 111 j 111 M 111111111111 M 1111111111 \ 1 1 1 1 1 1 1 1 1 0 0.2 0.4 0.6 0.8 1 Roughness in meters Figure 6.5: The Effects on Speed of Varying the Terrain Roughness machine found movement more difficult, it had to make attitude adjustments more often, resulting in larger tilt and roll errors. None of the trials completed in the simulation with a roughness of 1.0m. The simulated conditions were simply too harsh. It is illustrative to consider the effects of these extreme conditions however. They resulted in a probability of attitude adjustment occurring of 0.053 per step, and a probability of rotational adjustment occurring of 0.002 per step. This was expected because, as explained in Section 4.14, attitude adjustments to reach inaccessible front footholds were more likely to occur than rotational adjustments to reach rear footholds. Machine halting had to occur when either type of adjustment was made, but it also occurred at other times. The probability of the machine halting was 0.066 per step. The average machine speed immediately before halting occurred was 0.0056m/sample time. This speed before halting was typical of that which occurred throughout the simulations. The peak speed that Chapter 6. Heuristic Simulation 50 Q T l I I M"I I I I I I I I I I I I I I I I T l I I I I I I T I TI f T T T I ' t T ' l ' l 1 1 T 1 1 I I I T I I I I I I I I I II I I I I I I I I I I I' I I 1 I I I' I I I II I ' l I'l I n u i T H T 0 0.2 0.4 0.6 0.8 1 Roughness in meters Figure 6.6: The Effects on the Tilt and Roll Errors of Varying the Terrain Roughness Chapter 6. Heuristic Simulation 107 occurred in this 1.0m roughness simulation was 0.0250m/sample time, and the standard deviation of the average speed was 0.0033m/sample time. Compared to the average speed of 0.0046m/sample time, these values indicated that the speed was very inconsistent when the machine was operating under such rough conditions. The average tilt and roll error measurements (relative to the terrain over which the machine was moving) were 8.50° and 4.38° respectively. These values were roughly an order of magnitude larger than those that occurred during the simulation of the terrain with no roughness. 6.4.4 Roughness selection for further simulations Based on the results described above, a standard roughness of 0.5m was used throughout the rest of the simulations. These simulations considered aspects of machine response other than the effects of different roughness levels, and this variable thus had to be fixed. It was apparent that a roughness of 0.5m was challenging when the simulated machine walked on flat terrain, but that this roughness level did not severely impair performance. Thus, it was felt that 0.5m roughness would promote interesting machine responses in simulations designed to reveal other aspects of performance, but that its effects would not be the dominating ones. 6.5 The Effects of Differing Terrain Attitudes A number of simulations were performed to determine the performance of the LOGHAQ heuristics when the machine being controlled by them was crossing terrain of varying attitudes. A roughness of 0.5m was used, and 100 trials of 100 steps were made for each terrain condition. 6.5.1 Varying the tilt Figure 6.7 shows the trial completion rates that resulted from varying the terrain tilt from —45° to 45° in increments of 15°. The roll during these simulations was kept at 0°. It can be seen how extreme terrain tilt conditions greatly reduced the trial success rate. The failures on the downward sloping terrain were mainly due to the machine being unable to reach down to new front footholds. The failures on the upward sloping terrain were mainly due to the legs of the machine becoming over-extended as the machine moved forward toward new stability triangles. Both types of failures were expected from the way in which the terrain slope affected the relationship between the machine center of gravity and the supporting foothold locations (see Section 5.4). Chapter 6. Heuristic Simulation -40 -20 0 20 40 Tilt in degrees Figure 6.7: The Effects on Completion Rate of Varying the Terrain Tilt Chapter 6. Heuristic Simulation 109 Figure 6.8: The Probability of Adjustments and Halts for Different Terrain Tilts Figure 6.8 shows the probability per step of attitude adjustments, rotational adjustments, and ma-chine halts occurring as the tilt was varied. This figure indicates that, while both extremes of terrain tilt resulted in a high probability per step of these machine responses, the downward sloping terrain was more likely to do so. This was because it was more likely, as the simulated machine crossed the upward sloping terrain, that one of its legs would over-extend before it got to the edge of the current stability triangle, than for it to have to make attitude adjustments to reach an inaccessible front foothold once it had arrived at the front edge (see Section 5.4). 6.5.2 V a r y i n g the r o l l Figure 6.9 shows the trial completion rates that resulted from varying the terrain roll from zero to 30° in increments of 15°. At rolls greater than 30° the leg positioning became too difficult for the machine. Chapter 6. Heuristic Simulation 110 0 10 20 30 Roll in degrees Figure 6.9: The Effects on Completion Rate of Varying the Terrain Roll The tilt during these simulations was kept at 0°. Negative rolls were not simulated, as the machine would simply have responded to them in a manner that was a mirror image of its positive roll response. It can be seen in Figure 6.9 how extreme terrain roll conditions greatly reduced the trial success rate. The failures were mainly a result of the machine being unable to make front foot placements. This was because the legs of the machine, under extreme roll conditions, were highly over-extended on one side of the machine and under-extended on the other (see Section 5.4). This resulted in new front footholds often being inaccessible to legs that were already at the extent of their movement range. Leg over-extensions during movement were also a common cause of failure. Figure 6.10 shows the probability per step of attitude adjustments, rotational adjustments, and machine halts occurring as the roll was varied. As expected, the probability of each of these occurrences increased with the roll. Chapter 6. Heuristic Simulation 0.1 0 — I I -"I"' "I ' I I I I I I I I "1 " I 1 T- 1 1 1 1 I— • i"•' -1 || | | 0 10 20 30 Roll in degrees Figure 6.10: The Probability of Adjustments and Halts for Different Terrain Rolls Chapter 6. Heuristic Simulation 112 -20 0 20 Tilt and roll in degrees Figure 6.11: The Effects on Completion Rate of Varying the Terrain Tilt and Roll Together 6.5.3 Varying the tilt and roll together To determine how a machine controlled by the LOGHAQ heuristics performed under extreme terrain slope conditions, the tilt and roll were varied together. They were varied from —30° to 30° in increments of 15°. Figure 6.11 shows the trial completions rates for simulations subjected to these slope variations. It can be seen that the success rate of the LOGHAQ heuristics dropped off rapidly when the terrain varied in either direction away from flat. The cause of the failures paralleled that of the simulations involving only terrain tilt variations. When the machine was travelling down a slope, it usually failed because it could not make front foot placements. When it was travelling up a slope, the failures normally resulted from leg over-extensions. In general, the failures that occurred during these simulations were similar to those that occurred under terrain tilt conditions, but they were further aggravated by the terrain roll. Chapter 6. Heuristic Simulation 113 0.5 0 —1 ' i i f i i i i i I"I " i i r T i i > i i "i ' i i i I ' I I I I f j i i i i i i i i i i i i i i i i i i i j | | I I I I t i-1" -20 0 20 Tilt and roll in degrees Figure 6.12: The Probability of Adjustments and Halts for Different Terrain Tilts and Rolls Figure 6.12 shows the probability per step of attitude adjustments, rotational adjustments, and machine halts occurring as the tilt and roll were varied. These curves also parallel those generated during the terrain tilt variation simulations, as shown in Figure 6.8. Figure 6.13 shows the average speed of the simulated machine as it was subjected to the combined tilt and roll variations. As expected, the highest average speed occurred on the flat terrain. More challenging terrain conditions made maintenance of the speed more difficult. Figure 6.13 also includes lines on both sides of the average speed line that indicate one standard deviation of the average speed. It can been seen that the standard deviation remained quite constant. This was due to the fact that while the tilt and roll of the terrain were varied, the roughness of it was not. Chapter 6. Heuristic Simulation 0.01 CD E 0.008 0.006 -_CD CL E co w ~c/5 v_ CD CD E rz "O 0.004 CD CD CL CO CD 0? 0.002 CD > < one standard deviation Q I i i i i i i i i i j i i i i i i i i i i i i i i i l l l i j i i i i i i i i i i i i i l i l i l i j l i i i i i i i i -20 0 20 Tilt and roll in degrees Figure 6.13: The Effects on Speed of Varying the Terrain Tilt and Roll Together Chapter 6. Heuristic Simulation 115 6 . 6 T u r n i n g The simulations described in this section were performed to determine the performance of a machine controlled by the LOGHAQ heuristics when turning was desired. A roughness of 0.5m was used for all of the simulations in this section. 6 . 6 . 1 V a r y i n g t h e d e s i r e d t u r n i n g r a t e A number of simulations were performed to determine the response of a machine controlled by the LOGHAQ heuristics to different desired turning rates. The turning rates requested of the simulated machine were varied from zero to 15° per half-cycle in increments of 2.5° per half-cycle. These simulations were made on flat terrain and each consisted of 100 trials. Each of these trials ended when the machine had completed a total rotation of 90° or had failed. When the turning rate was 10° per half-cycle or less, the majority of the trials completed successfully. When extreme turning rates were requested (those above 10° per half-cycle), there were a wide variety of reasons for the failures that resulted. Typically the failures were due to the legs on the outside of the machine turn becoming over-extended in some manner. Figure 6.14 shows how many steps were required, on average, for the machine to complete a 90° rotation with the various turning rates. Now each half-cycle consists of two steps, so it would be expected that, with a 2.5° per half-cycle turning rate, it would take a machine 72 steps to complete a 90° rotation. This is very close to the average number of 75.9 that resulted during the simulations. The small discrepancy is due to the roughness of the terrain over which the machine was turning. At a 5° per half-cycle turning rate, 36 steps should be necessary to complete the 90° rotation. This is far less than 54.4 steps that were required on average for this turning rate during the simulations. This discrepancy is due to the fact that, with the model machine dimensions used, the maximum theoretical turning rate was 5.14° per half-cycle (see Section 5.5). As explained in Section 4.9, when the turning rate resulted in foothold locations being desired that were not far enough forward to produce properly sized stability triangles, the desired foothold locations were moved forward to an appropriate position, and the turning rate was temporarily adjusted in the next half-cycle to reflect the changes. This is what caused the 90° rotation to take more steps than expected at the 5° per half-cycle turning rate. While this turning rate was theoretically marginally acceptable, it was not conservative enough when the machine was subjected to terrain roughness. Thus, it was affected by the portion of the Foothold Determination Chapter 6. Heuristic Simulation 116 0 5 10 15 Desired turning rate per half-cycle in degrees Figure 6.14: The Response to Various Turning Rates Per Half-Cycle heuristic that prevented stability triangles from being formed that were too small. Turning rates beyond 5° per half-cycle were affected by this even more. When turning rates were attempted that were higher than 5° per half-cycle, the performance of the machine degraded, as seen in Figure 6.14. This was because the machine could not turn at these rates, and in attempting to do so, counter-productive movement decisions were made by the LOGHAQ heuristics. These counter-productive decisions consisted mainly of having the machine change its rotational orientation faster than the turning rate that was possible with the foot placement limitations (see Section 4.9). This resulted in troublesome inconsistencies between the orientation of the machine platform and the general orientation of its supporting feet. As the turning rate was increased beyond 5° per half-cycle, the probability of failure increased as a result of these counter-productive decisions. Figure 6.15 shows the average speed of the simulated machine that resulted from the various turning Chapter 6. Heuristic Simulation 117 Figure 6.15: The Effects on Speed of Turning rates. The average speed tended to decrease as the turning rate was increased. The reason for this was that as the turning rate increased, the size of the stability triangles on the inside of the turn decreased. This reduced the distance that could be travelled while crossing these stability triangles, and thus reduced the overall speed of movement. Figure 6.15 also includes lines on both side of the average speed line that indicate one standard deviation of the average speed. For the same reason, the standard deviation increased as the turning rate increased. As the stability triangles on the inside of the turn became smaller, there was less consistency between the speed of the machine when it crossed them and when it crossed the fixed size stability triangles on the outside of the turn (see Section 4.9). Both of these machine speed effects level off somewhat at turning rates above 5° per half-cycle. This was because the size of the inside stability triangles was not permitted to fall below the minimum size necessary for continued machine movement. This was discussed briefly above, and in detail in Section 4.9. Chapter 6. Heuristic Simulation 118 6.6.2 Turning on slopes To determine how well a machine being controlled by the LOGHAQ heuristics could turn on sloped terrain, a number of turning simulations were performed on terrain of varying attitudes. The overall deviation of the terrain attitude away from horizontal was varied from zero to 30° in increments of 10°. The limit of 30° was chosen because this was the maximum terrain roll that the simulated machine could handle. For each terrain attitude the machine was made to turn through four quadrants of terrain slope. For example, on the terrain sloped at 10°, the machine was started in a position where the terrain had a tilt of 10° and a roll of 0°. Then it was made to turn 90° until the terrain had a tilt of 0° and a roll of —10°. Next it was made to turn 90° again until the terrain had a tilt of —10° and a roll of 0°. Again it was made to turn 90° until the terrain had a tilt of 0° and a roll of 10°. Finally, it was made to turn 90° again until it returned to its initial position. At the beginning of each of these 90° turns the machine was placed in the starting configuration detailed in Section 6.1. Each of these quadrants was simulated separately in 100 trials. The final results of these 400 trials were combined, but breaking the simulations up into four parts prevented repeated failures in one quadrant of the slope from preventing the collection of results from the others. As it was found, both theoretically and practically, that 5° of turning per half-cycle was the highest practical turning rate for the model machine, this turning rate was adopted in these simulations. Figure 6.16 shows the trial completion rates for the various slope attitudes. As expected, the simu-lated machine had more difficulty completing the 90° turns as the slope attitude was increased. When the machine failed in quadrants of downward tilting terrain, the main reason was that the front foot placements could not be made. This was consistent with the simulation results for downward sloping terrain when the simulated machine did not have to turn (see Section 6.5). The machine also failed in these quadrants because the legs on the outside of the turn became over-extended. When the machine failed in quadrants of upward sloping terrain, the main reason was that the legs became over-extended. This was again consistent with the simulation findings for when the machine did not have to turn. The turning aggravated the over-extension problem however, as the over-extensions occurred far more often in the legs on the outside of the machine. Even though the simulated machine maintained the same 5° per half-cycle turning rate through-out these simulations, the number of steps required to complete the 90° turns increased with the slope attitude. This was due to the difficulties that the harsher slope attitudes presented to the LOGHAQ Chapter 6. Heuristic Simulation 100 - r 0 —j— i—i—i—i—i—i—i—i—i—|—i—i—i—i—i—i—i—i—i—|—i—i— i— i—i—i—i—i—i—j 0 10 20 30 Attitude of the slope in degrees Figure 6.16: Response to Varying Slope Attitudes While Turning at 5° per Half-Cycl Chapter 6. Heuristic Simulation 120 heuristics. Correspondingly, the probability of attitude and rotational adjustments, as well as the prob-ability of the machine halts, increased with the slope attitude. 6 . 7 P e r f o r m a n c e D u r i n g T e r r a i n C h a n g e s After a thorough analysis had been made of the performance of the LOGHAQ heuristics in guiding a simulated machine over planar terrain, simulations were performed to investigate the ability of the heuristics to guide a machine over changes in terrain. An endless variety of terrain changes could have been simulated, and in fact many were tried to determine what the heuristics were capable of, but for the purposes of comprehensive analysis, only a limited set of simple changes were simulated extensively. For each terrain change simulated, 100 trials of 16 steps were made. The changes were presented to the simulated machine after its fourth step at random distances in front of it. The four steps were made so that the roughness (set to 0.5m as usual) of the terrain before the changes would move the machine out of its fixed initial configuration and into a more random one. Empirical observation revealed that a total of 16 steps were needed to ensure that the machine had fully adopted the attitude of the terrain after the changes. The movement of the machine both before and after the terrain changes was made as small as possible to prevent machine failures that had nothing to do with the terrain changes from excessively affecting the results. 6 . 7 . 1 C h a n g e s i n t e r r a i n t i l t Two types of changes were made to the tilt of the terrain. These were to have the terrain initially flat and then change it to tilted, and to have it initially tilted and then change it to flat. In either case, the tilted portion was varied from —45° to 45° in increments of 15°. The trial completion rates that resulted from these changes are shown in Figure 6.17. This figure indicates that the simulated machine could handle difficult terrain tilt changes with few machine failures. The only change that was not handled with a great deal of success was the change from flat terrain to terrain that tilted downward steeply. The failures that this terrain change caused were mainly due to the machine being unable to reach its new front footholds. This was expected, as these front footholds, after the terrain change, were significantly lower than those the machine had previously encountered. Thus they were difficult to reach. When the terrain tilted upward after the terrain change, the footholds beyond the change were actually brought closer to the machine. So in this case the terrain change actually aided the machine somewhat. Chapter 6. Heuristic Simulation -40 -20 0 20 40 Tilt of the tilted portion of the terrain in degrees Figure 6.17: The Effects on Completion Rate of Various Terrain Tilt Changes Chapter 6. Heuristic Simulation 122 2.5 CO CD CL CD -O E C CD CD CO v_ CD > < -20 0 20 Tilt of final terrain in degrees Figure 6.18: The Average Number of Adjustments and Halts During Flat to Tilted Changes Figures 6.18 and 6.19 show the average number of attitude and rotational adjustments, and the average number of machine halts that occurred as a result of the terrain tilt changes. Figure 6.18 shows the response when the terrain was initially flat, and Figure 6.19 when it was initially tilted. These figures indicate that the simulated machine made the most attitude adjustments when it encountered new terrain attitudes that resulted in its front footholds being located higher up relative to its body. This was because the machine had to lift up its front end to make these placements. 6 . 7 . 2 C h a n g e s i n t e r r a i n r o l l Two types of changes were made to the roll of the terrain. These were to have the terrain initially flat and then change it to rolled, and to have it initially rolled and then change it to flat. In either case, the rolled portion was varied from zero to 30° in increments of 10°. Negative rolls were not simulated as the Chapter 6. Heuristic Simulation Figure 6.19: The Average Number of Adjustments and Halts During Tilted to Flat Changi Chapter 6. Heuristic Simulation 124 0 —• — i — i — i — i — i — i — i — i — i — | — i — i — i — i — i — i — i — i — i — j — i — i — i — i — i — i — i — i — i — 0 10 20 30 Roll of the rolled portion of the terrain in degrees Figure 6.20: The Effects on Completion Rate of Various Terrain Roll Changes machine would simply have responded to them in a manner that was a mirror image of its positive roll response. The trial completion rates that resulted from these changes are shown in Figure 6.20. This figure indicates that the simulated machine had more difficulty handling roll changes than it did tilt changes. This was because roll changes resulted in distinct breaks in the foothold levels. The terrain before the change stopped suddenly, and the terrain that continued on afterwards was rotated relative to it. Tilt changes only resulted in simple folds of the simulated terrain. Figure 6.20 indicates that changes from flat terrain to rolled terrain were more difficult for the simulated machine than changes from rolled terrain to flat terrain. The failures that occurred during roll changes were mainly due to the machine being unable to reach new front footholds. Figures 6.21 and 6.22 show the average number of attitude and rotational adjustments, and the average number of machine halts that occurred as a result of the terrain roll changes. Figure 6.21 Chapter 6. Heuristic Simulation 125 4 0 10 20 30 Roll of final terrain in degrees Figure 6.21: The Average Number of Adjustments and Halts During Flat to Rolled Changes shows the response when the terrain was initially flat, and Figure 6.22 when it was initially rolled. These figures further indicate that changes from flat terrain to rolled terrain were more difficult for the simulated machine than changes from rolled terrain to flat terrain. 8.8 The Effects of Varying the Stance of the Machine In order to test the conclusions drawn in Section 5.4 regarding how machine stance affects performance, a number of simulations were performed in which variations were made to different aspects of the stance. To best determine the effects of the variations, it was decided to select an earlier simulation whose conditions had challenged the abilities of the LOGHAQ heuristics. The simulation conditions that were selected were ones where the terrain had a tilt of 30° and no roll. A roughness of 0.5m was used. These conditions had previously resulted in a trial completion rate of roughly 75%. The simulated machine Chapter 6. Heuristic Simulation 126 0 10 20 30 Roll of initial terrain in degrees Figure 6.22: The Average Number of Adjustments and Halts During Rolled to Flat Changes Chapter 6. Heuristic Simulation 127 was not made to turn, and no terrain changes were made. It should be noted that using one set of simulation conditions in this manner could have biased the types of failures that resulted. The failures that normally resulted under these particular conditions would be the ones that most commonly occurred. This effect was observed for, and the analysis was adjusted accordingly. Once the simulation conditions had been selected, the width and height of the machine stance, as well as the stride length, were altered one at a time in a number of simulations. All of the simulations consisted of 100 trials of 100 steps. 6.8.1 Varying the stride Equation 5.2 was used, in Section 5.4, to determine the model machine stride length from the lateral foot placement distance desired and the maximum forward horizontal angle of the legs of the machine. For a given lateral foot placement distance, the maximum forward horizontal angle, 0max, determines the maximum forward distance that the feet of a machine can travel as follows (Equation 5.1): lateral foot placement distance • tan 0max (6-5) Now as explained in Section 5.4, this maximum distance was multiplied by 0.6 to determine the stride length used throughout the simulations. The factor of 0.6 was empirically observed to produce reliable machine performance in preliminary simulations. To further investigate the simulated machine response to this factor, it was varied from 0.4 to 0.7 in increments of 0.1. The lower limit was set to 0.4 because when the stride length was made shorter than the length denned by 0.4, the stability triangles were too small to facilitate walking. This problem was similar in nature to the one that resulted from excessive turning rates, as described in Section 4.9. The upper limit was set to 0.7 because when strides longer than the length defined by 0.7 were used, the legs over-extended almost immediately. The stride lengths generated by the factors from 0.4 to 0.7 were simulated in the standard conditions. The trial completion rates for the various factors are shown in Figure 6.24. These results were somewhat unexpected. It was thought that the shorter stride lengths, due to the fact that they were more conser-vative, would result in more successful completions than the longer stride lengths. The reason that they did not was that when the stride length was shorter, the foot in front of a rear leg that was about to swing had to travel further backward to facilitate that swing. Figure 6.23 shows why this was the case. The extra distance that the front feet had to travel increased the chances that they would over-extend. Chapter 6. Heuristic Simulation 128 Such over-extensions were the cause of the majority of the failures that occurred with the shorter stride lengths. When the factor of 0.7 was used, the majority of the failures were due to leg over-extensions. Section 4.14 explains why overly long stride lengths result in this form of failure. As stated above, factors above 0.7 resulted in almost immediate leg over-extensions. The factor of 0.6 was thus found to be the one that produced the best simulated machine performance. Figure 6.25 shows the effects on the average speed of the simulated machine of varying the stride length. The speed increased with the stride as predicted in Section 3.6. Correspondingly, the distance travelled by the machine during the trials increased from an average of 31.0m at a factor of 0.4, to 44.2m at a factor of 0.7. Figure 6.25 also includes lines on both sides of the average speed line that indicate one standard deviation of the average speed. The standard deviation did not vary much, as the parameters that could substantially alter the difficulty of the movement planning, especially the roughness, were held constant throughout the simulations. 6.8.2 Varying the stance width To determine the effects of altering the width of the simulated machine stance, the lateral distance that the feet were placed relative to the machine was varied in a number of simulations. As described in Section 5.4, this lateral foot placement distance was normally set to 1.3 times the upper leg segment length. This was empirically observed to produce reliable machine performance in preliminary simulations. To verify the validity of this choice, the lateral foot placement distance was varied from 1.1 times the upper leg segment length to 1.5 times the upper leg segment length in increments of 0.1. The trial completion rates that resulted from the various lateral foot placement distances are shown in Figure 6.26. When the lateral foot placement distance was made large, the failures that resulted were mainly due to leg over-extensions. When it was made small, the access range of the feet became too limited, and the failures resulted mainly from the front legs over-extending as they moved backward to facilitate rear leg swings. Lateral foot placements distances outside the range used in these simulations resulted in almost immediate failures due to these effects. These results corresponded exactly with the predictions of performance made in Section 5.4. Chapter 6. Heuristic Simulation 129 Figure 6.23: The Relationship Between Front Foot Travel and Stride Length Chapter 6, Heuristic Simulation 0 — 1 i j i 1 i "i 1 " i"—r | '• I,1 i1 i 1 i i i 1 • i i 1 | 1 r i i i i i i i 40 50 60 70 Stride length as a percentage of maximum possible stride length Figure 6.24: The Effects on Completion Rate of Varying the Stride Length Chapter 6. Heuristic Simulation 0 0.01 i CD > < o — — i — i — ' — • — i — i — i — i — i — i — ' — i — i — i — i — i — i — i — i — j — i — i — i — i — i — i — i — i — i — 40 50 60 70 Stride length as a percentage of maximum possible stride length Figure 6.25: The Effects on Speed of Varying the Stride Length Chapter 6. Heuristic Simulation 100 ~j 1.1 1.2 1.3 1.4 1.5 Lateral foot placement distance / upper leg segment length Figure 6.26: The Effects on Completion Rate of Varying the Stance Width Chapter 6. Heuristic Simulation 133 6.8.3 Varying the stance height To determine the effects of altering the height of the simulated machine stance, it was varied, in a number of simulations, from 0.4m to 1.2m in increments of 0.2m. The trial completion rates that resulted from these simulations are shown in Figure 6.27. When the height was made large, the failures that resulted were mainly due to leg over-extensions. When the height was made small, the failures that resulted were mainly due to the machine being unable to access new footholds that were too high relative to it. They were also due to the vertical angle of the legs being rotated too far upward. Stance heights outside the range used in these simulations resulted in almost immediate failures from these effects. While a height of 0.4m resulted in poor performance of the simulated machine, Figure 6.27 shows that, in general, smaller heights improved performance. Section 5.4 discusses many of the reasons for this. The main conclusion of Section 5.4 is that the height should be made as small as possible. The simulation results bear this out. Figure 6.27 indicates that a height of 0.6m resulted in better performance than a height of 0.8m. The latter height was the one used in all of the other simulations of the LOGHAQ heuristics. The difference between the two responses was not great however, and the larger height had the advantage of additional ground clearance.. Further, the simulation conditions used included a terrain tilt of 30°. It is on sloped terrain that smaller heights improve performance (see Section 5.4), and the simulated machine was not always placed on sloped terrain, so it was felt that the height of 0.8m had been the best to use. 6.9 The Effects of Roughness in Varying Terrain Conditions To determine the general effect of roughness in varying terrain conditions, a final set of simulations were performed. While the first simulations performed investigated the effects of roughness on a simulated machine crossing flat terrain, it was felt that another analysis should be made into the general effects of roughness. So a number of simulations were performed with different combinations of terrain attitude and roughness. The attitude was varied from a terrain tilt of zero to 45° in increments of 15°. The terrain roughness was varied from zero to 1.0m in increments of 0.1m. The terrain roll was kept constant at zero. The trial completion rates that resulted from these simulations, in which 100 trials of 100 steps were made, are shown in Figure 6.28. This figure shows that at each of the terrain tilts, the simulated machine was able to perform with complete success up to a certain roughness. Then, as the roughness was increased beyond that point, the performance at that terrain tilt decayed rapidly until no trials Chapter 6. Heuristic Simulation 100 - j 0.4 0.6 0.8 1 1.2 Height of stance in meters Figure 6.27: The Effects on Completion Rate of Varying the Stance Height Chapter 6. Heuristic Simulation 135 Roughness in meters Figure 6.28: The Effects of Roughness on the Completion Rate of Different Terrain Conditions could be completed. Further, the roughness at which this decay began occurred sooner the greater the terrain tilt was. This indicates that, for any given underlying terrain attitude, there is a roughness level that should not be exceeded if failure free machine response is desired. So for a given machine design, the response of that machine is determined by the overall characteristics of the terrain it is crossing, where these characteristics are a combination of the underlying terrain attitude and the terrain roughness. It is also apparent in Figure 6.28 that the responses to the flat and 15° tilt terrain were not significantly different in terms of completion rates. Further, increasing the terrain tilt from 30° to 45° had a much greater effect on the decaying of the machine response than increasing the terrain tilt from 15° to 30°. These two observations indicate that, to the LOGHAQ heuristics, the effective difficulty of the terrain may increase in some exponential manner with the increase in the underlying terrain attitude. Chapter 7 Conclusions and Recommendations for Further Work 7.1 Summary of the Study This investigation was concerned with the development of a longitudinally oriented movement planner for quadruped walking machines. In the initial stages of the investigation, walking machine research of the past was considered, and it was determined that a movement planner of this nature would be valuable. Most of the recent work on walking machines has involved hexapod designs, and the work that has involved quadrupeds was concerned with machines that could not handle rough terrain, or with machines that crossed rough terrain without following its contours. It was felt that movement of the latter type did not provide the best performance capability on sloped terrain. Thus, a quadruped movement planner that made use of the longitudinally oriented, terrain following strategies of hexapod machines was felt to be of value. The motivation for extending the work in the field of quadrupeds, when this is actually the less popular design, was that quadrupeds may be more suited to quasi-dynamic operation. Quasi-dynamic operation greatly increases the movement speeds possible for a walking machine. This mode of operation is difficult to achieve however, and much remains to be learned about it. Investigations such as this one, in the realm of statically stable quadruped walking machines, help prepare the background for this potential mode of operation. After it had been decided that a longitudinally oriented movement planner for a quadruped would be useful, investigations were made into the general characteristics of quadruped ambulation. These investigations started with previous work in the field, and lead to the development of new conceptions of the quadruped walking problem. The final result was a general movement planning strategy for quadrupeds. This strategy was further developed, in conjunction with extensive computer simulations, to produce a complete forward movement planning package that consisted of a number of heuristics, the LOGHAQ heuristics. These heuristics generated a continuous forward movement plan that followed the terrain. The heuristics did not provide dynamic control, instead they determined a series of joint angles settings that a dynamic controller could follow. The movement plans were not generated in a manner 136 Chapter 7. Conclusions and Recommendations for Further Work 137 that was oblivious to the actual response of the machine however. Every sample time the plans were recalculated entirely using only the current machine state and an overall movement plan. The latter consisted of general movement guidelines that were determined after each foot had completed its forward transition, and was not affected by dynamic response of the machine. When the LOGHAQ heuristics had been completely developed, consideration was made of how a machine should be designed to best respond to them. It was also determined how the heuristic controlling parameters should be adjusted to result in the best machine performance. This analysis resulted in the development of a number of general design and operation guidelines that applied not only to quadrupeds operating under control of the LOGHAQ heuristics, but to all quadrupeds. In the process of developing these guidelines, a model machine was generated that was subsequently subjected to simulated testing. Finally, extensive simulations were performed to test the capabilities of the LOGHAQ heuristics, and to determine the validity of the general guidelines that had been developed. These simulations were carefully constructed to ensure thorough, controlled testing of the heuristics. A wide variety of terrain conditions were simulated, and the machine response to them during a large number of crossings was recorded. These tests revealed that the model machine controlled by the LOGHAQ heuristics could handle, with few crossing failures, a wide variety of terrain attitudes, as well as changes from one attitude to another. The tests also confirmed all of the concepts related to the general characteristics of quadruped walking behaviour that were developed during the course of the study. In addition, a few more characteristics of quadruped ambulation were discovered. 7.2 Results of the Simulations During the simulations of the LOGHAQ heuristics, a number of observations were made. In general, it was found that the heuristics were able to guide the simulated machine over a wide variety of terrain conditions with a considerable degree of success. On perfectly smooth terrain (no roughness), the simulated machine was able to operate on upward terrain tilts of up to 50°, on downward terrain tilts of up to —55°, and on terrain rolls of up to 43°. These values indicate the performance limits of the simulated machine on perfectly smooth terrain. When the terrain roughness was set to 0.5m (which was 28% of the model machine length and 42% of the length of each leg segment), the machine successfully completed 100 steps 74% of the time when the terrain was tilted either upward or downward 45". Again at a roughness of 0.5m, the simulated machine was successful 68% of the time when the terrain was rolled Chapter 7. Conclusions and Recommendations for Further Work 138 15°, and 46% of the time when the terrain was both tilted and rolled 15° (see Section 6.5). Terrain roll conditions affected the performance of the machine more drastically because terrain roll greatly increased the probability of leg over-extensions occurring (see Section 5.4). The overall simulation performance indicated that, for a given walking machine design, the LOGHAQ heuristics should be able to guide that machine over a useful range of terrain attitudes. The exact performance of the heuristics would depend on the actual machine dimensions, and on the roughness of the terrain. It should be repeated (from Section 4.14) that all of the movement failures that occurred during the simulations could have been recovered from. Doing so would have required shuffling of the feet of the machine however, which was not within the capabilities of the LOGHAQ heuristics. These heuristics facilitated only continuous forward movement. The simulations revealed that the response of the simulated machine to differing terrain roughness levels followed a pattern. For different terrain attitudes, the same general response was observed as the roughness was increased. The machine completed all of its 100 step trials until the roughness reached a certain level. Then the trial completion rate dropped off rapidly until no trials were completed. The roughness level at which this decay in performance occurred depended on the underlying terrain attitude (see Section 6.9 and Figure 6.28). It would thus be feasible, given a specific machine design, to determine operational limits for a set of expected general terrain attitudes. At each terrain attitude, the maximum roughness level at which the machine will operate with complete success could be determined. It was found during the simulations that numerous aspects of the machine performance degraded as the terrain conditions were made more difficult. These terrain conditions consisted of both the underlying terrain attitude and its roughness. The distance travelled by the machine over a given number of steps decreased as the difficulties of the terrain prevented selection of foothold locations that would best match the requirements of the LOGHAQ heuristics. For similar reasons, the average speed of the machine decreased, and the standard deviation of this average speed increased. The errors in the tilt and roll of the machine platform relative to the actual terrain attitude also increased as the terrain conditions became more challenging (see Sections 6.4 and 6.5). These general degradations in performance also increased as the turning rate of the machine was increased. This resulted because increased turning rates made movement planning more difficult (Section 6.6). All of these effects were expected. One of the main goals during the development of the LOGHAQ heuristics was to design the heuristics so that they would result in consistent speeds being maintained as the machine moved forward. It was Chapter 7. Conclusions and Recommendations for Further Work 139 found during the simulations, by considering the standard deviation of the average speed, that consistent speeds were in fact maintained under most simulation conditions. Extreme terrain slopes, high levels of terrain roughness, and high turning rates resulted in more inconsistent speeds however. This was an expected response. The simulated machine performed with fairly high levels of success when it crossed from terrain of one underlying attitude to terrain of another (Section 6.7). Its response was highly dependent on the nature of the terrain change and the severity of the difference between the two terrain attitudes however. In addition to these general observations, a number of specific expectations of performance were borne out: • The speed was found to increase as the stride length was increased, as predicted in Section 3.6 (Section 6.8). Excessive stride lengths resulted in leg over-extension failures however, as predicted in Section 4.14. • An optimal lateral foot placement distance relative to the machine was found, as predicted in Section 5.4. This distance, 1.3 times the upper leg segment length, was close enough to the machine to prevent the legs from having to stretch too far outwards, and far enough away from the machine to prevent excessive shortening of the foot access range (Section 6.8). o It was found, as predicted in Section 5.4, that smaller machine stance heights resulted in more successful machine response (Section 6.8). o Equation 4.48 (Section 4.9) accurately predicted the maximum feasible turning rate that the sim-ulated machine could adopt (Section 6.6). o When the machine was travelling across upward sloping terrain, its failures were mainly due to leg over-extensions (Section 6.5). When it was travelling across downward sloping terrain, its failures were mainly due to inaccessible front footholds (Section 6.5). Both of these effects were expected and were due to the relationship between the center of gravity of the machine and its supporting foothold locations on the sloped terrain (see Section 5.4). • The machine made attitude adjustments to reach front footholds far more often than rotational adjustments to reach rear footholds, as predicted in Section 4.14 (Section 6.4). Chapter 7. Conclusions and Recommendations for Further Work 140 It was discovered during the simulations that short stride lengths, instead of resulting in slow but unfailing movement as predicted in Section 3.6, actually resulted in high levels of machine failure. The reasons for this are explained in Section 6.8. 7.3 Contributions of This Work This study resulted in the compilation and extension of a wide range of knowledge about movement planning for longitudinally oriented quadruped walking machines. Such a compilation, especially in regard to quadrupeds that can handle rough terrain, has not, as far as this researcher knows, been made to date. In addition to this, a number of specific contributions were made to the field of quadruped ambulation during the course of developing the LOGHAQ heuristics. These included: o The concept of linked stability triangle support patterns was developed, as well as how these patterns can be used to determine an overall movement plan (see Section 3.4). • The understanding was extended about how various aspects of quadruped walking machines, es-pecially their stride length, affect the maximum possible speed of these machines (see Section 3.6). • A complete strategy was developed for determining how the placement of new footholds should be guided to best facilitate smooth turning (see Section 4.9). o Extensive developments were made regarding how to maintain consistent machine speeds through-out all phases of movement (see Section 4.11). o A thorough investigation was made into what conditions force quadrupeds to halt their forward motion. Techniques to facilitate continued movement, once this had occurred, were developed (see Section 4.14). • A complete strategy for avoiding leg collisions was developed (see Section 4.16). • The practical considerations of designing a quadruped walking machine were fully discussed (see Chapter 5). ' • An improved method of specifying simulated terrain was developed (see Section 6.3). Chapter 7. Conclusions and Recommendations for Further Work 141 7.4 Future Work Possibilities A wide range of work could be performed to extend that done in this study. Such work could include sim-ple improvement of the LOGHAQ heuristics, inclusion of them in a complete movement control package, and extension of this, and other quadruped research to provide quasi-dynamic walking capabilities. 7.4.1 Dynamic application of the LOGHAQ heuristics The LOGHAQ heuristics were never tried on a machine, either simulated or real, that had dynamic response characteristics. It was felt that the recalculation of the movement plan every sample time would ensure realistic response of the planner to dynamic machine behavior, but this was not proven. Dynamic application of the heuristics may reveal practical weaknesses, and will definitely highlight aspects of the heuristics that have to be "tweaked" to provide reasonable performance. For example, as a machine controlled by the LOGHAQ heuristics moves, it cycles through a number of states. During the simulations performed in this study, the transition between these states was determined by machine responses that, having no dynamic disturbances affecting them, were always progressive. In a real application, such smooth progression cannot be ensured. The legs of a machine with dynamic response will bounce when they hit the ground, and waver when they are in the air. To prevent such behavior from causing the LOGHAQ heuristics to oscillate between states, some hysteresis would have to be included in the state transition determinations. It may also be found that the LOGHAQ heuristics have to be adapted separately to every machine upon which they are used. This would particularly be the case if the general design of a machine that was using the heuristics differed from the design outlined in this paper. A different leg design could be used for example, but some modifications to the heuristics would be required. 7.4.2 Improvements to the L O G H A Q heuristics The most obvious improvement that could be made to the LOGHAQ heuristics would be to modify them so that the machine being controlled by them never has to halt its forward motion. This would be very difficult to accomplish however. This is because the footholds that are presented as available to a walking machine are not selected by the machine itself, they are chosen by a scanning system (possibly a human) that selects each foothold out of those that are accessible on the terrain. It is the footholds that determine the long term behavior of a walking machine. If a machine that is being controlled by Chapter 7. Conclusions and Recommendations for Further Work 142 the LOGHAQ heuristics can place its feet wherever the heuristics dictate, the machine will never have to halt. This was shown in simulations over a wide range of terrain conditions (see Chapter 6). So the failures that occur when a machine is being controlled by the LOGHAQ heuristics are due to footholds being chosen that are not at the locations desired by the heuristics. The control over the foothold selection could be improved however. The interaction between the LOGHAQ heuristics and the foothold scanning system could be increased to facilitate better selections being made. Further, the long term effects of each foothold choice could be determined by projecting the future movements of the machine. Then footholds that will lead to the machine halting can be rejected. This technique was used by both Hirose et. al. (1984a and 19846) and McGhee et. al. (1984, or Ozguner, 1984). Both of these solutions, especially the latter, would require extensive computational effort. Neither solution guarantees that a suitable foothold will be found, they just ensure that if there is one, it will be located. The LOGHAQ heuristics could be modified so that it will be known before-hand when the machine being controlled by them is going to halt. Then the heuristics could slow down the machine so that an abrupt halt does not result. This was discussed further in Section 5.3. When a machine being controlled by the LOGHAQ heuristics is travelling slowly, there is little danger of it suddenly reaching the front edge of the current stability triangle. Further, even if it should reach the front edge, its low speed would not result in an abrupt halt taking place. The buffer distance is what is used to prevent both of these problems, but it also affects the speed of the movement (see Section 4.11). The larger the buffer distance is, the lower the machine speed. So when the machine is moving slowly, the buffer distance could be reduced, with little ill effect, to improve the speed. Finally, as stated in Section 5.4 and shown in Figure 4.3, when a machine operating under LOGHAQ heuristic control is on terrain with a roll to it, the legs on one side of the machine become over-extended and the legs on the other side become under-extended. This occurs because the horizontal projection of the center of the machine is made to lie half way between the horizontal projection of the feet on both sides of the machine. To reduce the extension problem, the machine could be allowed to move laterally in the direction of the lower feet. Such an action would affect how the stability triangles are crossed however, and would require some changes in the planning of overall movements (see Section 4.7). 7.4.3 A complete movement control package The LOGHAQ heuristics develop a plan that facilitates continuous forward movement of a longitudinally oriented quadruped. They do not however, allow for any other type of movement. A complete movement Chapter 7. Conclusions and Recommendations for Further Work 143 package could be developed that incorporates the LOGHAQ heuristics, and also includes: • In-place turning to provide higher turning rates than those possible with only forward movement. • Shuffling of the feet to allow a machine to continue moving after its footholds have forced a halt (see Section 4.14). • Side-stepping. • Backing up (likely a simple reverse application of the LOGHAQ heuristics). • Obstacle crossing strategies (Choi, 1988). • Operator adjustment of machine attitude and height (Waldron, 1986). Appendix A Glossary of L O G H A Q Terms Access range the region, determined by the joint angle limits of its legs, that the foot of a walking machine can move within. Buffer distance the distance back from the front edge of the stability triangles that the center of gravity of a machine moves toward. Creep the phase of quadruped motion when the machine is moving forward with all four feet supporting. Follow the leader a walking technique where rear feet are placed in, or near, footholds used by the front feet (see Section 3.3). Following distance the short distance behind the front feet that the rear feet are placed in a follow the leader gait. Ground clearance angle the arbitrarily denned vertical angle that the leg of a machine adopts to avoid striking the ground as it swings forward. Half-cycle the period in which a single stability triangle is crossed, and within which the two legs on one side of a machine are swung forward. Hovering the positioning of a leg in the air above a foothold that it cannot reach (see Section 4.12). Knee the one degree of freedom joint that connects the two segments of a leg. Lateral foot placement distance the distance from the side of the machine that it is preferred that . the footholds be made with. L O G H A Q longitudinally oriented gait heuristics for ambulating quadrupeds. Orientation vectors the three orthogonal vectors that define the attitude of a walking machine plat-form (see Section 4.3). Over-extension movement of a leg beyond the reach defined by the angular limitations of its joints. 144 Appendix A. Glossary of LOGHAQ Terms 145 Quadruped crawl the most stable low speed quadruped gait (see Section 3.2). Roughness the maximum distance, in a terrain simulation, that a chosen foothold can be perturbed from its preferred location (see Section 6.3). Settling factors parameters that determine how much of the old trajectory and attitude of a machine is used in determining the planned trajectory and attitude changes in a new half-cycle of movement. Shoulders the two degree of freedom joint where the legs of a walking machine connect to its platform. Stability margin the distance that must always be maintained between the machine center of gravity and the edge of the stability region. Stability region the region defined by the horizontal projection of the supporting feet of a walking machine that the horizontal projection of its center of gravity must remain within. Stability triangles the triangular stability regions defined by the three supporting feet of a quadruped (see Section 3.4). Stride length the spacing distance between the front feet in the forward direction of a machine (this differs from traditional definitions). Terrain following walking machine movement where the attitude of the machine is adjusted to match the perceived attitude of the terrain. Under-extension movement of a leg too close to its shoulders so that it exceeds the angular limitations of it joints. Appendix B The LOGHAQ Code The following is the "C" code implementation of the LOGHAQ heuristics. This code is fully documented in the paper that precedes this Appendix. 146 /* (TOT / 1101 */ 21-0 HIOIJ e u x j e p s ST'O MIDHVW SUTJ9P# /* sgotre^sTp sxSiretJi A":j.T.-r.T.qBq.s */ / * T d / * Td /* T d / * T<* 08T / 08T / S"2 */ *9£W0 DNVXVH »«TJSP# * / wefro'o ynixvw euT?ep# */ f-QEIS-O-O 10HXVH auTJ«>P# */ fr9£W0 IIIXVW a u t j e p # TOO'O 10VXVW 9 u t 3 i s p # / * SJIOaTUITT. U0Tq.'B.I9T.900B * / 08T 08T 9"2 9'2 9"2 /* ((VOXVH)soo * /* /* /* /* /* /* /* 201 xd id - T O D ^ D S * / 9 / Td * / * 081 / Ot * 08T / 99T xd td id id */ */ */ */ */ */ T.ete-2 £829'0 T869'0 £90Z'2 f>982- 0-fr98Z-0 *98ro 11XVW e u x y a p s DNVdfl s«TJeP# VIXVW e u t j : e p # VOXVH euTfeP# VaXVW e u T j s p t VIIXVH »UTJaP# VHXVH e u x j e p s ViXVW a u t j e p # / * 1101 * lldfl * 2 * / / * 2-1101 + 2-lldfl */ / * - 8 Z T S 9XB 3SV3 PUT2 H1QIW */ /* u;q.oq A ^ T O T i d u i T s TBUOTVsq.TiduiOD J O J :©5.0{j * / 88"2 201 9UTjep# 88*2 TO! eutj:9p# 02'I 1101 »UTjap# 02 "T lldfl e«Tjep# 68'0 3SV8 9«TfsP# 89'0 HICJIK 9UTj8p# / * SU0TSU9UIT.p euTTpisui * / 0 HSlVi su-tjeps T arm 9UT.j9p# /* -suoxaTUTjep i-eqoi9 */ /********************************************************************/ <u-OT.pq.s> epnxouT# <u;-qa'BVii> 8pnxoux# / l i e * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / /********************************************************************/ / * * / / * so t i sTJ [r i9H QVH301 e^I * / /* */ /********************************************************************/ aP°D bVHDOl am, " f f xipuaddy Appendix B. The LOGHAQ Code 148 /* The following are the global variables used by the LOGHAQ h e u r i s t i c s . */ /* machine p o s i t i o n variables */ f l o a t x l , y l , z l , x2, y2, z2, x3, y3, z3, x4, y4, z4; f l o a t a f l , af2, af3, af4, aul, au2, au3, au4, a o l , ao2, ao3, ao4; /* h e u r i s t i c variables */ f l o a t a f l d , af2d, af3d, af4d, auld, au2d, au3d, au4d, aold, ao2d, ao3d, ao4d; f l o a t t i l t , t i l t t , t i l t l , r o l l , r o l l t , r o l l l , turnt, t u r n l ; f l o a t i s s , j s s , kss, i a s , jas, kas, ius, jus, kus, s i , s j , sk; f l o a t xf, yf, z f , xt, yt, zt; f l o a t t y p l , typ2, audrec, tradeg; /* operator set variables */ f l o a t setlm, s e t l t , s e t l h , s e t l r , degrees, s t r i d , height, wide; /* message control variables */ i n t falt_num, f a l t _ c a s , messfl[20]; Appendix B. The LOGHAQ Code /* The following i s the o v e r a l l LOGHAQ program. */ main() •( i n t f a i l c n t , new_leg, l i f t _ l e g , l i f t e d , halted, trydown; in t hung, rem, change, down_check(), stab_check(); f l o a t ispeed, speed; /* these procedures reset the machine to simulation conditions */ init.parametersO; init_machine(&speed, ftlifted, fthalted, fttrydown, ftlift_leg); f a i l c n t =0; while ( f a i l c n t <= 5) { assess_move(lifted, l i f t _ l e g , fespeed); c a l c _ p r e d _ o r i e n t ( l i f t _ l e g , rem); new.leg = FALSE; i f (trydown) new_leg = down_check(); i f (new_leg) -C halted = l i f t e d = FALSE; update_swing_leg(&lift_leg); i f ( l i f t . l e g == 3 I I l i f t . l e g == 4) hc_move_plan(lift.leg); c a l c _ t a r _ a n g ( l i f t _ l e g ) ; c a l c _ p r e d _ o r i e n t ( l i f t _ l e g , 0); f o o t _ d e t e r ( l i f t _ l e g ) ; trydown = FALSE;} i f ((halted) { i f ( l i f t e d ) halted = !stab_check(lift_leg, speed); else l i f t e d = s t a b _ c h e c k ( l i f t _ l e g , -1.0); i f ( ! l i f t e d ) halted = !stab_check(0, speed);} i f (halted) ispeed =0.0; else s p e e d _ c a l c ( l i f t _ l e g , l i f t e d , speed, ftispeed); hung = FALSE; i f ( l i f t e d ) swg_leg_kine(new_leg, l i f t _ l e g , ispeed, &rem, fttrydown, fthung); else approx_remain(ispeed, &rem); i f (hung && halted) a d j u s t _ a t t i t u d e ( l i f t _ l e g , ftrem); b o d y _ k i n e ( l i f t _ l e g , l i f t e d , rem, fthalted, ftchange, ispeed, speed); i f (hung && halted && !change) abort_adjust(); i f ( l i f t e d && ( l i f t . l e g == 3 I I l i f t . l e g == 4)) p r e v _ l e g _ c o l ( l i f t _ l e g ) ; i f ((hung I I ! l i f t e d ) && halted && (change) f a i l c n t += 1; else f a i l c n t = 0; reset_messf1();} d e s c r i b e _ f a i l u r e ( l i f t _ l e g , l i f t e d ) ; } Appendix B. The LOGHAQ Code /* The following are the main LOGHAQ heuristics. * / /*****************************^ assess_move(lifted, l i f t_ l eg , speed) int l i f t ed , l i f t_ leg; float *speed; { float turnest, xdisest, ydisest, zdisest, ang; float xlo, ylo, z lo, x2o, y2o, z2o, x3o, y3o, z3o, x4o, y4o, z4o; float ja , ka, i s , j s , ks, iu , ju , ku, df, ds, du, arctanO, mag3(); int ignore; double sin(), cos(); extern float a f l , af2, af3, af4, aul, au2, au3, au4; extern float aol, ao2, ao3, ao4, t i l t , r o l l ; / * changed * / extern float x l , y l , z l , x2, y2, z2, x3, y3, z3, x4, y4, z4; extern float xf, yf, zf, xt, yt, zt, turnt, turnl; xlo = x l ; ylo = y l ; zlo = z l ; x2o = x2; y2o = y2; z2o = z2; x3o = x3; y3o = y3; z3o = z3; x4o - x4; y4o = y4; z4o = z4; i f ( l i fted == FALSE) { switch(lift_leg) { case 1: ignore = 3; break; case 2: ignore = 4; break; case 3: ignore = 2; break; case 4: ignore = 1;}} else ignore = l i f t_ leg; ja = cos(t i l t) ka = s in( t i l t ) is = cos(roll) iu = s in(rol l) js = iu * ka; ks = - i u * ja; ju = - i s * ka; ku = is * ja; Appendix B. The LOGHAQ Code 151 get_distances(af1, aul, a o l , &df, &ds, &du); x l = - i s * (WIDTH + ds) + i u * du; y l = j a * (BASE + df) - j s * (WIDTH + ds) + j u * du; z l = ka * (BASE + df) - ks * (WIDTH + ds) + ku * du; get_distances(af2, au2, ao2, &df, &ds, &du); x2 = i s * (WIDTH + ds) + i u * du; y2 = j a * (BASE + df) + js * (WIDTH + ds) + j u * du; z2 = ka * (BASE + df) + ks * (WIDTH + ds) + ku * du; get_distances(af3, au3, ao3, &df, feds, &du); x3 = - i s * (WIDTH + ds) + i u * du; y3 = - j a * (BASE - df) - j s * (WIDTH + ds) + j u * du; z3 = -ka * (BASE - df) - ks * (WIDTH + ds) + ku * du; get_distances(af4, au4, ao4, &df, &ds, &du); x4 = i s * (WIDTH + ds) + i u * du; y4 = - j a * (BASE - df) + j s * (WIDTH + ds) + ju * du; z4 = -ka * (BASE - df) + ks * (WIDTH + ds) + ku * du; turnest = 0.0; i f (ignore != 1 && ignore != 2) { ang = arctan(yl - y2, x l - x2) - arctan(ylo - y2o, xio - x2o); i f (ang > PI) ang -= 2.0 * PI; i f (ang < -PI) ang += 2.0 * PI; turnest += ang;} i f (ignore != 3 && ignore != 1) { ang = arctan(y3 - y l , x3 - xl) - arctan(y3o - ylo, x3o - xi o ) ; i f (ang > PI) ang -= 2.0 * PI; i f (ang < -PI) ang += 2.0 * PI; turnest += ang;} i f (ignore != 4 && ignore != 3) { ang = arctan(y4 - y3, x4 - x3) - arctan(y4o - y3o, x4o - x3o); i f (ang > PI) ang -= 2.0 * PI; i f (ang < -PI) ang += 2.0 * PI; turnest += ang;} i f (ignore != 2 && ignore != 4) { ang = arctan(y2 - y4, x2 - x4) - arctan(y2o - y4o, x2o - x4o); i f (ang > PI) ang -= 2.0 * PI; i f (ang < -PI) ang += 2.0 * PI; turnest += ang;} i f (ignore != 1 && ignore != 4) { ang = arctan(yl - y4, x l - x4) - arctan(ylo - y4o, xio - x4o); i f (ang > PI) ang -= 2.0 * PI; i f (ang < -PI) ang += 2.0 * PI; turnest += ang;} i f (ignore != 2 && ignore != 3) { ang = arctan(y2 - y3, x2 - x3) - arctan(y2o - y3o, x2o - x3o); i f (ang > PI) ang -= 2.0 * PI; i f (ang < -PI) ang += 2.0 * PI; turnest += ang;} turnest = turnest / 3.0; turnt += turnest; t u r n l += turnest; Appendix B. The LOGHAQ Code rotat e(turne st, &xt, &yt); rotate(turnest, &xf, &yf); rotate(turnest, &xlo, ftylo); rotate(turnest, &x2o, &y2o); rotate(turnest, &x3o, &y3o); rotate(turnest, &x4o, &y4o); xdisest = ydisest = zdisest = 0.0; i f (ignore != = 1) -c xdisest += x l -xio; ydisest += y l -ylo; zdisest += z l -zlo; i f (ignore ! = 2) { xdisest += x2 - x2o; ydisest += y2 - y2o; zdisest += z2 -z2o; i f (ignore != = 3) { xdisest += x3 - x3o; ydisest += y3 - y3o; zdisest += z3 -z3o; i f (ignore != = 4) { xdisest += x4 - x4o; ydisest += y4 -y4o; zdisest += z4 -z4o; xdisest = xdisest / 3.0; ydisest = ydisest / 3.0; zdisest = zdisest / 3.0; •speed = mag3(xdisest, ydisest, z d i s e s t ) ; xf += xdisest; yf += ydisest; zf += zdisest; xt += xdisest; yt += ydisest; zt += zdisest;} c a l c _ p r e d _ o r i e n t ( l i f t _ l e g , rem) int l i f t _ l e g , rem; •C f l o a t t i l t r , r o l l r , turnr; double cos(), s i n ( ) ; extern f l o a t t i l t , t i l t l , r o l l , r o l l l , t u r n l ; /* changed */ extern f l o a t i a s , jas, kas, i s s , j s s , kss, ius, jus, kus, s i , s j , sk; t i l t r = t i l t l ; r o l l r = r o l l l ; turnr = t u r n l ; i f (rem != 0) -C i f ( t i l t r > ( t i l t + rem * MAXTIL)) t i l t r = t i l t + rem * MAXTIL; i f ( t i l t r < ( t i l t - rem * MAXTIL)) t i l t r = t i l t - rem * MAXTIL; i f ( r o l l r > ( r o l l + rem * MAXR0L)) r o l l r = r o l l + rem * MAXR0L; i f ( r o l l r < ( r o l l - rem * MAXR0L)) r o l l r = r o l l - rem * MAXR0L; i f (turnr > (rem * MAXTUR)) turnr = rem * MAXTUR; i f (turnr < (-rem * MAXTUR)) turnr = -rem * MAXTUR;} Appendix B. The LOGHAQ Code ias = 0.0; jas = c o s ( t i l t r ) ; kas = s i n ( t i l t r ) ; i s s = c o s ( r o l l r ) ; ius = s i n ( r o l l r ) ; j s s = ius * kas; kss = -ius * jas; jus = - i s s * kas; kus = i s s * jas; rotate(turnr, &ias, &jas); rotate(turnr, feiss, &jss); rotate(turnr, feius, &jus); s w i t c h ( l i f t _ l e g ) { case 1: s i = BASE * ias - WIDTH * i s s ; sj = BASE * jas - WIDTH * j s s ; sk = BASE * kas - WIDTH * kss; break; case 2: s i = BASE * ias + WIDTH * i s s ; sj = BASE * jas + WIDTH * j s s ; sk = BASE * kas + WIDTH * kss; break; case 3: s i = -BASE * ias - WIDTH * i s s ; sj = -BASE * jas - WIDTH * j s s ; sk = -BASE * kas - WIDTH * kss; break; case 4: s i = -BASE * ias + WIDTH * i s s ; sj = -BASE * jas + WIDTH * j s s ; sk = -BASE * kas + WIDTH * kss;}} /******************************^ update_swing_leg(lift_leg) i n t * l i f t _ l e g ; { extern f l o a t a f l , af2; /* changed */ extern f l o a t t y p l , typ2; s w i t c h ( * l i f t _ l e g ) { case 1: * l i f t _ l e g = 4; ty p l = ty p l + ( a f l break; case 2: * l i f t _ l e g = 3; typ2 = typ2 + (af2 break; case 3: * l i f t _ l e g = 1; break; case 4: * l i f t _ l e g = 2;}} - typl) * 0.4; - typ2) * 0.4; Appendix B. The LOGHAQ Code hc_move_plan(lift_leg) i n t l i f t _ l e g ; { f l o a t i b , jb, kb, i n , j n , kn, i a , j a , ka, i s , j s , ks, i u , ju, ku; f l o a t iap, jap, kap, iup, jup, kup, r o l l p , t i l t p , tump; f l o a t d i s , xp, yp, zp, mag3(); double s i n ( ) , cos(); extern f l o a t x l , y l , z l , x2, y2, z2, x3, y3, z3, x4, y4, z4, t i l t , r o l l ; extern f l o a t height, setlm, s e t l t , s e t l h , s e t l r , tradeg; /* operator */ /* changed */ extern f l o a t turnt, t i l t t , r o l l t , xt, yt, zt; xp = (x2 + xl) / 2.0; yp = (y2 + yl) / 2.0; zp = (z2 + z l ) / 2.0 + height dis = = mag3(xp, yp, zp); i a = 0.0; J a = c o s ( t i l t ) ; ka = s i n ( t i l t ) ; i s = c o s ( r o l l ) ; i u = s i n ( r o l l ) ; js = i u * ka; ks = - i u * j a ; = - i s * ka; ku = i s * j a ; plane_rotate(tradeg, &is, &js, &ks, &ia, &ja, &ka); xt = dis * i a + (xp - dis * ia) * setlm; yt = dis * j a + (yp - dis * ja) * setlm; zt = dis * ka + (zp - dis * ka) * setlm; i f ( l i f t . l e g == 4) { ib = x2 - x3; jb = y2 - y3; kb = z2 - z3; iap = x l - x3; jap = y l - y3; kap = z l - z3;> else {. ib = x4 - x l ; jb = y4 - y l ; kb = z4 - z l ; iap = x2 - x4; jap = y2 - y4; kap = z2 - z4;> iup = jb * kap - kb * jap; jup = kb * iap - i b * kap; kup = ib * jap - jb * iap; Appendix B. The LOGHAQ Code g e t _ a t t i t u d e ( i a , j a , ka, i u , ju, ku, ftturnt, fttiltt, tarollt); get_attitude(iap, jap, kap, iup, jup, kup, ftturnp, fttiltp, ftrollp); turnt += (tump - turnt) * s e t l t ; t i l t t += ( t i l t p - t i l t t ) * setlh; r o l l t += ( r o l l p - r o l l t ) * setl r ; } /***************************^ c a l c _ t a r _ a n g ( l i f t _ l e g ) in t l i l t _ l e g ; { extern f l o a t turnt, t i l t , t i l t t , r o l l , r o l l t ; /* changed */ extern f l o a t t u r n l , t i l t l , r o l l l ; i f ( l i f t . l e g == 1 I I l i f t _ l e g == 2) { t u r n l = turnt; t i l t l = t i l t t ; r o l l l = r o l l t ; } else { t u r n l = turnt / 2.0; t i l t l = ( t i l t t + t i l t ) / 2.0; r o l l l = ( r o l l t + r o l l ) / 2.0;}} / i i ^ * * * * * * * * * * * * * * * * * * * * * * * * * * ^ f o o t _ d e t e r ( l i f t _ l e g ) i n t l i f t _ l e g ; { f l o a t i s , j s , ks, i a , j a , ka, w, c s t r i d e , oxf, oyf, ozf, bckstr, mstr f l o a t m, t, mag2(), mag3(), arctanQ; double fabs(), tan(), cos(); extern f l o a t x l , y l , z l , x2, y2, z2, x3, y3, z3, x4, y4, z4; extern f l o a t i a s , jas, kas, i s s , j s s , kss; extern f l o a t s t r i d , t i l t , degrees, height; /* operator */ /* changed */ extern f l o a t xf, yf, z f , tradeg; i f ( l i f t _ l e g == 3) { xf = x l - ias * FTCLR; yf = y l - jas * FTCLR; zf = z l - kas * FTCLR;} i f ( l i f t . l e g == 4) { xf = x2 - ias * FTCLR; yf = y2 - jas * FTCLR; zf = z2 - kas * FTCLR;} Appendix B. The LOGHAQ Code 156 i f ( l i f t _ l e g == 1 I I l i f t _ l e g == 2) { i s = i s s ; j s = j s s ; ks = kss; i a = ias; j a = jas; ka = kas; plane_rotate(degrees, &is, &js, &ks, &ia, &ja, &ka); tradeg = degrees; i f ( l i f t . l e g == 1) { w = (x2 - xt) * i s + (y2 - yt) * j s + (z2 - zt + height) * ks + wide; xf = x2 - w * i s ; yf = y2 - w * j s ; zf = z2 - w * ks; m = (y2 - y3) / (x2 - x3); t = (xf * m - x3 * m - yf + y3) / ( j a - i a * m); mstr = 4.0 * (MARGIN + FTCLR) / mag2(ia, ja) + t; xf += mstr * i a ; yf += mstr * j a ; zf += mstr * ka; i f (degrees > 0.0) { cstr i d e = w * tan(a r c t a n ( s t r i d , 2.0 * wide) - degrees) - mstr; i f (cstride < 0.0) { mess(15, degrees, 0, FALSE); cst r i d e = 0.0; tradeg = ar c t a n ( s t r i d , 2.0 * wide) - arctan(mstr, w);}> else { cstr i d e = s t r i d - mstr; bckstr = (xf - x3) * i a + (yf - y3) * j a + (zf - z3) * ka; i f ((bckstr + cstride) > (2.0 * s t r i d ) ) c s t r i d e = 2.0 * s t r i d - bckstr; i f (cstride < 0.0) cst r i d e = 0.0;}} else { w = (xt - xl) * i s + (yt - y l ) * j s + (zt - height - z l ) * ks + wide; xf = x l + w * i s ; yf = y l + w * j s ; zf = z l + w * ks; m = ( y l - y4) / ( x l - x4); t = (xf * m - x 4 * m - y f + y4) / ( j a - i a * m); mstr = 4.0 * (MARGIN + FTCLR) / mag2(ia, ja) + t; xf += mstr * i a ; yf += mstr * j a ; zf += mstr * ka; i f (degrees < 0.0) { cstr i d e = w * tan(a r c t a n ( s t r i d , 2.0 * wide) + degrees) - mstr; i f (cstride < 0.0) { mess(IS, degrees, 0, FALSE); cst r i d e =0.0; tradeg = arctan(mstr, w) - a r c t a n ( s t r i d , 2.0 * wide);}} else { cstr i d e = s t r i d - mstr; bckstr = (xf - x4) * i a + (yf - y4) * j a + (zf - z4) * ka; i f ((bckstr + cstride) > (2.0 * s t r i d ) ) c s t r i d e = 2.0 * s t r i d - bckstr; i f (cstride < 0.0) cst r i d e = 0.0;}} oxf = xf; oyf = yf; ozf = z f ; get_foothold(cstride, i s , j s , ks, &xf, &yf, &zf); Appendix B. The LOGHAQ Code i f (mag3(xf - oxf, yf - oyf, zf - ozf) < (cstride / 2.0)) mess(12, 0.0, 0, FALSE); i f (mag3(xf - oxf, yf - oyf, zf - ozf) > (cstride * 1.25)) mess(13, 0.0, 0, FALSE);» /*********************************^ i n t s t a b _ c h e c k ( l i f t _ l e g , spd) in t l i f t _ l e g ; f l o a t spd; { f l o a t i v , j v , margin, mag2(); int baled, report; extern f l o a t x l , y l , x2, y2, x3, y3, x4, y4; baled = TRUE; i f (spd == -1.0) report = FALSE; else report = TRUE; i f ( l i f t . l e g != 1 && l i f t . l e g != 2) { iv = x l - x2; j v = y l - y2; margin = (jv * x2 - iv * y2) / mag2(iv, j v ) ; i f (margin < (MARGIN + FTCLR)) { baled = FALSE; i f (report == TRUE) mess(14, spd, 0, TRUE); report = FALSE;}} i f ( l i f t _ l e g != 3 && l i f t _ l e g != 1) { iv = x3 - x l ; j v = y3 - y l ; margin = (jv * x l - i v * y l ) / mag2(iv, j v ) ; i f (margin < MARGIN) baled = FALSE;} i f ( l i f t . l e g != 4 && l i f t . l e g != 3) { iv = x4 - x3; j v = y4 - y3; margin = (jv * x3 - i v * y3) / mag2(iv, j v ) ; i f (margin < MARGIN) baled = FALSE;} i f ( l i f t _ l e g != 2 && l i f t . l e g != 4) { iv = x2 - x4; jv = y2 - y4; margin = (jv * x4 - i v * y4) / mag2(iv, j v ) ; i f (margin < MARGIN) baled = FALSE;} i f ( l i f t . l e g != 1 && l i f t _ l e g != 4 && l i f t . l e g != 0) { iv = x l - x4; jv = y l - y4; margin = (jv * x4 - i v * y4) / mag2(iv, j v ) ; i f ( l i f t . l e g == 2 && margin < MARGIN) baled = FALSE; i f ( l i f t . l e g == 3 ft& -margin < MARGIN) baled = FALSE;} i f ( l i f t _ l e g != 2 && l i f t _ l e g != 3 && l i f t . l e g != 0) { iv = x2 - x3; jv = y2 - y3; margin = (jv * x3 - i v * y3) / mag2(iv, j v ) ; i f ( l i f t _ l e g == 4 && margin < MARGIN) baled = FALSE; i f ( l ift.leg'== 1 && -margin < MARGIN) baled = FALSE;} i f (baled == FALSE && report == TRUE) mess(0, spd, 0, TRUE); return(balcd);} Appendix B. The LOGHAQ Code 158 speed_calc(lilt_leg, l i l t e d , speed, ispeed) int l i l t _ l e g , l i l t e d ; lloat speed, *ispeed; { lloat upper, lower, dl, ds, ca, ma, cs, ms, alp, try, por, typsw; lloat xb, yb, zb, xo, yo, zo, t, dis, diso, dcel, arctanO, mag3(), mag2(); double iabsQ, cos(); int i ; extern lloat xt, yt, zt, a l l , a!2, a!3, al4, x l , y l , z l , s i , s j , sk; extern lloat ias, jas, kas, iss, jss, kss, typl, typ2, t i l t ; dis = mag3(xt, yt, zt) - BUFFER / cos(tilt); por = dis / mag3(xt, yt, zt); xb = xt * por; yb = yt * por; zb = zt * por; i l ( l i l t . l e g == 1 I I l i l t _ l e g == 2) { i l ( l i l t . l e g == 1) alp = a l l ; else alp = a!2; dl = (xl - s i - xb) * ias + (yl - sj - yb) * jas + (zl - sk - zb) * kas; ds = (xl - s i - xb) * iss + (yl - sj - yb) * jss + (zl - sk - zb) * kss; i l ( l i l t _ l e g == 1) ds *= -1.0; por = labs(arctan(dl, ds) - alp) / MAXANG; i l (por < 1.0 II dis < 0.0) *ispeed = speed; else *ispeed = dis / por;} else { xo = yo = zo = 0.0; i l ( l i l t _ l e g == 3) { alp = a!3; typsw = typl;} else •[ alp = a!4; typsw = typ2;} i l ( l i l t e d == FALSE && l i l t . l e g == 3) { t = (x4 - xl) * y l - (y4 - yl) * xl; t = t / ((x4 - xl) * yb - (y4 - yl) * xb) + MARGIN / mag2(xb, yb); xo = xb * t; yo = yb * t; zo = zb * t; dl = ias * (x3 - xo - si) + jas * (y3 - yo - sj) + kas * (z3 - zo - sk); ds = iss * (x3 - xo - si) + jss * (y3 - yo - sj) + kss * (z3 - zo - sk); alp = afctan(dl, -ds);} i l ( l i l t e d == FALSE && l i l t _ l e g == 4) { t = (x3 - x2) * y2 - (y3 - y2) * x2; t = t / ((x3 - x2) * yb - (y3 - y2) * xb) + MARGIN / mag2(xb, yb); xo = xb * t; yo = yb * t; zo = zb * t; dl = ias * (x4 - xo - si) + jas * (y4 - yo - sj) + kas * (z4 - zo - sk); ds = iss * (x4 - xo - si) + jss * (y4 - yo - sj) + kss * (z4 - zo - sk); alp = arctan(df, ds);} ca = ias * (xl - xo - si) + jas * (yl - yo - sj) + kas * (zl - zo - sk); ma = ias * (xb - xo) + jas * (yb - yo) + kas * (zb - zo); cs = iss * (xl - xo - si) + jss * (yl - yo - sj) + kss * (zl - zo - sk); ms = iss * (xb - xo) + jss * (yb - yo) + kss * (zb - zo); i l ( l i l t . l e g == 3) { cs = -cs; ms = -ms;} Appendix B. The LOGHAQ Code upper = 1.0; lower = 0.0; l o r ( i = 1; i <= 20; i++) { t r y = (upper + lower) / 2.0; di = ca - t r y * ma; ds = cs - t r y * ms; por = iabs(arctan(di, ds) - alp ) ; por = por / (por + typsw + arctan(2.0 * BASE - d l , ds)); i l (por < try) upper = t r y ; else lower = try;} por = labs(arctan(dl, ds) - alp) / MAXANG; i l (por < 1.0) *ispeed = speed; else *ispeed = t r y * mag3(xb - xo, yb - yo, zb - zo) / por;} diso = mag3(xo, yo, zo); i l ( l i l t e d ==. FALSE && fispeed < speed && diso > 0.0) { dcel = (speed * speed - *ispeed * *ispeed) / 2.0 / diso; i l (dcel < (MAXACL * 0.9)) *ispeed = speed;} i l ( l i l t e d == FALSE && *ispeed < (3.0 * MAXACL)) fispeed = 3.0 * MAXACL; i l (fispeed < (speed - MAXACL)) *ispeed = speed - MAXACL; i l (*ispeed > (speed + MAXACL)) { •ispeed = speed + MAXACL; i l (speed < 0.0001) mess(2, 0.0, 0, FALSE);} i l (*ispeed < MAXACL) fispeed = MAXACL; i l (fispeed < (MAXACL * 1.5) && speed >= (MAXACL * 1.5)) mess(3, 0.0, 0, FALSE);} /****************************^ swg_leg_kine(new_leg, l i l t _ l e g , ispeed, rem, trydown, l a i l e d ) i n t new_leg, l i l t _ l e g , frem, *trydown, * l a i l e d ; l l o a t ispeed; { l l o a t xc, yc, zc, a l l , aul, a o l , d l , ds, du, aid, aud, aod, a l t ; l l o a t ca, ma, cs, ms, cu, mu, reme, arctan(); extern l l o a t xt, yt, z t , x l , y l , z l , s i , s j , sk, t y p l , typ2; extern l l o a t i a s , jas, kas, i s s , j s s , kss, ius, jus, kus; extern l l o a t a l l , a!2, a!3, a!4, aul, au2, au3, au4, aol, ao2, ao3, ao4; /* changed */ extern l l o a t a l l d , a!2d, a!3d, a!4d, auld, au2d, au3d, au4d; extern l l o a t aold, ao2d, ao3d, ao4d, audrec; xc = xt; yc = yt; zc = zt; normalize(&xc, &yc, &zc); xc *= ispeed; yc *= ispeed; zc *= ispeed; ca = ias * (xl - si ) + jas * ( y l - sj] + kas * ( z l - sk) ma ias * xc + jas * yc + kas * zc; cs = i s s * (xl - si ) + jss * ( y l kss * - s j ' ) + kss * ( z l - sk) ms = i s s * xc + jss * yc + zc; cu = ius * (xl - si ) + jus * ( y l " sj ) + kus * ( z l - sk) mu = ius * xc + jus * yc + kus * zc; Appendix B. The LOGHAQ Code 160 s w i t c h ( l i f t _ l e g ) { case 1: aid = a l l ; aud = aul; aod = aol; cs = -cs; ms = -ms; break; case 2: aid = a!2; aud = au2; aod = ao2; break; case 3: aid = a!3; aud = au3; aod = ao3; cs = -cs; ms = -ms; break; case 4: aid = a!4; aud = au4; aod = ao4;} a l t = aid; * l a i l e d = TRUE; i f (arctan(ca, cs) > aid) { l o r (*rem = 1; ( a l t <= (MAXFA + 2.0 * MAXANG)) && f l a i l e d ; *rem += 1) { d l = ca - frem * ma; ds = cs - frem * ms; du = cu - frem * mu; get_angles(dl, ds, du, ftall, ftaul, ftaof, f a i l e d , 0, 0); a l t += MAXANG; i l ( a l t < a l l ) * l a i l e d = TRUE;}} l o r (frem = 1; ( a l t >= (MAXRA - 2.0 * MAXANG)) && f l a i l e d ; *rem += 1) { d l = ca - *rem * ma; ds = cs - frem * ms; du = cu - frem * mu; get_angles(dl, ds, du, &aff, ftaul, &aol, l a i l e d , 0, 0); a l t -= MAXANG; i l ( a l t > a l l ) f l a i l e d = TRUE;}} frem -= 1; i l ( f l a i l e d == TRUE) { mess(4, 0.0, 0, FALSE); i l ( l i l t . l e g == 1) a l l = t y p l ; i l ( l i l t . l e g == 2) a l l = typ2; i f ( l i f t _ l e g == 3 I I l i l t _ l e g == 4) a l l = arctan(ca, cs); i l ( a l l > MAXFA) a l l = MAXFA; i l ( a l l < MAXRA) a l l = MAXRA; i l (aid < (aff + MAXANG) && afd > (aff - MAXANG)) afd = a l l ; i l (aid < a l l ) aid += MAXANG; i l (aid > a f f ) afd -= MAXANG; i f (aud < UPANG) aud += MAXANG;} Appendix B. The LOGHAQ Code else { i l (new.leg == TRUE) aud += MAXANG; else { reme = labs ( ( a o l - aod) / MAXANG); i l (reme > *rem) { mess(5, 0.0, 0, FALSE); •rem = reme + 1;} reme = labs((aul - aud) / MAXANG); i l (reme > *rem) *rem = reme +1; i i (aod < (aol + MAXANG) && aod > (aol - MAXANG)) aod = aol; i i (aod < aol) aod += MAXANG; i i (aod > aol) aod -= MAXANG; i i (*rem == 1 I I *trydown == TRUE) { aid = a i l ; aud -= MAXANG; •trydown = TRUE;} i i (aid < ( a i l + MAXANG) ft& aid > ( a i l - MAXANG)) a i d = a i l ; i i (aid < a i l ) aid += MAXANG; i i (aid > a l l ) aid -= MAXANG; i i (aud > aul && ((aud - aui) / MAXANG) >= (*rem - 2.S)) aud += (audrec - MAXANG) / 2.0; i i (aud < UPANG II aud < (aui + PI / 4.0)) aud += (audrec + MAXANG) / 2.0;}}} i i (aud > MAXUA) aud = MAXUA; i i (aud < MAXDA) aud = MAXDA;} s w i t c h ( l i i t _ l e g ) { case 1: a i l d = aid; audrec = aud - aul; auld = aud; aoid = aod; break; case 2: a!2d = aid; audrec = aud - au2; au2d = aud; ao2d = aod; break; case 3: ai3d = aid; audrec = aud - au3; au3d = aud; ao3d = aod; break; case 4: ai4d = aid; audrec = aud - au4; au4d = aud; ao4d = aod;}} approx_remain(ispeed, rem) l l o a t ispeed; int *rem; { l l o a t d i s , mag3(); double cos(); extern i l o a t t i l t , xt, yt, z t ; i i (ispeed > 0.0) { dis = (mag3(xt, yt, zt) - BUFFER / c o s ( t i l t ) ) / 2.0; i i (dis < 0.0) *rem = 1; else *rem = dis / ispeed +1;} else *rem = 1;} Appendix B. The LOGHAQ Code 162 a d j u s t _ a t t i t u d e ( l i f t _ l e g , rem) in t l i f t _ l e g , •rem; { f l o a t i a , j a , ka, i s , j s , ks, i u , j u , ku, r o l l a , turna, arctanO; f l o a t xw, yw, zw; double fabs(), cos(), s i n ( ) ; extern f l o a t xf, yf, z f , t i l t , r o l l ; /* changed */ extern f l o a t t i l t l , r o l l l , t u r n l ; i f ( l i f t . l e g == 1 I I l i f t . l e g == 2) { mess(10, 0.0, 0, FALSE); •rem = 1; xw = xf + height • s i n ( r o l l ) ; zw = zf + height • c o s ( r o l l ) • c o s ( t i l t ) ; r o l l a = arctan(zw, fabs(xw)); i f (xf > 0.0) r o l l a •= -1.0; r o l l a -= r o l l ; r o l l l = r o l l + r o l l a ; i f ( r o l l a > (MAXR0L / 3.0)) r o l l l = r o l l + MAXRQL / 3.0; i f ( r o l l a < (-MAXR0L / 3.0)) r o l l l = r o l l - MAXRQL / 3.0; j a = c o s ( t i l t ) ; ka = s i n ( t i l t ) ; i s = c o s ( r o l l l ) ; i u = s i n ( r o l l l ) ; j s = i u * ka; ks - i u • j a ; j u = - i s • ka; ku = i s • j a ; xw xf + height • i u ; yw = yf + height * ju; zw = zf + height • ku; iu js • zw - ks • yw ju = ks • xw - i s • zw ku — i s • yw - j s * xw i a zz j u • ks - ku • j s j a = ku • i s - i u • ks ka = i u • j s - j u • i s get_ a t t i t u d e ( i a , j a , ka, i u , ju, ku, ftturna, fctiltl, ftrolla); i f ( ( t i l t l - t i l t ) > (MAXTIL • 0.9)) t i l t l = t i l t + (MAXTIL • 0.9); i f ( ( t i l t - t i l t l ) > (MAXTIL • 0.9)) t i l t l = t i l t - (MAXTIL • 0.9);} Appendix B. The LOGHAQ Code else { mess(16, 0.0, 0, FALSE); •rem = 1; i l ( l i l t . l e g == 3) t u r n l = -MAXTUR / 2.0; else t u r n l = MAXTUR / 2.0;}} /*******************************^ b o d y _ k i n e ( l i l t _ l e g , l i l t e d , rem, halted, change, ispeed, speed) i n t l i l t _ l e g , l i l t e d , rem, *halted, *change; l l o a t ispeed, speed; { l l o a t xd, yd, zd, i a , j a , ka, i s , ks, j s , i u , j u , ku; l l o a t i h , j h , kh, d l , ds, du, turnd, t i l t d , r o l l d ; double cos(), s i n ( ) , l a b s ( ) ; i n t l a i l e d , r s t ; extern l l o a t xt, yt, z t , t i l t , t i l t l , r o l l , r o l l l , t u r n l ; extern l l o a t x l , y l , z l , x2, y2, z2, x3, y3, z3, x4, y4, z4; /* changed */ extern l l o a t a l l d , a!2d, a!3d, a!4d, auld, au2d, au3d, au4d; extern l l o a t aold, ao2d, ao3d, ao4d; xd = xt; yd = yt; zd = zt; normalize(&xd, &yd, &zd); xd *= ispeed; yd *= ispeed; zd *= ispeed; turnd = t u r n l / rem; t i l t d = t i l t + ( t i l t l - t i l t ) / rem; r o l l d = r o l l + ( r o l l l - r o l l ) / rem; i l ( t i l t d > ( t i l t + MAXTIL)) t i l t d = t i l t + MAXTIL; i l ( t i l t d < ( t i l t - MAXTIL)) t i l t d = t i l t - MAXTIL; i l ( r o l l d > ( r o l l + MAXROL)) r o l l d = r o l l + MAXROL; i l ( r o l l d < ( r o l l - MAXROL)) r o l l d = r o l l - MAXROL; i l (turnd > MAXTUR) turnd = MAXTUR; i l (-turnd > MAXTUR) turnd = -MAXTUR; •change = FALSE; i l ( f a b s ( t i l t d - t i l t ) > (MAXTIL / 4.0)) *change = TRUE; i l ( l a b s ( r o l l d - r o l l ) > (MAXROL / 4.0)) *change = TRUE; i l (labs(turnd) > (MAXTUR / 4.0)) *change = TRUE; i a = 0.0; j a = c o s ( t i l t d ) ; ka = s i n ( t i l t d ) ; i s = c o s ( r o l l d ) ; i u = s i n ( r o l l d ) ; j s = i u • ka; ks = - i u * j a ; ju = - i s * ka; ku = i s * j a ; rotate(turnd, &ia, &ja); rotate(turnd, &is, &js); rotate(turnd, &iu, &ju); Appendix B. The LOGHAQ Code r s t = FALSE; i l ( l i l t . l e g != 1 II l i l t e d == FALSE) { ih = x l - (xd + BASE * i a - WIDTH * i s ) ; jh = y l - (yd + BASE * j a - WIDTH * j s ) ; kh = z l - (zd + BASE * ka - WIDTH * ks); dl = i h * i a + j h * j a + kh * ka; ds = - i h * i s - j h * j s - kh * ks; du = i h * i u + j h * j u + kh * ku; get_angles(dl, ds, du, ftafld, &auld, ftaold, ftfailed, 1, *halted); i l ( l a i l e d == TRUE) r s t = TRUE;} i l ( l i l t . l e g != 2 || l i l t e d == FALSE) { i h = x2 - (xd + BASE * i a + WIDTH * i s ) ; j h = y2 - (yd + BASE * j a + WIDTH * j s ) ; kh = z2 - (zd + BASE * ka + WIDTH * ks); dl = i h * i a + j h * j a + kh * ka; ds = i h * i s + j h * j s + kh * ks; du = i h * i u + j h * j u + kh * ku; get_angles(dl, ds, du, &a!2d, &au2d, &ao2d, ftlailed, 2, *halted); i l ( l a i l e d == TRUE) r s t = TRUE;} i l ( l i l t _ l e g != 3 || l i l t e d == FALSE) { i h = x3 - (xd - BASE * i a - WIDTH * i s ) ; j h = y3 - (yd - BASE * j a - WIDTH * j s ) ; kh = z3 - (zd - BASE * ka - WIDTH * ks); d l = i h * i a + j h * j a + kh * ka; ds = - i h * i s - j h * j s - kh * ks; du = i h * i u + j h * ju + kh * ku; get_angles(dl, ds, du, &a!3d, &au3d, &ao3d, ftlailed, 3, *halted); i l ( l a i l e d == TRUE) r s t = TRUE;} i l ( l i l t . l e g != 4 II l i l t e d == FALSE) { i h = x4 - (xd - BASE * i a + WIDTH * i s ) ; jh = y4 - (yd - BASE * j a + WIDTH * j s ) ; kh = z4 - (zd - BASE * ka + WIDTH * ks); d l = i h * i a + j h * j a + kh * ka; ds = i h * i s + j h * j s + kh * ks; du = i h * i u + j h * ju + kh * ku; get_angles(dl, ds, du, &a!4d, &au4d, &ao4d, &failed, 4, *halted); i l ( l a i l e d == TRUE) r s t = TRUE;} i l (rst == TRUE) { mo v e _ r s t ( l i l t _ l e g , l i f t e d ) ; i l (*halted == FALSE) mess(l, speed, 0, FALSE); •halted = TRUE; •change = FALSE;}} abort_adjust() { extern f l o a t t i l t , r o l l ; /* changed */ extern l l o a t t u r n l , t i l t l , r o l l l ; t u r n l = 0.0; t i l t l = t i l t ; r o l l l = r o l l ; } Appendix B. The LOGHAQ Code prev_leg_col(lift_leg) int l i f t_ leg; { float aff, auf, aof, afr, aur, aor, afro, fkh, f fh, f f i , rkh, r fh , r f i ; float iv , fkv, ffv, rms, aflm, arctanO; double sin(), cos(); extern float afld, af2d, auld, au2d, au3d, au4d, aold, ao2d, ao3d, ao4d; extern float af3, af4; / * changed * / extern float af3d, af4d; i f ( l i f t . l e g == 3) { aff = a f l d ; auf = auld; aof = aold; afr = af3d; aur = au3d; aor = ao3d; afro = af3;} else { aff = af2d; auf = au2d; aof = ao2d; afr = af4d; aur = au4d; aor = ao4d; afro = af4;> i f (afr == aff) afr += PI / 45.0; fkh = UPLL * cos(auf); ffh = fkh - LOLL * cos(auf + aof); f f i = BASE * 2.0 / sin(afr - aff) * sin(PI / 2.0 - afr); i f (fkh > ffh && afr > (aff + PI / 10.0)) { rkh = UPLL * cos(aur); rfh = rkh - LOLL * cos(aur + aor); r f i = BASE * 2.0 / sin(afr - aff) * sin(PI / 2.0 + aff); i f ( r f i < rfh) { iv = UPLL * sin(aur); iv -= LOLL * sin(aur + aor) / (rfh - rkh) * ( r f i - rkh);} else iv = UPLL * sin(aur) - LOLL * sin(aur + aor); fkv = UPLL * sin(auf); i f (iv > fkv) rms = fkh + FTCLR / 2.0; else •( ffv = fkv - LOLL * sin(auf + aof); rms = ffh + (fkh - ffh) / (fkv - ffv) * (iv - ffv) + FTCLR / 2.0;} aflm = arctan(2.0 * BASE + rms * sin(aff), rms * cos(aff)); i f (afr > aflm) { mess(11, 0.0, 0, FALSE); i f ((afro - MAXANG) > aflm) aflm = afro - MAXANG; i f ( l i f t_leg == 3) af3d = aflm; else af4d = aflm;}}} Appendix B. The LOGHAQ Code / i t * * * * * * * * * * * * * * * * * * * * * * * * * * /• These procedures are those c a l l e d by LOGHAQ's main procedures. * mo v e _ r s t ( l i f t _ l e g , l i f t e d ) i n t l i f t _ l e g , l i f t e d ; { extern f l o a t a f l , af2, af3, af4, aul, au2, au3, au4; extern f l o a t a o l , ao2, ao3, ao4; /* changed */ extern f l o a t a f l d , af2d, af3d, af4d, auld, au2d, au3d, au4d; extern f l o a t aold, ao2d, ao3d, ao4d; i f ( l i f t e d == FALSE) l i f t _ l e g = 0; i f ( l i f t _ l e g != 1) { a f l d = a f l ; auld = aul; aold = aol;} i f ( l i f t _ l e g != 2) { af2d = af2; au2d = au2; ao2d = ao2;} i f ( l i f t _ l e g != 3) { af3d = af3; au3d = au3; ao3d = ao3;} i f ( l i f t _ l e g != 4) { af4d = af4; au4d = au4; ao4d = ao4;}} ge t _ a t t i t u d e ( i a , j a , ka, i u , ju, ku, turn, t i l t , r o l l ) f l o a t i a , j a , ka, i u , j u , ku, *turn, • t i l t , + r o l l ; { f l o a t hp, vp, mag2(), mag3(), arctanO; •turn = arctan(-ia, j a ) ; • t i l t = arctan(ka, mag2(ia, j a ) ) ; hp = ( i u • j a - j u • ia) / mag2(ja, i a ) ; vp = - i u • i a • ka - j u • j a • ka + ku • ( i a • i a + j a • j a ) ; vp = vp / mag3(ia • ka, j a • ka, i a * i a + j a • j a ) ; • r o l l = arctan(hp, vp);} Appendix B. The LOGHAQ Code 167 get_angles(df, ds, du, af, au, ao, i a i l e d , leg, halted) f l o a t df, ds, du, *af, *au, *ao; in t • f a i l e d , l e g, halted; { f l o a t x, 11, arctanQ, arccosO, mag2(); double a s i n ( ) , s i n ( ) , fabs(); • f a i l e d = FALSE; • af = arctan(df, ds); i f (ds < 0.0) { i f (leg != 0) mess(5 + le g , 0.0, 1, !halted); • f a i l e d = TRUE;} i f (*af > MAXFA) { i f (leg != 0) mess(5 + leg, 0.0, 2, lhalted); • f a i l e d = TRUE;} i f (+af < MAXRA) { i f (leg != 0) mess(5 + leg, 0.0, 3, lhalted); • f a i l e d = TRUE;} i f (•failed == FALSE) { 11 = mag3(df, ds, du); i f (11 > MAXLL) { i f (leg != 0) mess(S + leg, 0.0, 4, lhalted); • f a i l e d = TRUE;} ©1 s © "C •ao = arccos((LCl - 11 • 11) / LC2); i f (+ao < MAXIA) { i f (leg != 0) mess(5 + leg, 0.0, 5, lhalted); • f a i l e d = TRUE;} x = LOLL • sin(+ao) / 11; i f (fabs(x) > 1.0) x = x / fabs(x); •au = arctan(du, mag2(df, ds)) + asin(x); i f (+au > MAXUA) { i f (leg != 0) mess(5 + le g , 0.0, 6, lhalted); • f a i l e d = TRUE;} i f (+au < MAXDA) { i f (leg != 0) mess(5 + leg, 0.0, 7, lhalted); • f a i l e d = TRUE;}}}} get_distances(af, au, ao, df, ds, du) f l o a t af, au, ao, +df, •ds, +du; { f l o a t beta, rad; double cos(), s i n ( ) ; beta = PI - ao - au; rad = UPLL • cos(au) + LOLL • cos(beta); •ds = rad • cos(af); •df = rad • s i n ( a f ) ; •du = UPLL • sin(au) - LOLL • sin(beta);} Appendix B. The LOGHAQ Code plane_rotate(turn, i s , js , ks, i a , ja , ka) float turn, *is, *js, *ks, * ia , *ja, *ka; { float mag, ish, jsh, ksh; double tan(), sqrtO; ish = *is; jsh = *js; ksh = *ks; mag = tan(turn); *is += mag * *ia; *js += mag * *ja; *ks += mag * *ka; *ia -= mag * ish; *ja -= mag * jsh; *ka -= mag * ksh; mag = sqrt(*is * *is + *js * *js + *ks * *ks); i f (mag != 0.0) { • is = *is / mag; *js = *js / mag; *ks = *ks / mag;} mag = sqrt(*ia * *ia + *ja * *ja + *ka * *ka); i f (mag != 0.0) { *ia = *ia / mag; *ja = *ja / mag; *ka = *ka / mag;}} rotate(turn, x, y) float turn, *x, *y; i float rad, ang, arctanO; double sqrt(), cos(), sin(); rad = sqrt(*x * *x + *y * *y); ang = arctan(*y, *x) + turn; *x = cos(ang) * rad; *y = sin(ang) * rad;} normalized, j , k) float * i , * j , *k; { float mag; double sqrt(); mag = sqrt(*i * * i + *j * *j + *k * *k); i f (mag != 0.0) { * i = * i / mag; *j = *j / mag; *k = *k / mag;}} . Appendix B. The LOGHAQ Code l l o a t mag3(x, y, z) l l o a t x, y, z; { double s q r t ( ) ; return(sqrt(x * x + y * y + z * z ) ) l l o a t mag2(x, y) l l o a t x, y; { double s q r t ( ) ; return(sqrt(x * x + y * y));} l l o a t arctan(y, x) l l o a t y, x; { f l o a t ang; double atanQ, l a b s ( ) ; i f (x == 0.0) ang = PI / 2.0; else ang = atan(fabs(y / x)); i f (x < 0.0) ang = PI - ang; i f (y < 0.0) ang = -ang; return(ang);} f l o a t arccos(x) f l o a t x; { double acos(), fabs(); i f (fabs(x) > 1.0) x = x / fabs(x); return(acos(x));} Appendix B. The LOGHAQ Code /* These procedures are ones c a l l e d by the LOGHAQ h e u r i s t i c s that would normally be hardware operators. */ get_foothold(cstride, i s , j s , ks, xf, yf, zf) f l o a t c s t r i d e , i s , j s , ks, *xf, *yf, * z f ; /* This procedure would normally return a permissible foothold l o c a t i o n from a sensor system. This loc a t i o n i s guided by the parameters passed to the sensor system. */ O i n t down_check() /* This procedure would normally return hardware signals from the foot contact sensors that indicate touchdown. */ O Appendix B. The LOGHAQ Code 171 /* These procedures are status i n d i c a t i n g output drivers used by the LOGHAQ h e u r i s t i c s . mess(num, p f l o , pint, halt_cause) i n t num. pint, halt_cause; f l o a t p f l o ; */ i f (messflLnum] == 0) { p r i n t f ( " - " ) ; switch(num) { case 0: p r i n t f p r i n t f break; case 1: p r i n t f p r i n t f break; p r i n t f break; p r i n t f break; p r i n t f break; p r i n t f break; p r i n t f break; p r i n t f break; p r i n t f break; p r i n t f break; p r i n t f break; p r i n t f break; p r i n t f break; p r i n t f break; p r i n t f p r i n t f break; p r i n t f p r i n t f break; case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10 case 11 case 12 case 13 case 14 case 15 case 16 'About to go o f f balance, h a l t i n g from a " ) ; 'speed of %g.\n", p f l o ) ; 'A leg has reached i t s l i m i t , h a l t i n g from a " ) ; 'speed of '/,g.\n", p f l o ) ; 'Sudden acceleration occuring from a low speed.\n"); 'Moving very slowly.\n", p f l o ) ; 'Swing leg positioning error - using f i x e d swing.\n"); 'Unusual event: knee movement i s l i m i t i n g factor.\n"); 'Leg 1 positioning error: " ) ; 'Leg 2 positioning error: " ) ; 'Leg 3 positioning error: " ) ; 'Leg 4 positioning error: " ) ; 'Adjusting attitude to reach foothold.\n"); 'Rear l e g being r e s t r i c t e d i n forward swing.\n"); 'New forward foothold extremely close.\n"); 'New forward foothold beyond maximum stri d e . \ n " ) ; 'Halting to allow f o r back to front foot shuffle " ) ; 'from a speed of '/,g.\ri", p f l o ) ; 'Having d i f f i c u l t y turning at " ) ; 7.g degrees.\n", p f l o * 180.0 / PI * 2.0); i f (num >= 6 && num <= 9) i switch(pint) { case 1: printf("negative side distance.\n"); break; case 2: printf("extended too f a r forward.\n"); break; case 3: printf("extended too f a r backward.\n"); break; case 4: printf("over-extended.\n"); break; case 5: printf("under-extended.\n"); break; case 6: printf("extended too f a r upward.\n");break; case 7: printf("extended too f a r downward.\n");}}} Appendix B. The LOGHAQ Code 172 messfl[num] = 2; i f (halt_cause == TRUE) { falt_num = num; f a l t _ c a s = pint;}} reset_messfl() { i n t i ; f o r ( i = 0; i < 20; i++) { messfl[i] -= 1; i f (messfl[i] < 0) messfl[i] = 0;}} d e s c r i b e _ f a i l u r e ( l i f t _ l e g , l i f t e d ) int l i f t _ l e g , l i f t e d ; •[ int found; found = FALSE; p r i n t f ( " - " ) ; i f ( l i f t e d == FALSE) { i f ((falt_num == 8 && l i f t _ l e g == 3 && f a l t _ c a s ==3) II (falt_num == 9 && l i f t _ l e g == 4 && f a l t _ c a s ==3)) { p r i n t f ( " F a i l u r e 1: rear leg rotated too f a r back during creeping.\n"); found = TRUE;} i f ((falt.num == 8 && l i f t _ l e g == 3 && f a l t _ c a s ==4) II (falt.num == 9 && l i f t _ l e g == 4 && f a l t _ c a s ==4)) { p r i n t f ( " F a i l u r e 2: rear l eg over extended during creeping.\n"); found = TRUE;}} i f ( l i f t e d == TRUE Sc& ( l i f t . l e g == 1 I I l i f t _ l e g == 2) && (falt.num == 0 I I falt_num == 14)) { p r i n t f ( " F a i l u r e 3: end of s t a b i l i t y t r i a n g l e reached and " ) ; printf("forward placement f a i l e d . \ n " ) ; found = TRUE;} i f (found == FALSE) { printf("Unusual f a i l u r e : " ) ; i f ( l i f t e d == TRUE) p r i n t f ("leg */,d placement f a i l e d , and ", l i f t _ l e g ) ; else p r i n t f ("creeping to swing leg y.d, and ", l i f t _ l e g ) ; i f (falt_num == 0 I I falt_num == 14) printf("reached end of s t a b i l i t y region.\n"); else { i f ((falt.num - 5) == l i f t _ l e g ) p r i n t f ( " i t " ) ; else p r i n t f ("leg '/.d ", falt_num - 5); Appendix B. The LOGHAQ Code 173 switch(falt_cas) { case 1: printf("had a negative side value.\n"); break; case 2: printf("extended too far forward.\n"); break; case 3: printf("extended too far backward.\n"); break; case 4: printf("over-extended.\n"); break; case 5: printf("under-extended.\n"); break; case 6: printf("extended too far upward.\n");break; case 7: printf("extended too far downward.\n");}}}} Appendix B. The LOGHAQ Code /* These procedures were used to set the i n i t i a l conditions during the simulations of the LOGHAQ h e u r i s t i c s . */ init_parameters() { double tan(); /* changed */ extern f l o a t wide, s t r i d , height, setlm, s e t l h , s e t l r , s e t l t ; extern f l o a t tradeg, degrees; wide = 1.3 * UPLL + WIDTH; s t r i d = (wide - WIDTH) * tan(MAXFA) * 0.6; height = LOLL * 2.0 / 3.0; setlm = s e t l h = s e t l r = 0.6; s e t l t =0.1; tradeg = degrees = 0.0;> init.machine(speed, l i f t e d , halted, trydown, l i f t _ l e g ) f l o a t *speed; in t * l i f t e d , *halted, *trydown, * l i f t _ l e g ; { f l o a t j a , ka, i s , j s , ks, i u , j u , ku, df, ds, du, i h , j h , kh, arctanO; in t f a i l , i ; double cos(), s i n ( ) ; /* changed */ extern f l o a t x l , y l , z l , x2, y2, z2, x3, y3, z3, x4, y4, z4; extern f l o a t a f l , af2, af3, af4, aul, au2, au3, au4, aol, ao2, ao3, ao4; extern f l o a t t y p l , typ2, audrec, t i l t , r o l l ; *speed = 0.0; •halted = FALSE; • l i f t e d = *trydown = TRUE; * l i f t _ l e g = 1; ty p l = typ2 = arctan(1.5 * s t r i d - BASE, wide - WIDTH); audrec = 0.0.; t i l t = r o l l = 0.0; j a = c o s ( t i l t ) ; ka = s i n ( t i l t ) ; i s = c o s ( r o l l ) ; i u = s i n ( r o l l ) ; js = i u * ka; ks = - i u * j a ; ju = - i s * ka; ku = i s * ja; Appendix B. The LOGHAQ Code 175 x l = -wide * i s ; y l = -wide * j s + 1.5 * s t r i d * j a ; z l = -wide * ks + 1.5 * s t r i d * ka x2 = wide * i s ; y2 = wide * j s + 0.5 * s t r i d * j a ; z2 = wide * ks + 0.5 * s t r i d * ka -x3 = -wide * i s ; y3 = -wide * j s - 0.5 * s t r i d * j a ; z3 = -wide * ks - 0.5 * s t r i d * ka x4 = wide * i s ; y4 = wide * j s - 1.5 * s t r i d * j a ; z4 = wide * ks - 1.5 * s t r i d * ka -ih = x l + WIDTH * i s ; jh = y l - (BASE * j a - WIDTH * j s ) ; kh = z l - (BASE * ka - WIDTH * ks); d i = j h * j a + kh * ka; ds = - i h * i s - j h * j s - kh * ks; du = i h * i u + j h * ju + kh * ku; get_angles(df, ds, du, ftall, &aul, &aol, ftfail, 1, FALSE); ih = x2 - WIDTH * i s ; jh = y2 - (BASE * j a + WIDTH * j s ) ; kh = z2 - (BASE * ka + WIDTH * ks); dl = j h * j a + kh * ka; ds = i h * i s + j h * j s + kh * ks; du = i h * i u + j h * ju + kh * ku; get_angles(df, ds, du, &af2, &au2, fcao2, & f a i l , 2, FALSE); ih = x3 + WIDTH * i s ; jh = y3 - (-BASE * j a - WIDTH * j s ) ; kh = z3 - (-BASE * ka - WIDTH * ks); df = j h * j a + kh * ka; ds = - i h * i s - j h * j s - kh * ks; du = i h * i u + j h * j u + kh * ku; get_angles(df, ds, du, &af3, &au3, &ao3, fcfail, 3, FALSE); i h = x4 - WIDTH * i s ; jh = y4 - (-BASE * j a + WIDTH * j s ) ; kh = z4 - (-BASE * ka + WIDTH * ks); df = j h * j a + kh„* ka; ds = i h * i s + j h * js + kh * ks; du = i h * i u + j h * ju + kh * ku; get_angles(df, ds, du, &af4, &au4, &ao4, fcfail, 4, FALSE); falt_num = f a l t _ c a s = 0; for ( i = 0; i < 20; i++) messfl[i] = 0;} - height; height; - height; height; References Adachi, H., E. Nakano and N. Koyachi (1987), "Mechanism and control of the quadruped walking robot", International Conference on Industrial Electronics, Control, and Instrumentation, pp. 630-635. Alexander, R. M. (1984), "The gaits of bipedal and quadrupedal animals", The International Journal of Robotics Research, Vol. 3, No. 2, pp. 49-59. Bartholet, S. J . (1986), "The evolution of Odetics walking machine technology", Proceedings of S.P.I.E., Vol. 727, pp. 25-31. Bessonov, A. P. and N. V. Umnov (1973), "The analysis of gaits in six-legged vehicles according to their static stability", Proceedings of the IFToMM Symposium on Robots and Manipulator Systems, pp. 1-10. Choi, B. S. and S. M. Song (1988), "Fully automated obstacle-crossing gaits for walking machines", Proceedings of the I.E.E.E. International Conference on Robotics and Automation, pp. 802-807. Frank, A. A. and R. B. McGhee (1969), "Some considerations relating to the design of autopilots for legged vehicles", Journal of Terramechanics, Vol. 6, No. 1, pp. 23-35. Gavrilovic, M . (1973), "Optimal locomotion path planning of legged mechanisms", Advances in External Control of Human Extremities, pp. 387-397. Glower, J . S. and TJ. Ozguner (1986), "Control of a quadruped trot", I.E.E.E. International Conference on Robotics and Automation, Vol. 3, pp. 1496-1501. Gurfinkel, V. S., E. V. Gurfinkel, A. Y. Shneider, E . A. Devjanin, A. V. Lensky and L. G. Shtilman (1981), "Walking robot with supervisory control", Mechanism and Machine Theory, Vol. 16, pp. 31-36. Hirose, S. (1984a), "A study of design and control of a quadruped walking vehicle", The International Journal of Robotics Research, Vol. 3, No. 2, pp. 113-133. Hirose, S., M. Nose, H. Kikuchi and Y. TJmetani (19846), "Adaptive gait control of a quadruped walking vehicle", Robotics Research: The First International Symposium, pp. 253-277. Hirose, S., and Y. TJmetani (1978), "Some considerations of a feasible walking mechanism as a terrain vehicle", Proceedings of the IFToMM Symposium on Robots and Manipulator Systems, pp. 357-375. Kaneko, M., M. Abe, S. Tachi, S. Nishizawa, K. Tanie and K. Komoriya (1984), "Legged locomotion machine based on the consideration of degrees of freedom", Proceedings of the IFToMM Symposium on Robots and Manipulator Systems, pp. 403-410. Kaneko, M., M. Abe and K. Tanie (1985), "A hexapod walking machine with decoupled freedoms", I.E.E.E. Journal of Robotics and Automation, Vol. RA-1, No. 4, pp. 183-190. Kessis, J . J. , J . P. Rambaut and J . Penne (1981), "Walking robot multi-level architecture and imple-mentation" , Proceedings of the IFToMM Symposium on Robots and Manipulator Systems, pp. 297-304. Klein, C. A., K. W. Olson and D. R. Pugh (1983), "Use of force and attitude sensors for locomotion of a legged vehicle over irregular terrain", The International Journal of Robotics Research, Vol. 2, No. 2, pp. 3-17. Lee, T. T. and C. M. Liao (1985), "On the hexapod crab walking tripod gait", 15th International Sym-posium on Industrial Robots, pp. 263-270. 176 References 177 Lee, T. T., C. M. Liao and T. K. Chen (1988), "On the stability properties of hexapod tripod gait", 1, E.E.E. Journal of Robotics and Automation, Vol. 4, No. 4, pp. 427-434. Lee, T. T. and C. L. Shih (1986a), "A study of the gait control of a quadruped walking vehicle", I.E.E.E. Journal of Robotics and Automation, Vol. RA-2, No. 2, pp. 61-69. Lee, T. T. and C. L. Shih (19866), "Real time computer control of a quadruped walking robot", Trans-actions of the A.S.M.E., Vol. 108, pp. 346-353. Lee, W. J. and D. E. Orin (1986c), "The kinematics of legged locomotion over uneven terrain", I.E.E.E. International Conference on Robotics and Automation, Vol. 3, pp. 1490-1495. McGhee, R. B. (1967), "Finite state control of quadruped locomotion", Simulation, Vol. 9, No. 1, pp. 135-140. McGhee, R. B. (1968), "Some finite state aspects of legged locomotion", Mathematical Biosciences, Vol. 2, pp. 67-85. McGhee, R. B. (1976), "Robot locomotion", Neural Control of Locomotion, Vol. 18 of Advances in Be-havioral Biology series (eds. R. M. Herman et. al.), Plenum Press: New York, pp. 237-264. McGhee, R. B. and G. I. Iswandhi (1979), "Adaptive locomotion of a multilegged robot over rough terrain", I.E.E.E. Transactions on Systems, Man, and Cybernetics, Vol. SMC-9, No. 4, pp. 176-182. McGhee, R. B. and A. A. Frank (1968), "On the stability properties of quadruped creeping gaits", Mathematical Biosciences, Vol. 3, pp. 331-351. McGhee, R. B., F. Ozguner and S. J. Tsai (1984), "Rough terrain locomotion by a hexapod robot using a binocular ranging system", Robotics Research: The First International Symposium, pp. 227-251. Messuri, D. A. and C. A. Klein (1985), "Automatic body regulation for maintaining stability of a legged vehicle during rough-terrain locomotion", I.E.E.E. Journal of Robotics and Automation, Vol. RA-1, No. 3, pp. 132-141. Miura, H. and I. Shimoyama (1984), "Dynamical walk of biped locomotion", Robotics Research: The First International Symposium, pp. 303-325. Mocci, U., M. Petternella and S. Salinari (1973), "Experiments with six-legged walking machines with fixed gait", Advances in External Control of Human Extremities, pp. 370-386. Mosher, R. S. (1969), "Exploring the Potential of a Quadruped", S.A.E. Paper No. 690191. Orin, D. E. (1982), "Supervisory control of a multilegged robot", The International Journal of Robotics Research, Vol. 1, No. 1, pp. 79-91. Orin, D. E. , R. B. McGhee and V. C. Jaswa (1976), "Interactive computer-control of a six-legged robot vehicle with optimization of stability, terrain adaptability, and energy", I.E.E.E. Decision and Control Conference, pp. 382-391. Ozguner, F., S. J. Tsai and R. B. McGhee (1984), "An approach to the use of terrain-preview informa-tion in rough-terrain locomotion by a hexapod walking vehicle", The International Journal of Robotics Research, Vol. 3, No. 2, pp. 134-146. Pearson, K. G. and Franklin, R. (1984), "Characteristics of leg movements and patterns of coordination in locusts walking on rough terrain", The International Journal of Robotics Research, Vol. 3, No. 2, pp. 101-112. Raibert, M. H. and I. E. Sutherland (1983), "Machines that walk", Scientific America, Vol. 248, No. 2, pp. 44-53. References 178 Song, S. M. and K. J. Waldron (1987), "An analytical approach for gait study and its application on wave gaits", The International Journal of Robotics Research, Vol. 6, No. 2, pp. 60-71. Song, S. M. and K. J. Waldron (1989), Machines That Walk: The Adaptive Suspension Vehicle, The MIT Press, Massachusetts. Taguchi, K., K. Ikeda and S. Matsumoto (1976), "Four-legged walking machine", Proceedings of the IFToMM Symposium on Robots and Manipulator Systems, pp. 163-170. Takanishi, A., G. Naito, M. Ishida and I. Kato (1984), "The realization of plane walking by the biped walking robot WL-10R", Proceedings of the IFToMM Symposium on Robots and Manipulator Systems, pp. 383-393. Tsai, C. K. and D. E. Orin (1986), "Using proximity sensing in robot leg control", Proceedings of the I.E.E.E. International Conference on Robotics and Automation, Vol. 3, pp. 1502-1506. Waldron, K. J. and G. L. Kinzel (1981), "The relationship between actuator geometry and mechanical efficiency in robots", Proceedings of the IFToMM Symposium on Robots and Manipulator Systems, pp. 305-316. Waldron, K. J . and R. B. McGhee (1986), "The Adaptive Suspension Vehicle", I.E.E.E. Control Systems Magazine, Vol. 6, No. 6, pp. 7-11. Waldron, K. J. , S. M. Song, S. L. Wong and J . Vohnout (1984), "Mechanical and geometric design of the Adaptive Suspension Vehicle", Proceedings of the IFToMM Symposium on Robots and Manipulator Systems, pp. 295-306. Wilson, D. M. (1966), "Insect walking", Annual Review of Entomology, Vol. 11, pp. 103-123. Wong, H. C. and D. E. Orin (1988), "Reflex control of the prototype leg during contact and slippage", Proceedings of the I.E.E.E. International Conference on Robotics and Automation, pp. 808-813. 

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
https://iiif.library.ubc.ca/presentation/dsp.831.1-0064928/manifest

Comment

Related Items