]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
map handling: Ignore obstacles further than hokuyo maximum range.
authorMichal Vokac <vokac.m@gmail.com>
Fri, 4 Feb 2011 15:06:33 +0000 (16:06 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 11 Feb 2011 16:31:55 +0000 (17:31 +0100)
src/robofsm/map_handling.c

index 4b247e06975273cee4d94872d4ea46cb70435859..f282e1071370a60832f762de9262a19630fb27b3 100644 (file)
@@ -105,6 +105,7 @@ void update_map_hokuyo(struct hokuyo_scan_type *s)
                        continue;
                
                if(data[i] > 19) {
+               if(data[i] > 19 && data[i] < 4000) {
                        obst_coord(&e, &beam, data[i]/1000.0, &x, &y);
                        obstacle_detected_at(x, y, true);
                        obst_coord(&e, &beam, (data[i]/1000.0)+0.3, &x, &y);