Abstract:
A vehicle is guided along a hall by obtaining distances between it and the nearest objects along a plurality of directions, fitting straight lines through the distances to define the walls of the hall, determining its distance from the center of the hall and its angular orientation with respect thereto and directing it to a given point on the center or other line with an angular rotation so that it faces along the center line.

Description:
FIELD OF THE INVENTION 
     This invention is in the field of controlling the path followed by a robot. 
     BACKGROUND OF THE INVENTION 
     Robots have now reached a stage of development where they can potentially perform a number of tasks such as mail delivery, security patrol, visitor guidance and looking for leaks. All these tasks require a basic method for directing a robot for specific distances along a hallway as well as ways of detecting junctions and turns. Heretofore, research has been directed to methods for finding a path to a given location in such manner as to avoid obstacles. Information for these purposes has been obtained by sonar sensors. Unfortunately, an obstacle avoidance system is very sensitive to irregularities in the hall such as open doors and fire extinguishers. 
     SUMMARY OF THE INVENTION 
     In accordance with this invention, a robot is guided along the center line of a hall, or a line parallel to the center line, in response to information as to the width of the hall and distances at different angles between the robot and the nearest object. The distance information may be derived by sonar sensors on either side of the robot. A least square technique is used to fit straight lines to the said nearest objects on either side of the robot so as to define the distance of the robot from the center line of the hall as well as its angular orientation with respect to the hall. It is then only necessary to effect steering control to bring the robot to the center or other line with a heading directly down the hall. 
     In carrying out this process, distances that are greater than a given value are eliminated from the calculations. Thus, for example, the larger distance obtained when a sensor beam passes through an open doorway is ignored. 
     Whereas the sonar beams have a width of about 22.5°, the angular position of the robot is determined with a resolution of 2° or 3° because of the line fitting technique just described. 
     The position of the robot with respect to a line along a hallway is generally determined from its distance to each wall that is derived from the appropriate distance measurements at different angles, but if one distance is more than the width of the hall, it is not used in deriving the steering control. Thus, for example, the robot continues to move along the center of a hall when a large entryway or lobby is on one side. 
     When an obstacle such as a drinking fountain is encountered along one wall, the line fitting technique causes that wall to appear to be closer so that the robot is moved away from it. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 illustrates the essential components of a robot useful with this invention; 
     FIG. 2 shows an arbitrary initial position of a robot in a hall; 
     FIG. 3 shows a robot with sensors at five angles on each side with the useable distance measurements being indicated by crosses; 
     FIG. 4 is like FIG. 3 and shows the straight lines fit to the useable distances. 
     FIG. 5 shows a robot having a heading error α and a deviation δ from the center line; 
     FIG. 6 shows the steering angle θ that is used to move the robot having a deviation δ and a heading error of α to the center line in a distance λ&#39;. 
     FIG. 7 is a flowchart illustrating the fitting of a line to one set of closest objects; 
     FIG. 8 is a flowchart illustrating the calculation of steering are and speed; and 
     FIG. 9 is a flowchart for guiding the robot and determining when it has traveled an assigned distance. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     FIG. 1 is a schematic representation of the essential components of a robot 2 with which this invention may be used. A robot 2 called the NOMAD 200 by its manufacturer Nomadic Technologies, Inc., of Mountainview, Calif., was used in an engineering prototype incorporating the present invention. The robot 2 is comprised of a base 4 and a turret 6 mounted for rotation about an axis 7 thereof. A plurality of sonar sensors 8, 10, 12, 14, 16, and 18 are distributed around the turret 6 so as to direct sonar beams at different angles such as shown in FIGS. 2 and 3. A microprocessor 20 supplies signals for energizing the sensors in sequence, derives the distance to the nearest object for each sensor, and performs the line fitting process and signal processing functions. In addition, the microprocessor 20 provides control signals to motors 22, 24, and 26 that respectively drive wheels 28, 30 and 32 that are connected to the base 4 via swivels 34, 36, and 38. The angular direction in which the wheels 28, 30, and 32 are rolling under the control of their respective motors 22, 24, and 26 is due to the action of rotators 40, 42, and 44, respectively, that are controlled by the microprocessor 20. An x, y register 46 indicates the x,y position of the robot 2. 
     Beside the travel length and the hallway width no other environmental information is supplied to a robot 2 controlled as in this invention. The robot 2 has no information about the number of doors (which may be open or closed), items which are mounted on the walls, e.g. fire extinguishers, items which are stored in the hallway close to the walls, e.g. trash bins, junctions, or people walking by or standing in the hallway. 
     Another problem comes up with the usage of sonar sensors. Although they have some good features, e.g. low price and good accuracy under proper conditions, they have poor angular resolution. Regular sonar sensors have a resolution of about 20 degrees. This means that if the sensor reports an obstacle at a certain distance, one does not receive more information about the shape or the relative orientation between this obstacle and the robot 2. The method for traveling along a hall therefore has to deal with this special characteristic of sonar as well. 
     Some robots require steering like (10,5) which means: go 10 cm forward and turn left by 5 degrees (positive angles are always assumed to be left turns and negative angles are right turns). Other robots require more indirect steering by specifying motor velocities like (50,-6) which means: go forward at a speed of 50 cm/s (centimeters per second) and turn right at a speed of 6 degrees/s. This invention can operate with either steering method. 
     Initially, as indicated in FIG. 2, the robot 2 does not know about the distances to the walls 47 and 48 on both sides, and it does not know the direction it is heading. It is crucial for all steering routines to know these two parameters. 
     In the first step for obtaining these parameters the robot 2 fires its sonar sensors. This can be done in an arbitrary order and at an arbitrary firing rate with, for example, 8 ms (millisecond) delay between two subsequent sonar firings. It is important for the following steps that the angles of the sonar sensors relative to the robot&#39;s forward direction be known. After the distance to the nearest object is derived for each sensor, the microprocessor 20 uses the distance information and each sensor&#39;s angle to calculate the position of the nearest object at each angle in world coordinates. Since the robot 2 is assumed to travel in a hall, these coordinates should represent certain positions of the wall on both sides of the robot 2. Due to the inaccuracy of sonar (i.e. noise and partial absorption) these readings may not always match with the actual walls. Although a different firing order can be used, the sensors were fired in this order 10, 8, 18, 12, 16, and 14, wherein the sensor 8 is at the front and the other sensors are numbered in counterclockwise order. Only six sensors are shown in FIG. 1, but better performance is obtained if five sensors are used on either side with an angle of 22° between them as illustrated in FIG. 3. 
     In the second step, the distances to the nearest objects are filtered in order to get rid of those that are unsuitable. For example, the 45°, 68°, 225°, and 248° sensors in FIG. 3 will report a much longer distance than actually exists due to sonar reflections if the entry angle is too large. Another reason not to take all distances will be found if the hallway is not perfect. This means there might be open doors, fire extinguishers, trash bins, and other irregularities in the hall. This filter step eliminates the effects produced by these things to some extent. This pruning of the sonar readings depends on the width of the hall. In one case, the limits of the sonar distances used in calculating suitable distances were set to 75 inches in a 69 inch wide hallway. In the third step, straight lines 47&#39; and 48&#39; are fit through the acceptable closest objects shown by crosses on both sides of the robot 2 in FIG. 4. Since the walls 47 and 48 of the hall are assumed to be straight (although this does not hold in every case due to the irregularities mentioned above), a straight line through these closest objects gives a good approximation of the robot&#39;s angular orientation with respect to the walls. This line fitting approach also overcomes the poor angular resolution of the sonar sensors. If at least three sensors are used to calculate the robot&#39;s orientation, a reasonable accuracy of about 2-3 degrees can be achieved. 
     This line fitting is done using the three formulas below: ##EQU1## 
     The symbols used in the formulas above have the following meaning: 
     Σx sum of the sonar&#39;s x coordinates 
     Σy sum of the sonar&#39;s y coordinates 
     Σxy sum of the product of x and y coordinates 
     Σx 2  sum of the square of the x coordinates 
     n the number of coordinates used 
     Thus, these equations deliver the robot&#39;s distance to the walls on its left and right hand side as well as the robot&#39;s angular orientation with respect to the walls. Of course, due to the sonar imperfections and irregularities of the hallway the two lines&#39; angles do not necessarily have the same value. For example, if there is an irregularity on the left hand side, this angle will certainly be different from the angle on the right hand side. 
     The fourth step of the hall traveling method is therefore to combine the distance and angle parameters of the lines 47&#39; and 48&#39; in such a way that only the desired information on the robot&#39;s deviation δ from the center line and its heading α is left as shown in FIG. 5. This is done by checking whether the distance parameters of each line are within a reasonable range for a hallway of this size. Reasonable parameters should show distances d 1  and d 2  to the lines 47&#39; and 48&#39;, respectively, that are not greater than the hall width. If parameters of both lines 47&#39; and 48&#39; meet this condition, both distance parameters are taken to calculate the robot&#39;s deviation δ from the center line of the hallway. This is done by just averaging the two distances d 1  and d 2 . If the distance parameter of one of the lines 47&#39; and 48&#39; does not meet the condition, this line equation is ignored and the known width of the hallway is used as a substitute of this distance information. Although this is rarely the case, it is also possible that both line equations do not show reasonable values. In this case it is assumed that there is a wider gap, and the robot 2 is commanded to go straight at a low speed. 
     In the fifth step, the angles of the lines 47&#39; and 48&#39; also have to be combined. If both line distance parameter sets have &#34;good&#34; values, the combined robot 2 angular orientation is calculated as the average of the angles of the lines 47&#39; and 48&#39;. If line distance parameter of one line does not meet the condition, then only the remaining &#34;good&#34; angle is taken. After this step, the robot&#39;s deviation δ from the center or other line and its angular orientation in the hallway are known. Due to the chosen angles of the sonar sensors, a deviation to the right hand side of the center line has a negative and a deviation to the left hand side has a positive value. Likewise a robot&#39;s heading to the right hand side of the hallway has a positive and a heading to the left hand side a negative angle. 
     For the calculation of the steering angle θ illustrated in FIG. 6, it is necessary to know how fast, i.e. within what distance along the hall a deviation and a wrong angular orientation should be corrected. The distance λ chosen here is very crucial for the robot&#39;s steering behavior. If a very short distance is chosen, then deviations will be corrected almost immediately, but this leads to rapid steering changes, and if the robot 2 overshoots its trajectory correction just a little bit, it will tend to move in a zig-zag style along the center or other line. But if the chosen distance is too large, it will take too long to return to the center or other line. It is therefore necessary to find a &#34;good&#34; number for the distance. In experiments the best distance λ turned out to be 10 inches. 
     The following formulas are used to calculate the new steering angle θ from the information gathered so far: ##EQU2## 
     The only thing left is to apply this steering angle by initiating a relative --  move(λ&#39;, θ); i.e. turn by θ degrees and move forward the distance λ&#39;. If the robot 2 requires velocity moves, a command velocity move(λ&#39;, θ) is provided in which the robot 2 moves a distance λ&#39; at a given speed and changes its angular reading at a given number of degrees a second. Although these two modes usually do have a very different behavior, the described method works in both modes. The parameters for the velocity --  move may have to be modified by multiplying certain factors to adjust the angles with the actual speeds which are supported by the specific robot 2. 
     Since the line fitting and calculation of the deviation δ of the robot 2 from the center of the hall and its angular orientation only take a short time, they can be done numerous times as the robot 2 approaches the centerline. 
     Assume that the x, y registers 46 indicate the robot&#39;s current x/y position to be rob --  x and rob --  y. While the robot 2 is moving, these registers will be updated accordingly. If the initial value of the x/y registers are saved at the beginning of the hallway traveling task, it will then be very easy to keep track of the distance the robot has already travelled along using the Euclidean distance equation. Let us assume the initial x/y values are saved in the two variables start --  x and start --  y. The overall control loop (written in C-Code) turns out to be: ##EQU3## 
     The function calculate --  steering --  angle is the steering method which was previously described, and the move --  robot 2 function is a function which executes one move step of the robot 2. It is assumed that the robot&#39;s x/y registers (rob --  x and rob --  y) and the sonar readings will be updated after each move step. 
     The actual move can be executed in two ways. The move --  robot 2 function may invoke a robot 2 routine, which commands the robot 2 to turn and to move. It is now possible for the move --  robot 2 routine just to wait until this function finishes and then to return. 
     However, if the robot 2 routine runs parallel to the control program explained supra and it has the ability to be interrupted at any time later on, then it is also possible just to pass the steering angle theta to this robot 2 function, ask for the current x/y status and the sonar readings, and to return after a short delay almost immediately. 
     In this case, the whole process of calculating steering angle and executing the move --  robot 2 routine will start over and over again even though no single move --  step was really finished. This style is more like a human driving. Whenever a deviation from the commanded path is detected, the program calculates the angle by which the robot 2 has to turn to go back to the center line. But during returning to the center line the robot 2 still keeps sensing for its orientation and it will correct its trajectory if necessary. This style of robot 2 programming turns out to be very effective and it leads to smooth operations. 
     However, both methods of robot 2 programming work very well and are reliable. 
     In any event, once the robot 2 reaches the center or other line, its heading must be changed to a direction along the hall. 
     Reference is made to FIG. 7 for an illustration of a procedure for calculating the parameters of one wall. As indicated in a block 49, the program lines 151-175 of the program are set forth in the program table at the end of this &#34;Detailed Description Of The Invention&#34;. In a step 50 the sonar readings are transformed into the robot&#39;s coordinate system by use of the lines 159-169, and a step 52 indicates that the lines 113-131 are used in calculating the line fit. 
     FIG. 8 shows the calculation of steering angle θ and speed as called for in a block 54. As indicated at a step 56, the procedure of FIG. 7 is used to calculate the left wall&#39;s parameters, and, as indicated in step 58 the procedure of FIG. 7 is also used to calculate the right wall&#39;s parameters. A step 60 indicates that program lines 214-240 of the table are used to combine the parameters of the left and right walls, and a step 62 states that program line 240-247 are used in calculating speed. 
     A block 64 in FIG. 9 indicates that program lines 347-375 of the table are used in the guided move procedure. The original x, y position of the robot 2 is saved in step 66 by using program lines 360-361 of the table. A step 68 indicates that the steering angle θ and speed are calculated as indicated in FIG. 8. 
     In a step 70, the motors are driven and the distance from the starting x, y position is calculated, and in a decision step 72 a check is made to see whether or not the distance determined in the step 70 equals the distance the robot 2 is to move. If not, the procedure goes back to the step 68, but if so, everything has been done. 
     Although it is preferable to use sensors on both sides of the robot 2 as has been described, the method of the invention can be carried out with sensors on one side. In this case, the position of the wall on that side is defined by the line fitting technique described, and the distance from the wall and the angular orientation with respect to it are calculated. The steering angle θ required to return the robot 2 to a given line along the hallway is calculated in the same way. ##STR1## 
     Although various embodiments of the present invention have been shown and described herein, they are not meant to be limiting. Those of skill in the art may recognize certain modifications to these embodiments, which modifications ar meant to be covered by the spirit and scope of the appended claims.