Professional Documents
Culture Documents
Daniel Vallejo
Department of Computation Electronic and Mechatronic
Universidad de las Americas - Puebla
daniel.vallejo@udlap.mx
Abstract
This paper describes the implementation of an localization control for LEGO MindStorms RCX architecture. Taking advantage of this control, we describe: why a differential architecture was selected to design a vehicle, and how
a navigation algorithm was implemented to find a free collision path from initial to goal configurations. Besides, a
graphical interface to simulate the behavior of the algorithm and to verify the robot position and direction is described. Interesting results where the vehicle as able to interpret the algorithm results to reach the goal configuration
on physical environment are presented.
1 Introduction
This project is the wish to include a LEGO rig in courses
on automation control to enable graduate students to transfer theory into practical experiments [3]. This kind of
projects are offered to student interested in this field, and
this project is the third of that kind [9]. The two previous
are related to basic behaviors.
LEGO bricks are cheap and can be put together in any
combination, and in 1998 LEGO released the Robotics Invention System (RIS), which is a LEGO kit that lets you
take control over the robots you build. This is done by
means of a programmable LEGO brick. The RCX contains
a small micro controller that can be programmed using a
computer.
The RCX consists of a Hitachi H8300 processor and 32
Kb of RAM of which 28 Kb are safe to use for the firmware
that has to be downloaded in order for your programs to run.
The interface of the RCX consist of an IR port, three input
ports, three output ports, an LCD screen and four buttons
187
2.1
3.1
Motors Calibration
188
3.2
are tested each 20cm. So, the motors needs to count 114
steps to the robots covers 20cm. Having the control over
Localization Control
To build the localization control, it was necessary to response several questions: a) How many counts accumulate
the sensor when the motors gives a revolution ? b) What
distance covers the robot per step and per sensor revolution
? c) How many steps are needed to turn 90 degrees the robot
(to left or right)? and d) How many steps are needed what
the robot covers a distance of 20cm?
After an experimentation stage, we could have an answer
for each question. Initially, we must observe in the robot design( Figure 2) that the movement of the motors goes trough
a gear of 8 jags, and when this lecture comes to the sensor
it use another gear DE 8 jags. These gears are equals, therefore the sensor counts in similar way as the motor does, that
means, each step in the motor is equal with each step in the
sensor, therefore we can conclude that for each motor revolution, the sensor gives 16 steps.
Next, we have to calculate the distance covers bye the
robot when the motor turn a revolution. To compute this distance, we use the Formula 1, and we get that the robot covers a distance of 2.82cm per each motor revolution. Due to
the gears diameter is equal to 9mm then the distance cover
by the robot when the motor turn a revolution is 28.8cm.
Distance = Gears diameter
3.3
Figure 3. Reference point moves approximately 14.3 cm. when the robot turn right or
turn left.
the movements (turn on the left, turn on the right, and forward) and distances that the robot covers, we can calculate
the position of the robot for each instant. It is important to
say that, before we tried to use the robot, a calibration algorithm must be run on the motors to assure that the robot
coves the distances in straight line.
(1)
Control on Returns
The robot must be able to turn on the left and turn on the
right 90 degrees. To reach such objective, it is necessary
to calculate how many steps are required to the robot covers this distance, on the other hand, we now that the robot
covers a distance of 0.176714 per each step of the motor,
therefore, the number of steps that the motor has to give
to turn on the right or turn on the left will be calculates as
follows: N Steps = 14.3/0.176714, so N Steps = 80.92.
Therefore the motor needs to give 81 steps to the robot can
turn on the left or turn on the right. This can be seen in Figure 3. It is important to consider that the direction of turn
of the motors will determine if the robot gives a turn on the
left or turn on the right.
Using the same criteria, we calculate the number of steps
needed to the robot covers a distance of 20cm. (the environment is built of such away that, positions of the robots
189
Graphic user interface and algorithm related to localization control and planning were implemented using Borland
Delphi 7 on Windows XP [7]. To get the control and communication between the PC and the robot were used the Active X Panthom.dll controller which allow us to programme
the RCX from Delphi.
After design the user interface, it was necessary to make
an analysis about which operations were necessaries to built
a functional interface. So, the next list shows the different functions implemented on interface. The distribution of
these functions can bee seen in Figure 6.
1. Connection between the robot and the PC. This part
of the interface (part number 1), allows to communicate in both directions the PC and the robot using
the infrared tower. This function consider three states
(connected, disconnected and connection status).
Figure 5. Graph representation of the environment and path found by Dijkstra algorithm.
4.1
190
191
process, we can reach a better result about the robot performance, that mean that, the robot keep a straight line when it
is moving forward.
As we can expect, the robots precision is going to de-
7.1
Future Work
References
[1] Balaguer Carlos Barrientos Antonio, Pein Lus Felipe
and Aracil Rafael. Fundamentos de Robotica. Edit.
Mc Graw Hill, 1997.
pend of the size path, due the robot accumulate errors each
turn.
Brian,,
tutorial.
192