Update of /cvsroot/robotflow/RobotFlow/Behaviors/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7128/Behaviors/include
Modified Files:
AvoidUtil.h
Log Message:
Elimination of the oscillation when detecting obstacle at front
Index: AvoidUtil.h
===================================================================
RCS file: /cvsroot/robotflow/RobotFlow/Behaviors/include/AvoidUtil.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AvoidUtil.h 13 Dec 2005 15:12:56 -0000 1.2
--- AvoidUtil.h 20 Dec 2005 21:22:42 -0000 1.3
***************
*** 42,46 ****
int reverseVel,
double rotVelSecurityMargin,
! int rotVel);
~AvoidUtil();
unsigned int evalLongAvoidingThres(int velocity) const;
--- 42,47 ----
int reverseVel,
double rotVelSecurityMargin,
! int rotVel,
! unsigned int nbOscillation);
~AvoidUtil();
unsigned int evalLongAvoidingThres(int velocity) const;
***************
*** 53,60 ****
bool isAvoidanceNeeded(std::vector<int> rangeBelt, int velocity, unsigned int &pos, double &margin);
int evalRotationalDirection(int velocity, unsigned int position);
- //unsigned int evalEllipticalDirectionChangeThres(unsigned int theta) const;
- // bool createEllipticalDirectionChangeThresBelt(unsigned int beltSize);
- //const std::vector<unsigned int>& getEllipticalDirectionChangeThresBelt();
- //bool isDirectionChangeNeeded(unsigned int position, unsigned int rangeValue);
int evalAvoidingLinVel(int velocity, double margin);
int evalAvoidingRotVel(int velocity, unsigned int pos, double margin);
--- 54,57 ----
***************
*** 74,79 ****
--- 71,80 ----
double m_rotVelSecurityMargin;
int m_rotVel;
+ unsigned int m_nbOscillation;
// Variables
+ unsigned int m_lastPos;
+ int m_lastSign;
+ unsigned int m_CurrentOscillation;
double m_slope;
double m_velSlope;
|