#include <ball_object.h>
Public メソッド | |
BallObject () | |
constructor. initialize member variables | |
const double & | distFromSelf () const |
get estimated distance from self | |
const AngleDeg & | angleFromSelf () const |
get estimated global angle from self | |
const Vector2D & | pos () const |
get estimated global coordinate | |
const Vector2D & | posError () const |
get estimated error of global coordinate | |
const int | posCount () const |
get global position accuracy count | |
const Vector2D & | rpos () const |
get estimated position relative from self | |
const Vector2D & | rposError () const |
get estimated error of relative coordinate | |
const int | rposCount () const |
get relative position accuracy count | |
const Vector2D & | rposPrev () const |
get previous cycle relative position | |
const Vector2D & | seenPos () const |
get the last seen position | |
int | seenPosCount () const |
get the number of cycles since last seen | |
const Vector2D & | seenRPos () const |
get the last seen relative position | |
const Vector2D & | heardPos () const |
get the last heard position | |
int | heardPosCount () const |
get the number of cycles since last observation | |
const Vector2D & | vel () const |
get estimated velocity | |
const Vector2D & | velError () const |
get estimated error of velocity | |
int | velCount () const |
get velocity accuracy count | |
const Vector2D & | seenVel () const |
get the last seen velocity | |
int | seenVelCount () const |
get the number of cycles since last velocity seen | |
int | lostCount () const |
get count since ball lost | |
const GameTime & | ghostTime () const |
get ghost detected time | |
bool | posValid () const |
velify global position accuracy | |
bool | rposValid () const |
velify relative position accuracy | |
bool | velValid () const |
verify velocity accuracy | |
void | setGhost (const GameTime ¤t) |
clear all confidence values and set ghost time | |
void | update (const ActionEffector &act, const GameMode &game_mode, const GameTime ¤t) |
update status only with intenal info | |
void | updateByFullstate (const Vector2D &pos, const Vector2D &vel, const Vector2D &self_pos) |
update status with fullstate info | |
void | updateByCollision (const Vector2D &pos, const int pos_count, const Vector2D &rpos, const int rpos_count, const Vector2D &vel, const int vel_count) |
apply collision effect | |
void | updateOnlyRelativePos (const Vector2D &rpos, const Vector2D &rpos_err) |
update relative position using see info. | |
void | updateOnlyVel (const Vector2D &vel, const Vector2D &vel_err, const int vel_count) |
update velocity using see info | |
void | setOpponentControlEffect () |
update by opponent control effect | |
void | updatePos (const Vector2D &pos, const Vector2D &pos_err, const int pos_count, const Vector2D &rpos, const Vector2D &rpos_err) |
update position by see info (not include velocity) | |
void | updateAll (const Vector2D &pos, const Vector2D &pos_err, const int pos_count, const Vector2D &rpos, const Vector2D &rpos_err, const Vector2D &vel, const Vector2D &vel_err, const int vel_count) |
update all status by see info | |
void | updateByHear (const Vector2D &heard_pos, const Vector2D &heard_vel, const GameTime ¤t) |
update ball status using heared info | |
void | updateSelfRelated (const SelfObject &self) |
update self related info | |
template<typename REGION> | |
bool | isWithin (const REGION ®ion) const |
template method. check if ball is in the region | |
Vector2D | inertiaTravel (const int cycle) const |
estimate movement travel vector | |
Vector2D | inertiaPoint (const int cycle) const |
estimate reach point | |
Vector2D | inertiaFinalTravel () const |
estimate final movement travel vector | |
Vector2D | inertiaFinalPoint () const |
estimate final reach point | |
Static Public メソッド | |
static void | set_count_thr (const int pos_thr, const int rpos_thr, const int vel_thr) |
set accuracy count threshold values. | |
static double | calc_travel_step (const double &distance, const double &first_speed) |
estimate final reach point |
order of update process. update() -> updateAll() (updatePos(),updateOnlyVel(), updateOnlyRelativePos()) -> updateByHeardInfo() -> updateByCollision() -> updateSelfRelated()
void rcsc::BallObject::set_count_thr | ( | const int | pos_thr, | |
const int | rpos_thr, | |||
const int | vel_thr | |||
) | [static] |
set accuracy count threshold values.
pos_thr | threshold value for M_pos | |
rpos_thr | threshold value for M_rpos | |
vel_thr | threshold value for M_vel |
const double& rcsc::BallObject::distFromSelf | ( | ) | const [inline] |
get estimated distance from self
const AngleDeg& rcsc::BallObject::angleFromSelf | ( | ) | const [inline] |
get estimated global angle from self
const Vector2D& rcsc::BallObject::pos | ( | ) | const [inline] |
get estimated global coordinate
const Vector2D& rcsc::BallObject::posError | ( | ) | const [inline] |
get estimated error of global coordinate
const int rcsc::BallObject::posCount | ( | ) | const [inline] |
get global position accuracy count
const Vector2D& rcsc::BallObject::rpos | ( | ) | const [inline] |
get estimated position relative from self
const Vector2D& rcsc::BallObject::rposError | ( | ) | const [inline] |
get estimated error of relative coordinate
const int rcsc::BallObject::rposCount | ( | ) | const [inline] |
get relative position accuracy count
const Vector2D& rcsc::BallObject::rposPrev | ( | ) | const [inline] |
get previous cycle relative position
const Vector2D& rcsc::BallObject::seenPos | ( | ) | const [inline] |
get the last seen position
int rcsc::BallObject::seenPosCount | ( | ) | const [inline] |
get the number of cycles since last seen
const Vector2D& rcsc::BallObject::seenRPos | ( | ) | const [inline] |
get the last seen relative position
const Vector2D& rcsc::BallObject::heardPos | ( | ) | const [inline] |
get the last heard position
int rcsc::BallObject::heardPosCount | ( | ) | const [inline] |
get the number of cycles since last observation
const Vector2D& rcsc::BallObject::vel | ( | ) | const [inline] |
get estimated velocity
const Vector2D& rcsc::BallObject::velError | ( | ) | const [inline] |
get estimated error of velocity
int rcsc::BallObject::velCount | ( | ) | const [inline] |
get velocity accuracy count
const Vector2D& rcsc::BallObject::seenVel | ( | ) | const [inline] |
get the last seen velocity
int rcsc::BallObject::seenVelCount | ( | ) | const [inline] |
get the number of cycles since last velocity seen
int rcsc::BallObject::lostCount | ( | ) | const [inline] |
get count since ball lost
const GameTime& rcsc::BallObject::ghostTime | ( | ) | const [inline] |
get ghost detected time
bool rcsc::BallObject::posValid | ( | ) | const [inline] |
velify global position accuracy
bool rcsc::BallObject::rposValid | ( | ) | const [inline] |
velify relative position accuracy
bool rcsc::BallObject::velValid | ( | ) | const [inline] |
verify velocity accuracy
void rcsc::BallObject::setGhost | ( | const GameTime & | current | ) |
clear all confidence values and set ghost time
current | current game time |
void rcsc::BallObject::update | ( | const ActionEffector & | act, | |
const GameMode & | game_mode, | |||
const GameTime & | current | |||
) |
update status only with intenal info
act | const reference to action effector | |
game_mode | const reference to referee info | |
current | current game time |
void rcsc::BallObject::updateByFullstate | ( | const Vector2D & | pos, | |
const Vector2D & | vel, | |||
const Vector2D & | self_pos | |||
) |
update status with fullstate info
pos | no error position in fullstate info | |
vel | no error velocity in fullstate info | |
self_pos | global self position |
void rcsc::BallObject::updateByCollision | ( | const Vector2D & | pos, | |
const int | pos_count, | |||
const Vector2D & | rpos, | |||
const int | rpos_count, | |||
const Vector2D & | vel, | |||
const int | vel_count | |||
) |
apply collision effect
pos | new global position | |
pos_count | accuracy counter | |
rpos | new relative position | |
rpos_count | accuracy counter | |
vel | new velocity | |
vel_count | accuracy counter |
update relative position using see info.
rpos | observed relative position | |
rpos_err | estimated error of relative position |
void rcsc::BallObject::updateOnlyVel | ( | const Vector2D & | vel, | |
const Vector2D & | vel_err, | |||
const int | vel_count | |||
) |
update velocity using see info
vel | estimated velocity | |
vel_err | estimated error of velocity | |
vel_count | new accuracy value of the velocity |
void rcsc::BallObject::updatePos | ( | const Vector2D & | pos, | |
const Vector2D & | pos_err, | |||
const int | pos_count, | |||
const Vector2D & | rpos, | |||
const Vector2D & | rpos_err | |||
) |
update position by see info (not include velocity)
pos | estimated global position | |
pos_err | estimated error of global position | |
pos_count | new accuracy value of global position. usually same as the self position accuracy. | |
rpos | estimated relative position | |
rpos_err | estimated error of relative position |
void rcsc::BallObject::updateAll | ( | const Vector2D & | pos, | |
const Vector2D & | pos_err, | |||
const int | pos_count, | |||
const Vector2D & | rpos, | |||
const Vector2D & | rpos_err, | |||
const Vector2D & | vel, | |||
const Vector2D & | vel_err, | |||
const int | vel_count | |||
) |
update all status by see info
pos | estimated global position | |
pos_err | estimated error of global position | |
pos_count | new accuracy value of global position. usually same as the self position accuracy. | |
rpos | estimated relative position | |
rpos_err | estimated error of relative position | |
vel | estimated velocity | |
vel_err | estimated error of velocity | |
vel_count | new accuracy value of the velocity |
void rcsc::BallObject::updateByHear | ( | const Vector2D & | heard_pos, | |
const Vector2D & | heard_vel, | |||
const GameTime & | current | |||
) |
update ball status using heared info
heard_pos | heard position | |
heard_vel | heard velocity | |
current | current game time |
void rcsc::BallObject::updateSelfRelated | ( | const SelfObject & | self | ) |
update self related info
self | const reference to the self object |
bool rcsc::BallObject::isWithin | ( | const REGION & | region | ) | const [inline] |
template method. check if ball is in the region
region | template resion. REGION must have method contains() |
Vector2D rcsc::BallObject::inertiaTravel | ( | const int | cycle | ) | const |
estimate movement travel vector
cycle | this method estimates ball travel after this steps |
Vector2D rcsc::BallObject::inertiaPoint | ( | const int | cycle | ) | const |
estimate reach point
cycle | this method estimates ball point after this steps |
Vector2D rcsc::BallObject::inertiaFinalTravel | ( | ) | const |
estimate final movement travel vector
Vector2D rcsc::BallObject::inertiaFinalPoint | ( | ) | const |
estimate final reach point
double rcsc::BallObject::calc_travel_step | ( | const double & | distance, | |
const double & | first_speed | |||
) | [static] |
estimate final reach point