Update of /cvsroot/robotflow/RobotFlow/Behaviors/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7443/Behaviors/src
Modified Files:
EllipticalAvoid.cc
Log Message:
Elimination of the oscillation when detecting obstacle at front
Index: EllipticalAvoid.cc
===================================================================
RCS file: /cvsroot/robotflow/RobotFlow/Behaviors/src/EllipticalAvoid.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** EllipticalAvoid.cc 13 Dec 2005 14:47:17 -0000 1.2
--- EllipticalAvoid.cc 20 Dec 2005 21:24:22 -0000 1.3
***************
*** 182,186 ****
m_reverseVel,
m_rotVelSecurityMargin,
! m_rotVel);
}
catch (AvoidUtilInvalidConstructorArguments)
--- 182,187 ----
m_reverseVel,
m_rotVelSecurityMargin,
! m_rotVel,
! m_nbAvoidance);
}
catch (AvoidUtilInvalidConstructorArguments)
***************
*** 196,203 ****
void calculate_behavior(int output_id, int count, Buffer &out) {
- //std::cout << "EllipticalAvoid : output_id -> " << output_id << std::endl;
- //std::cout << "EllipticalAvoid -> getInput1" << std::endl;
ObjectRef rangeValueRef = getInput(rangeID,count);
- //std::cout << "EllipticalAvoid -> getInput2s" << std::endl;
ObjectRef velInRef = getInput(velocityInID,count);
--- 197,201 ----
***************
*** 208,212 ****
static double lastMargin = -1;
- //std::cout << "range, vel -> " << rangeValueRef->isNil() << "," << velInRef->isNil() << std::endl;
if((!rangeValueRef->isNil()) && (!velInRef->isNil())){
// Cast the range belt
--- 206,209 ----
***************
*** 258,269 ****
}
}
! /*
! std::cout << "avoid -> " << avoid << std::endl;
! std::cout << "avoidActivated -> " << avoidActivated << std::endl;
! std::cout << "memory -> " << memory << std::endl;
! std::cout << "velIn -> " << velIn << std::endl;
! std::cout << "Pos -> " << pos << std::endl;
! std::cout << "Margin -> " << margin << std::endl;
! */
if(avoid)
{
--- 255,259 ----
}
}
!
if(avoid)
{
***************
*** 279,283 ****
(*outputs[velocityOutID].buffer)[count] = ObjectRef(Int::alloc(velOut));
(*outputs[rotationID].buffer)[count] = ObjectRef(Int::alloc(rotOut));
- std::cout << "velOut -> " << velOut << std::endl;
}
else
--- 269,272 ----
***************
*** 286,290 ****
(*outputs[velocityOutID].buffer)[count] = nilObject;
(*outputs[rotationID].buffer)[count] = nilObject;
- std::cout << "velOut -> nilObject" << std::endl;
}
}
--- 275,278 ----
***************
*** 292,296 ****
(*outputs[velocityOutID].buffer)[count] = nilObject;
(*outputs[rotationID].buffer)[count] = nilObject;
- std::cout << "inputs -> nilObject" << std::endl;
}
}//calculate_behavior
--- 280,283 ----
|