Revision: 7216 http://playerstage.svn.sourceforge.net/playerstage/?rev=7216&view=rev Author: thjc Date: 2008-12-28 01:56:00 +0000 (Sun, 28 Dec 2008)
Log Message: ----------- Merge from trunk of 7166: Softened an index assertion in vfh, so that it skips out-of-range beams Modified Paths: -------------- code/player/branches/release-2-1-patches/server/drivers/position/vfh/vfh.cc Property Changed: ---------------- code/player/branches/release-2-1-patches/ Property changes on: code/player/branches/release-2-1-patches ___________________________________________________________________ Modified: svn:mergeinfo - /code/player/trunk:7062,7081 + /code/player/trunk:7062,7081,7166 Modified: code/player/branches/release-2-1-patches/server/drivers/position/vfh/vfh.cc =================================================================== --- code/player/branches/release-2-1-patches/server/drivers/position/vfh/vfh.cc 2008-12-28 01:37:39 UTC (rev 7215) +++ code/player/branches/release-2-1-patches/server/drivers/position/vfh/vfh.cc 2008-12-28 01:56:00 UTC (rev 7216) @@ -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. ------------------------------------------------------------------------------ _______________________________________________ Playerstage-commit mailing list Playerstage-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/playerstage-commit