GT RoboCup SSL
Soccer software, robot firmware
KalmanBall Class Reference

Filtered ball estimation for a single camera. More...

Public Member Functions

 KalmanBall (unsigned int cameraID, RJ::Time creationTime, CameraBall initMeasurement, const WorldBall &previousWorldBall)
 Checks the previousWorldBall to see if it's valid. More...
 
void predict (RJ::Time currentTime)
 Predicts one time step forward. More...
 
void predictAndUpdate (RJ::Time currentTime, CameraBall updateBall)
 Predicts one time step forward then triangulates towards the measurement. More...
 
bool isUnhealthy () const
 
unsigned int getCameraID () const
 
int getHealth () const
 
Geometry2d::Point getPos () const
 
Geometry2d::Point getVel () const
 
Geometry2d::Point getPosCov () const
 
Geometry2d::Point getVelCov () const
 
const boost::circular_buffer< CameraBall > & getPrevMeasurements () const
 
void setVel (Geometry2d::Point newVel)
 

Static Public Member Functions

static void createConfiguration (Configuration *cfg)
 

Detailed Description

Filtered ball estimation for a single camera.

Constructor & Destructor Documentation

◆ KalmanBall()

KalmanBall::KalmanBall ( unsigned int  cameraID,
RJ::Time  creationTime,
CameraBall  initMeasurement,
const WorldBall previousWorldBall 
)

Checks the previousWorldBall to see if it's valid.

Parameters
cameraIdID of the camera this filter belongs to
creationTimeTime this filter is created
initMeasurementInitial ball measurement we are creating the filter at
previousWorldBallPrevious prediction of ball location to initialize the velocity smartly

Member Function Documentation

◆ getCameraID()

unsigned int KalmanBall::getCameraID ( ) const
Returns
The camera id this belongs to

◆ getHealth()

int KalmanBall::getHealth ( ) const
Returns
How healthy this filter is. AKA How often it's been updated

◆ getPos()

Geometry2d::Point KalmanBall::getPos ( ) const
Returns
Best estimate of the position of the ball

◆ getPosCov()

Geometry2d::Point KalmanBall::getPosCov ( ) const
Returns
Covariance in X and Y direction of the position of the ball

◆ getPrevMeasurements()

const boost::circular_buffer< CameraBall > & KalmanBall::getPrevMeasurements ( ) const
Returns
List of previous camera ball measurements for kick detection/estimation

◆ getVel()

Geometry2d::Point KalmanBall::getVel ( ) const
Returns
Best estimate of the velocity of the ball

◆ getVelCov()

Geometry2d::Point KalmanBall::getVelCov ( ) const
Returns
Covariance in X and Y direction of the velocity of the ball

◆ isUnhealthy()

bool KalmanBall::isUnhealthy ( ) const
Returns
Returns true when the filter hasn't been updated in a while etc and should be deleted

◆ predict()

void KalmanBall::predict ( RJ::Time  currentTime)

Predicts one time step forward.

Parameters
currentTimeTime at the current frame
Note
Call either this OR predictAndUpdate once a frame

◆ predictAndUpdate()

void KalmanBall::predictAndUpdate ( RJ::Time  currentTime,
CameraBall  updateBall 
)

Predicts one time step forward then triangulates towards the measurement.

Parameters
currentTimeCurrent time of the prediction/update step
updateBallBall measurement that we are using as feedback to the filters
Note
Call either this OR predict once a frame

◆ setVel()

void KalmanBall::setVel ( Geometry2d::Point  newVel)
Parameters
newVelnew velocity to insert into the kalman filter

Note: Only used to set the velocity when we think the ball will bounce off another robot


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