You are on page 1of 3

Parking Robot

Marco Aurélio Caramori#, Thiago Pradi#
de sistemas e Computação – FURB Fundação Universidade Regional de Blumenau – Blumenau - Brazil
{ mrc.caramori | thiago.pradi }

Abstract— Parking vehicles requires multiple environment observations in order to determine the correct manoeuvre to successfully complete the task. This paper proposes a simple algorithm using a generated spline in order to determine the exact location of a park space and to complete the parking task using a Lego NXT Robot model, using its sensors and two wheels. Keywords— Robot, Parking, Spline, Sensor, Lego NXT



Figure 1 – Spline Equation

In our modern society, the population increase and products increased availability is causing car traffic increasingly challenging. Since human manoeuvres are more prone to failures, autonomous driven vehicles are getting more and more important as a way to avoid not only small accidents but bigger and dangerous car crashes. The objective is achieved by using an ultrasonic sensor to detect the available place for parking and mapping the environment and developing a spline with four points which causes the vehicle to avoid the parking space obstacles, which are usually others vehicles. This paper consists of a simple technique to develop a car park manoeuvre in some available place. II.

The parametric equations is applied over two consequent points, and the value for u defines the percentage of distance from point P(x1,y1) to the new point. The Figure 5 demonstrates the creation of the first point of a spline generated by the parametric equation.

To perform the parking operation, we will use geometrical concepts form the circumferences, and Spline to make the curves. A. Spline A Spline is a parametric curve, defined by a set of control Points P0, through Pn, where n is called is order (n = 1 for Linear, n = 2 for quadratic). It was developed by De Casteljau in 1957, and formalized by Bezier in 1960, being widely used in many fields, like computer graphics to model smooth curves. The first and the last control point are always beginning and the end of the Spline. In this algorithm, we will use a Quadratic Spline, with 4 control points, and using the equation in Figura 1 to calculate all the points of the Spline:

Figure 5 – and example of spline generation with parametric equation



For this algorithm, it was established that the robot would be already positioned in a place where it could find an empty or non-empty park space. Since the algorithm has to do environment mapping in order to find out the park space, it was defined the starting point at the origin. Also, if the origin change, the algorithm will calibrate using the ultrasonic sensor to find the position related to the obstacles. Also, it was defined that the park would possibly located always on the robot left side. This eases the algorithm testing since it is not initially necessary to do more tests with its ultrasonic sensor.

If the empty space calculated is enough. which is equal to 100 degrees of rotation for each wheel. otherwise it will stop. the points mapped are stored and used to generate a spline. the robot starts moving in very small quantities. SPLINE CREATION After defining the four points of control. An example can be seen in Figure 6. After moving 100 degrees in each wheel. in order to unveil when the park place has started. which will define how the robot should park.It is possible to observe the initial starting point at Figure 2. Figure 2 – the initial position of the robot Figure 4 – the last mapped points in blue IV. Figure 3 – the first mapped point Having mapped the point. the robot has to create a point which is deep enough inside the empty park place as depicted in Figure 3. When there are no more obstacles on its left. the current position of the robot will be recorder as the last point. SPLINE WALKING When the robot first walks over the parking space. the robot creates another two points in its database regarding the localization of the middle path since the last obstacle and the point where its frontal part will be pointing to. The last mapping activity is to define the last point in order to create the route for parking. the robot continues its route frontward until there is empty space on its left. where the read rectangles are depicted as obstacles. V. It the empty space is enough. which in real life are most of the times other vehicles. This scenario is depicted on Figure 4. this is done by rotating both wheels a certain amount of degrees. . it checks for obstacles on his left. The next step is the creation of a spline. Having set up. it will continue the algorithm to map the route to park. it saves the location so when it finds the next obstacle it will be capable of calculating whether the empty space is big enough for parking or not. When it first encounter the obstacle on the left. and then. which in this case was 800. the next step is the creation of a spline.

cos(3. The use of four active wheels would improve the stability of the robot and also be more accurate when improving the algorithm to oscillate between frontward and backward maneuvers when the park space is too small.1416 * angle / 180. and on the next iteration it will sum the degrees rotation on the last iteration. 1 centimeter is equivalent to 26. and calculating the X and Y coordinates using sine and cosine of the circle. and makes the robot turn as necessary to achieve the next point. } VII. which for the robot used for testing was too imprecise. The algorithm calculates the distance from each wheel to the next spline point in order to determine if the robot can just walk backwards.0)). The distance is calculated using Euclidian formula. tooking only 2 minutes to make the recognition of the ambient and execute the park algorithm. the third point is moving 8 coordinates to the left.BACKWARD.andar(Direction. When the algorithm ends the mapping phase. IMPROVEMENTS The proposed algorithm is considerable simple and could include a certain number of improvements. as show in Figure 7. and the robot could park with success in 100% of our tentative. In our prototype. } double getY(double radius. when it aligns the wheels to the next spline points. double getX(double radius. . Another improvement is regarding the ultrasonic sensor. this. but it was programmed to use only two active wheels. When it reaches the last spline point.40 angles of wheel rotation. This process is iterative. The alignment of the wheels to the next Spline uses the circle circumferences.getDistanceBetween(curPointSpline. nextPointSpline). double angle){ return (radius * Figure 6 – the generated spline with the mapped points For the spline applied in this work. false).0)). causing the mapping phase to be hard to calibrate according to the environment.sin(3. imagining that the center of the circle is the next Spline point. the number of points was defined to be considerably low so as not to waste too much battery power and also because the mapped environment was not fully precise according to the movement of the robot. it walks the distance from the current spline point to the next point. The code that makes this distance calculation is show on Figure 8. because the robot needs more space to make all turns. A Complete execution of our tests could be seen in the following link: http://youtube. VI. The current robot used was executing the same maneuver as a normal car. double angle){ return (radius * Math. it starts moving according a very similar spline as in Figure 6. double distanceFromCurToNext = this.There are some small adjustments on the Spline points when using the real robot. Figure 7 – the code to make the robot walk backward The distance is calculated in centimeters. The first improvement is regarding small parking spaces where the vehicle has to do a more complex maneuver and oscillate between going forward and backward. (int) (distanceFromCurToNext * flatLandToNormalWord). it ends the parking maneuver.1416 * angle / 180. REAL WORLD TESTS We executed a few tests using different scenarios in our laboratory. and converted in rotations based on our previous experiences.