Revision: 7166
http://playerstage.svn.sourceforge.net/playerstage/?rev=7166&view=rev
Author: gerkey
Date: 2008-11-21 17:06:58 +0000 (Fri, 21 Nov 2008)
Log Message:
-----------
Softened an index assertion in vfh, so that it skips out-of-range beams
Modified Paths:
--------------
code/player/trunk/server/drivers/position/vfh/vfh.cc
Modified: code/player/trunk/server/drivers/position/vfh/vfh.cc
===================================================================
--- code/player/trunk/server/drivers/position/vfh/vfh.cc 2008-11-21
17:03:54 UTC (rev 7165)
+++ code/player/trunk/server/drivers/position/vfh/vfh.cc 2008-11-21
17:06:58 UTC (rev 7166)
@@ -641,7 +641,9 @@
for(i = 0; i < 181; i++)
{
unsigned int index = (int)rint(i/db);
- assert(index >= 0 && index < data.ranges_count);
+ //assert(index >= 0 && index < data.ranges_count);
+ if(index < 0 || index >= data.ranges_count)
+ continue;
this->laser_ranges[i*2][0] = data.ranges[index] * 1e3;
// this->laser_ranges[i*2][1] = index;
// b += db;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit