From d8fbd575d0a3005fa85047ecdc40e65108e44f6a Mon Sep 17 00:00:00 2001 From: Claudio Delli Bovi Date: Fri, 28 Mar 2014 18:59:15 +0100 Subject: [PATCH] SUPER case 'fixed' --- machineLearning/DiveHandler/DiveHandler.cpp | 9 ++++++--- machineLearning/DiveHandler/DiveHandler.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/machineLearning/DiveHandler/DiveHandler.cpp b/machineLearning/DiveHandler/DiveHandler.cpp index 866d56e..ddca128 100644 --- a/machineLearning/DiveHandler/DiveHandler.cpp +++ b/machineLearning/DiveHandler/DiveHandler.cpp @@ -24,7 +24,7 @@ // Uncomment to have debug information //#define DIVEHANDLER_DEBUG //#define DIVEHANDLER_TRAINING_DEBUG -//#define DIVEHANDLER_TRAINING +#define DIVEHANDLER_TRAINING //#define RAND_PERMUTATIONS #define NEGATIVE_REWARD -1.0 @@ -48,6 +48,7 @@ bool tooEarly=false; bool fallen=false; bool estimatedTime=false; bool goalDetected=false; +bool superCase=false; #ifdef DIVEHANDLER_TRAINING int n_mutation = 0; @@ -993,10 +994,11 @@ void DiveHandler::update(DiveHandle& diveHandle) tBAGO -= .0f; fallen=false; estimatedTime=true; + superCase=true; } // if the goalie dives - if( (int)theFallDownState.state == (int)FallDownState::onGround && !fallen) + if( (int)theFallDownState.state == (int)FallDownState::onGround && !fallen && !superCase) { timer.fallenTime.setToNow(); tBAGO = (float)((Timestamp() - goalTimer.startTime).getMs()); @@ -1006,7 +1008,7 @@ void DiveHandler::update(DiveHandle& diveHandle) } } - if(estimatedTime) + if(estimatedTime && !superCase) { float velocityMean=0; float velocityMax=0; @@ -1103,6 +1105,7 @@ void DiveHandler::update(DiveHandle& diveHandle) estimatedTime=false; stamp=true; + superCase=false; } } diff --git a/machineLearning/DiveHandler/DiveHandler.h b/machineLearning/DiveHandler/DiveHandler.h index 4bda054..25f6aab 100644 --- a/machineLearning/DiveHandler/DiveHandler.h +++ b/machineLearning/DiveHandler/DiveHandler.h @@ -37,7 +37,7 @@ #include "Representations/SPQR-Representations/RobotPoseSpqrFiltered.h" #include "Representations/SPQR-Representations/GlobalBallEstimation.h" #include "Representations/SPQR-Representations/DiveHandle.h" -#include "Core/Processors/Processor.h" +#include "/home/claudio/Desktop/RoboCup/spqrnao/Src/SPQR-Libraries/PTracking/src/Utils/Timestamp.h" #include "Utils/AgentPacket.h"