Function:
The package has to provide methods
for sensor calibration and
queries on distance, speed, acceleration, tilt and roll, which can be
directly measured ore indirectly be calculated from the sensor.
Furthermore the package has to provide methods for a visualization of
the sensor data. Finally the sensor's abilities have to be evaluated
with the odometry measurements of the robot and the position estimate
of the Laser Range Finder (LRF).
Getting
started:
Use the CS
Freiburg software package for measuring the robot’s
odometry and accurate position with the implemented line matching
algorithm that matches lines extracted from scans taken by a Laser
Range Finder (LRF). You can get the package from a CVS repository by
the following commands:
$>cvs co accSensor
$>cvs co csfreiburg_libs
$>cd accSensor
$>make depend
$>make
This will build the code for controlling a robot which you do not need
at the beginning of the project. To just get an idea about the
localization and control, simply copy the executable to the laptop
mounted on the robot, type:
$>make distprak C=NAME ,where
NAME is the name of the laptop you mounted on the robot (e.g. vaio4).
Then you can execute the code on the robot by exporting the laptops
display to the computer you are working on. Suppose you are working at
'fernando' and on the robot we have mounted 'vaio3', then type the
following:
fernando>xhost +vaio3
vaio3>setenv DISPLAY fernando:0
vaio3>accSensor/praktikum/praktikum
You can now add a new directory for your project files to the hierarchy
(e.g. accSensor/accSensor). By this, it will be later easy to integrate
your code to the CS-Freiburg package. This directory should contain all
files for accessing the sensor and a main.cpp for testing the sensor in
a standalone mode. For using the sensor with the CSFreiburg software,
please modify the main.cpp in accSensor/praktikum. For a documentation
of the sensor and the CS Freiburg software see:
ADXL202
Evaluation Board with RS-232 Interface,manual
Crystal, the interface for the
CS Freiburg Robots, manual
Part I -
Implementation of the library
Function:
The package has to provide methods
for sensor calibration and
queries on distance, speed, acceleration, tilt and roll, which can be
directly measured ore indirectly be calculated from the sensor.
Furthermore the package has to provide methods for a visualization of
the sensor data.
Implementation:
The library has to execute a thread that
continuously
updates the internal data structure by communication with the sensor.
The following methods have to be provided:
- double
getTilt() returns the sensors current tilt angle in degrees.
- double
getRoll() returns the sensors current roll angle in degrees.
- double
getAccelerationX(), double
getAccelerationY() returns the current acceleration
in X and Y respectively.
- double
getVelocityX(), double getVelocityY() returns the current
velocity in X and Y
respectively.
- double
getPositionX(), double getPositionY() returns the current
position in X and Y
respectively.
- struct timeval
getTimeStamp(void) returns the time of the lastest update.
- void init() starts
the communication thread
- void exit() closes
the communication thread
Additionally a Graphical User Interface (GUI) has to be developed,
that allows to calibrate the sensor and to visualize the output of the
above values over time.
Part II - Integration with
the CS Freiburg software
For a later evaluation of the sensor it is necessary to make the
sensors output available in the CS Freiburg software. Therefore
implement the appropriate functions in sensors.cpp for accessing the
sensor from user applications. Test the interface by modifying
paraktikum/main.cpp so that it draws the measurements inside the
crystal window.
Part III -
Evaluation
We want to know how accurate the sensors measurements are compared to
the robot's position estimates. Thus perform the following evaluations:
- Position comparison of odometry, LRF and acceleration
sensor.
- Velocity comparison of odometry, LRF and acceleration
sensor.
- Error of tilt/roll measurements.