Java Reference
In-Depth Information
by three parameters (R x , R y and R t ) representing the coordinates of the
origin of the robot reference frame and its rotation with respect to the envi-
ronment reference frame. As for the obstacles, we describe the robot's shape
as an ordered list of vertices related to the robot's reference frame. In order
to calculate the position of the robot shape in the environment, we need to
roto-translate its vertices with regard to the environment's reference frame.
The left-hand side of Figure 10.9 sets out Equation 10.1 which expresses the
correspondence between the coordinates of a vertex in the robot reference
frame (v x ,v y ) and its coordinates in the environment reference frame
(V x ,V y ). When the platform changes its position, the origin of the robot
reference frame needs to be updated. Equations 10.2 and 10.3 express the
new origin coordinates and rotation in the case of straight translation (d x , d y
represent the Cartesian components of the displacement) and rotation (rep-
resented by the angle d t ) around the vertical axis.
Class Laser represents the telemeter device that is the combination of the
laser range finder and the rotary tower. Thus, class Laser has the respon-
sibility of measuring the distance to the surrounding obstacles and rotating
the laser with respect to the robot. The laser is mounted on the robot in a
given position, thus we define a laser reference frame whose origin is
expressed by a pair of x , y Cartesian coordinates in the robot reference
frame. The laser reference frame can simply rotate with respect to the robot
reference frame. The laser beam is modelled as a segment coincident with
the laser's x -axis whose length is equal to the laser's range of action. In order
to measure the distance between the laser and the obstacles surrounding
the robot, we need to express the laser beam position with regard to the
environment reference frame using Equation 10.1. A laser measurement is
computed as the distance between the origin of the laser reference frame
and the point of intersection between the laser beam and the boundary of
the nearest obstacle in front of the telemeter device.
Class Sonar is similar to class Laser and thus we leave its description to the
reader. The sonar ring is modelled as a set of Sonar objects whose positions
on the robot are known. The sonars do not have the ability to rotate, but
they are positioned in different orientations.
The transition from analysis to design is quite straightforward and only a few
issues need to be addressed. We can observe that the robot's components
have similar characteristics: they have a physical shape, they visualize their
shape on a graphical user interface, they interact with the environment and
they offer services on demand. One of the basic requirements of the robot
architecture is the plug-and-play configuration of its components. Thus, we
decide to define the abstract class Device that generalizes the definition of
the robot's components (see Figure 10.10). In the following we do not
address the design and implementation of class Sonar ; that we leave to the
reader as a further extension of the robot simulator.
Search WWH ::

Custom Search