Page 267 - The Definitive Guide to Building Java Robots
P. 267

Preston_5564C07.fm  Page 248  Monday, September 26, 2005  5:38 AM



                 248    CHAPTER 7  ■  NAVIGATION



                            In the next section, I will discuss how I can reduce some of the errors relating to positional
                        inaccuracy by giving the robot the ability to know where it is absolutely in an environment.
                        This process is called localization.


                        7.2 Localization

                        Localization is the process of giving the robot the ability to position itself in its environment. In
                        the last chapter, the robot was able to move in a vector, but this vector had no start point, and
                        its end point had large amounts of error because of environmental factors like wheel slippage,
                        errors in conversion, and so on. In this section, I’ll show you how to reduce this error by using
                        sonar to calculate a start and an end position.
                            To begin, I am going to set the environment of the robot to be in a Perfect World as defined
                        in the last section. This is a 100-inch × 100-inch grid with no obstacles. (See Figure 7-9.)












































                        Figure 7-9. Perfect World








                   97022d2480fe4a63cfdfa123a6e70098
   262   263   264   265   266   267   268   269   270   271   272