class PotentialMap

This is our first map class usable for navigation. More...

Contains pure virtuals
Full nameMaps::PotentialMap
Definition#include <potentialmap.h>
InheritsMaps::NavigateMap [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Private Members


Detailed Description

This is our first map class usable for navigation. The algorithm is, that we define a sort of ostensive potential all over the map whose gradient equals an also ostensive force which makes the robot driving curves

 PotentialMap (unsigned int width=50,unsigned int height=50,float density=.7071)
throw (bad_exception)

PotentialMap

Creates an empty map. The parameters are passed on to internal TopographicMaps

Parameters:
widthinitial map width in grid squares
heightinitial map height in grid squares
densityedge length of the grid squares

 ~PotentialMap ()
throw()

~PotentialMap

[virtual]

void  addChange (const Position& self,const Position& obj,const object_type type)
throw (bad_exception)

addChange

[virtual]

Every time after having received both the commands "Coordiantes" and "Radar", the ServerState is to call this method if it saw something worth to draw onto the map.

Parameters:
selfthe position of the ServerState's robot
objthe position of the observed object
typethe type of the observed object

Reimplemented from NavigateMap.

Position  navigationHint (const Position& self,const Position& target)
throw (bad_exception)

navigationHint

[pure virtual]

This method gives concrete information where to drive. NOTE: Personally, I took it that way that if the course correction is urgent, the returned value is far from the calling bot's position.

Parameters:
selfthe position of the calling bot
targetthe position the bot wants to reach

Returns: the position the bot shall drive towards

Reimplemented from NavigateMap.

void  reset ()
throw()

reset

[virtual]

To be called when a new round on a new map starts

Reimplemented from NavigateMap.

TopographicMap _walls

_walls

[private]

TopographicMap _mines

_mines

[private]

float _density

_density

[private]


Generated by: jonico on sc8-pr-shell1.sourceforge.net on Fri May 27 06:03:12 2005, using kdoc 2.0a54.