From: clement r. <kl...@us...> - 2006-01-19 16:52:26
|
Update of /cvsroot/robotflow/RobotFlow/Behaviors/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26798/src Modified Files: AvoidUtil.cc Log Message: Change rotation direction logic when goning backward : Considering we will stay in reverse mode a short time and go forward after, it seems more appropriate not to change the sign of the rotation direction. This avoid oscillation between backward and forward velocity in front of an obstacle. Index: AvoidUtil.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Behaviors/src/AvoidUtil.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AvoidUtil.cc 18 Jan 2006 23:20:22 -0000 1.4 --- AvoidUtil.cc 19 Jan 2006 16:52:10 -0000 1.5 *************** *** 453,460 **** int sign = evalRotationalDirection(velocity, pos); // Going reverse...change the sign ! if(margin <= m_reverseVelSecurityMargin) ! { ! sign *= -1; ! } return sign * rot; } --- 453,462 ---- int sign = evalRotationalDirection(velocity, pos); // Going reverse...change the sign ! // Considering we will stay in reverse mode a short time and go forward after, ! // it seems more appropriate not to change the sign. ! // if(margin <= m_reverseVelSecurityMargin) ! // { ! // sign *= -1; ! // } return sign * rot; } |