From: petr Date: Wed, 11 Apr 2012 20:25:10 +0000 (+0200) Subject: robofsm: Map for this year X-Git-Url: http://rtime.felk.cvut.cz/gitweb/eurobot/public.git/commitdiff_plain/2f035da26dd2238d767d1fb583ff04ff32f8956a robofsm: Map for this year Remove old map definition from file. Add new obstacle description for this year. --- diff --git a/src/robofsm/robot.c b/src/robofsm/robot.c index a95057d3..52ea3736 100644 --- a/src/robofsm/robot.c +++ b/src/robofsm/robot.c @@ -58,37 +58,25 @@ static void int_handler(int sig) void fill_in_known_areas_in_map() { - /* Do not plan path close to edges */ - //ShmapSetRectangleFlag(0.0, 0.0, 0.26, 2.1, MAP_FLAG_WALL, 0); /* left */ - //ShmapSetRectangleFlag(0.0, 0.0, 3.0, 0.26, MAP_FLAG_WALL, 0); /* bottom */ - //ShmapSetRectangleFlag(0.0, 1.84, 3.0, 2.1, MAP_FLAG_WALL, 0); /* top */ - //ShmapSetRectangleFlag(2.74, 0.0, 3.0, 2.1, MAP_FLAG_WALL, 0); /* right */ - -// /* Container surroundings */ -// ShmapSetRectangleFlag(0.0, 0.0, 0.4, 0.2, 0, MAP_FLAG_WALL); /* left container */ -// ShmapSetRectangleFlag(3.0, 0.0, 2.6, 0.2, 0, MAP_FLAG_WALL); /* right container */ - -// /* Ignore other obstacles at edges */ -// ShmapSetRectangleFlag(0.0, 0.0, 0.09, 2.1, MAP_FLAG_IGNORE_OBST, 0); /* left */ -// ShmapSetRectangleFlag(0.0, 0.0, 3.0, 0.09, MAP_FLAG_IGNORE_OBST, 0); /* bottom */ -// ShmapSetRectangleFlag(0.0, 2.01, 3.0, 2.1, MAP_FLAG_IGNORE_OBST, 0); /* top */ -// ShmapSetRectangleFlag(2.91, 0.0, 3.0, 2.1, MAP_FLAG_IGNORE_OBST, 0); /* right */ -// ShmapSetRectangleFlag(1.0, 1.5, 1.95, 2.1, MAP_FLAG_IGNORE_OBST, 0); /* rised area */ - - /* start blocs + green area */ - ShmapSetRectangleFlag(0, 0, 0.45, PLAYGROUND_HEIGHT_M, MAP_FLAG_WALL, 0); - ShmapSetRectangleFlag(2.55, 0, PLAYGROUND_WIDTH_M, PLAYGROUND_HEIGHT_M, MAP_FLAG_WALL, 0); - - /* protected blocs */ - ShmapSetRectangleFlag(0, 0, PLAYGROUND_WIDTH_M, 0.4, MAP_FLAG_WALL, 0); - - /* plan trajectory on */ - - /* playing area walls */ -// ShmapSetRectangleFlag(0, 0, PLAYGROUND_WIDTH_M, 0.1, MAP_FLAG_IGNORE_OBST, 0); -// ShmapSetRectangleFlag(PLAYGROUND_WIDTH_M, 0, PLAYGROUND_WIDTH_M - 0.1, PLAYGROUND_HEIGHT_M, MAP_FLAG_IGNORE_OBST, 0); -// ShmapSetRectangleFlag(0 ,PLAYGROUND_HEIGHT_M, PLAYGROUND_WIDTH_M, PLAYGROUND_HEIGHT_M - 0.1, MAP_FLAG_IGNORE_OBST, 0); -// ShmapSetRectangleFlag(0 , 0, 0.1, PLAYGROUND_HEIGHT_M, MAP_FLAG_IGNORE_OBST, 0); + /*----- playground width 3.0 m and playground height 2.0 m -----*/ + /* Ignore other obstacles at edges */ + ShmapSetRectangleFlag(0.0, 0.0, 0.09, 2.0, MAP_FLAG_IGNORE_OBST, 0); /* left */ + ShmapSetRectangleFlag(0.0, 0.0, 3.0, 0.09, MAP_FLAG_IGNORE_OBST, 0); /* bottom */ + ShmapSetRectangleFlag(0.0, 1.91, 3.0, 2.0, MAP_FLAG_IGNORE_OBST, 0); /* top */ + ShmapSetRectangleFlag(2.91, 0.0, 3.0, 2.0, MAP_FLAG_IGNORE_OBST, 0); /* right */ + + /* Small walls that cannot be detected by hokuyo */ + ShmapSetRectangleFlag(0.0, 1.49, 0.39, 1.432, MAP_FLAG_WALL, 0); + ShmapSetRectangleFlag(3.0, 1.49, 2.61, 1.432, MAP_FLAG_WALL, 0); + ShmapSetRectangleFlag(0.325, 0.0, 0.38, 0.74, MAP_FLAG_WALL, 0); + ShmapSetRectangleFlag(2.675, 0.0, 2.62, 0.74, MAP_FLAG_WALL, 0); + + /* Palm tree */ + ShmapSetCircleFlag(1.5, 1.0, 0.15, MAP_FLAG_WALL, 0); + + /* Totems */ + ShmapSetRectangleFlag(1.01, 0.91, 1.19, 1.09, MAP_FLAG_WALL, 0); + ShmapSetRectangleFlag(1.81, 0.91, 1.99, 1.09, MAP_FLAG_WALL, 0); } static void trans_callback(struct robo_fsm *fsm)