From: MagellanPro <mag...@us...> - 2005-07-02 04:06:00
|
Update of /cvsroot/robotflow/RobotFlow/Behaviors/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15437 Modified Files: RangeFashion.cc Log Message: - Transform on the laser data Index: RangeFashion.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Behaviors/src/RangeFashion.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RangeFashion.cc 2 Jul 2005 02:12:43 -0000 1.3 --- RangeFashion.cc 2 Jul 2005 04:05:46 -0000 1.4 *************** *** 143,150 **** int x_min = (min1+min2+min3)/3; // Save the value ! if(((*vectPercept)[ind_vectPercept] == -1) && (x_min < 10000)) ! (*vectPercept)[ind_vectPercept] = x_min; ! // Next position --ind_vectPercept; --- 143,163 ---- int x_min = (min1+min2+min3)/3; + // Transform of the data according to the physical dimension of the robot + int offset = 0; + switch (ind_vectPercept){ + case 0: offset = 100; break; + case 1: offset = 150; break; + case 2: offset = 150; break; + case 3: offset = 300; break; + case 9: offset = 300; break; + case 10: offset = 150; break; + case 11: offset = 150; break; + } + // Save the value ! if(((*vectPercept)[ind_vectPercept] == -1) && (x_min < 10000)){ ! (*vectPercept)[ind_vectPercept] = x_min - offset; ! } ! // Next position --ind_vectPercept; |