Skip to content

Commit

Permalink
SUPER case 'fixed'
Browse files Browse the repository at this point in the history
  • Loading branch information
claudio-db committed Mar 28, 2014
1 parent 824a3d2 commit d8fbd57
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions machineLearning/DiveHandler/DiveHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down Expand Up @@ -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());
Expand All @@ -1006,7 +1008,7 @@ void DiveHandler::update(DiveHandle& diveHandle)
}
}

if(estimatedTime)
if(estimatedTime && !superCase)
{
float velocityMean=0;
float velocityMax=0;
Expand Down Expand Up @@ -1103,6 +1105,7 @@ void DiveHandler::update(DiveHandle& diveHandle)

estimatedTime=false;
stamp=true;
superCase=false;
}
}

Expand Down
2 changes: 1 addition & 1 deletion machineLearning/DiveHandler/DiveHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand Down

0 comments on commit d8fbd57

Please sign in to comment.