BamBirds 2021
de.uniba.sme.bambirds.debugging.ParabolaTester Class Reference
Collaboration diagram for de.uniba.sme.bambirds.debugging.ParabolaTester:

Public Member Functions

void start () throws ServerException
 

Private Member Functions

void loadLevel (ABType birdType) throws ServerException
 
void runTests () throws ServerException
 
void shootYellowNear () throws ServerException
 
void findAccuratePivotPoint (ABType bird) throws ServerException
 
void shootRandomPoints (ABType bird) throws ServerException
 
void shootRandomPointsYellowTap () throws ServerException
 
void shootYellow (double theta, Point2D.Double target) throws ServerException
 
void findYellowBirdEstimation () throws ServerException
 
boolean shootYellowFixedImpact (double theta, double impact) throws ServerException
 
boolean shootYellowFixedTime (double theta, int time) throws ServerException
 
void shootYellowWithTap (double theta, int taptime, double impact, Point2D.Double tapPoint) throws ServerException
 
ShotParabola shootAndGetYellowParabola (double theta, int time, Point2D.Double tapPoint, double impact) throws ServerException
 
void writeOutputYellowTap (double theta, int taptime, ShotParabola pub)
 
void createShotEvaluationForAllBirds () throws ServerException
 
void shootWholeRange (float start, float end, float stepSize) throws ServerException
 
void shootAngleRange (float start, float step, int numOfShots) throws ServerException
 
ShotParabola shootAndGetParabola (double theta) throws ServerException
 
void shoot (double theta, int time) throws ServerException
 
void writeOutput (ShotParabola pub)
 

Private Attributes

ABType birdType
 

Static Private Attributes

static final Logger log = LogManager.getLogger()
 
static final Rectangle clickableArea = new Rectangle(222, 88, 555, 245)
 
static final double scaling = 0.998876
 
static final Slingshot sling
 
static VisualDebugger DBG = new VisualDebugger("ParabolaTeter")
 

Member Function Documentation

◆ createShotEvaluationForAllBirds()

void de.uniba.sme.bambirds.debugging.ParabolaTester.createShotEvaluationForAllBirds ( ) throws ServerException
private

Try all angles for all birds, make sure you have loaded the parabola evaluation levels

Exceptions
ServerException

◆ findAccuratePivotPoint()

void de.uniba.sme.bambirds.debugging.ParabolaTester.findAccuratePivotPoint ( ABType  bird) throws ServerException
private

Perform 5 shots and triangulate subpixel pivot point (for all birds)

Exceptions
ServerException

◆ findYellowBirdEstimation()

void de.uniba.sme.bambirds.debugging.ParabolaTester.findYellowBirdEstimation ( ) throws ServerException
private

Perform all yellow bird tap shots to get a completely covered impact angle graph

Exceptions
ServerException

◆ runTests()

void de.uniba.sme.bambirds.debugging.ParabolaTester.runTests ( ) throws ServerException
private

Enrty point

Exceptions
ServerException

◆ shoot()

void de.uniba.sme.bambirds.debugging.ParabolaTester.shoot ( double  theta,
int  time 
) throws ServerException
private

Helper function to send shoot command to the Action Robot

Exceptions
ServerException

◆ shootAndGetParabola()

ShotParabola de.uniba.sme.bambirds.debugging.ParabolaTester.shootAndGetParabola ( double  theta) throws ServerException
private

Perform shot, wait 5s and then grab the actual ingame trajectory

Exceptions
ServerException

◆ shootAndGetYellowParabola()

ShotParabola de.uniba.sme.bambirds.debugging.ParabolaTester.shootAndGetYellowParabola ( double  theta,
int  time,
Point2D.Double  tapPoint,
double  impact 
) throws ServerException
private

Perform shot, wait 5s and then grab the actual ingame trajectory

Exceptions
ServerException

◆ shootAngleRange()

void de.uniba.sme.bambirds.debugging.ParabolaTester.shootAngleRange ( float  start,
float  step,
int  numOfShots 
) throws ServerException
private

Perform multiple shots, evaluate parabola and save to file

Exceptions
ServerException

◆ shootRandomPoints()

void de.uniba.sme.bambirds.debugging.ParabolaTester.shootRandomPoints ( ABType  bird) throws ServerException
private

Shoot random points in a given area. Used for parabola accuracy evaluation

Exceptions
ServerException

◆ shootRandomPointsYellowTap()

void de.uniba.sme.bambirds.debugging.ParabolaTester.shootRandomPointsYellowTap ( ) throws ServerException
private

Shoot random points in a given area. Used for parabola accuracy evaluation

Exceptions
ServerException

◆ shootWholeRange()

void de.uniba.sme.bambirds.debugging.ParabolaTester.shootWholeRange ( float  start,
float  end,
float  stepSize 
) throws ServerException
private

Define range and stepsize, this method will do the rest

Exceptions
ServerException

◆ shootYellow()

void de.uniba.sme.bambirds.debugging.ParabolaTester.shootYellow ( double  theta,
Point2D.Double  target 
) throws ServerException
private

Shoot with fixed angle and calculate tap time accordingly

Exceptions
ServerException

◆ shootYellowFixedImpact()

boolean de.uniba.sme.bambirds.debugging.ParabolaTester.shootYellowFixedImpact ( double  theta,
double  impact 
) throws ServerException
private

Perform shot with fixed impact angle, time is variable

Exceptions
ServerException

◆ shootYellowFixedTime()

boolean de.uniba.sme.bambirds.debugging.ParabolaTester.shootYellowFixedTime ( double  theta,
int  time 
) throws ServerException
private

Perform a shot with a fixed time, where tap point is calculated

Exceptions
ServerException

◆ shootYellowWithTap()

void de.uniba.sme.bambirds.debugging.ParabolaTester.shootYellowWithTap ( double  theta,
int  taptime,
double  impact,
Point2D.Double  tapPoint 
) throws ServerException
private

Perform shot and write output

Exceptions
ServerException

◆ writeOutput()

void de.uniba.sme.bambirds.debugging.ParabolaTester.writeOutput ( ShotParabola  pub)
private

Save results to csv file

◆ writeOutputYellowTap()

void de.uniba.sme.bambirds.debugging.ParabolaTester.writeOutputYellowTap ( double  theta,
int  taptime,
ShotParabola  pub 
)
private

Save results to csv file

Member Data Documentation

◆ sling

final Slingshot de.uniba.sme.bambirds.debugging.ParabolaTester.sling
staticprivate
Initial value:
= new Slingshot(
(Settings.USE_NEW_SLING_DETECTION ? new Rectangle(185, 320, 19, 62) :
new Rectangle(186, 319, 17, 64)
), null)

The documentation for this class was generated from the following file: