|
|
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:
width | initial map width in grid squares |
height | initial map height in grid squares |
density | edge 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:
self | the position of the ServerState's robot |
obj | the position of the observed object |
type | the 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:
self | the position of the calling bot |
target | the 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 |
[private]
TopographicMap | _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. |