Smart Minotaur
 Alle Klassen Dateien Funktionen Variablen Seiten
minotaur::MapCreator Klassenreferenz

Calculates the histogramm values. Mehr ...

#include <MapCreator.hpp>

Öffentliche Methoden

 MapCreator (int width, int height)
 MapCreator (Map p_map)
void setSensorDistances (int sensor, float x, float y)
 Sets the distances of the sensors to the mid of the robot.
void step (const int p_sensor, const int p_distance)
 Uses the given sensor data to increment the values in the histogramm.
void calculateObstaclePosition (const int sensor, int measuredDistance)
void incrementCells (int position_y, int position_x, int quality)
void generateCone (float p_angle, float p_realDistance, int *p_pos_x, int *p_pos_y)
float checkAngle (float p_angle)
bool checkForInvalidValues (int *p_pos_x, int *p_pos_y)
void calculateDistances (float p_angle, float p_realDistance, float *p_dist_x, float *p_dist_y, int index)
void setPosition (RobotPosition p_position)
 Sets the position of the robot.
MapgetMap ()
 Grants access to the Map object containing the histogramm.
void createTextFile (const char *path)
int getXOffset ()
int getYOffset ()

Ausführliche Beschreibung

Calculates the histogramm values.

This class manages and processes a Map (histogramm field) object and calculates the values of the cells of the map.

Dokumentation der Elementfunktionen

Map * minotaur::MapCreator::getMap ( )

Grants access to the Map object containing the histogramm.

Rückgabe
pointer to the Map object
void minotaur::MapCreator::setPosition ( RobotPosition  p_position)

Sets the position of the robot.

This information is needed during step() to calculate which cells have to be incremented.

Parameter
p_positioncurrent position of the robot.
void minotaur::MapCreator::setSensorDistances ( int  sensor,
float  x,
float  y 
)

Sets the distances of the sensors to the mid of the robot.

Sets the Distance from Zero sensor = Number of sensor -> 1 = frontsensor -> 2 = sensor on the right -> 3 = sensor on the left x = Distance in x direction y = Distance in y direction.

These values are considered during step() to calculate which cells have to be incremented.

Parameter
sensorindex of sensor (left,right,front)
xdistance to robot in x-direction (vertically)
ydistance to robot in y-direction (horizontally)
void minotaur::MapCreator::step ( const int  p_sensor,
const int  p_distance 
)

Uses the given sensor data to increment the values in the histogramm.

Parameter
p_sensorindex of sensor (left,right,front)
p_distancemeasured distance in cm

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Dateien: