Public Member Functions | |
VectorHistField (OptionManager &mgr, const std::string &descrName="VectorHistField", const std::string &tagName="VectorHistField", const int width=300, const int height=300) | |
Default constructor; see VectorField.H. | |
~VectorHistField () | |
Destructor. | |
Image< PixRGB< byte > > | updateField (std::vector< Point2D< float > > sensorData, Point2D< int >robotPos, float robotOrient, float robotDist, Point2D< int > goal, Image< geom::vec2f > itsObsTemplate) |
Image< geom::vec2f > | obstacleTemplate (float sigma, float amp) |
obstacleTemplate -- creates an obstacle template field | |
void | shiftField (int dist, int ang) |
shiftField -- shifts the field depending on how the robot moved | |
Protected Attributes | |
int | itsDist |
int | itsAng |
Definition at line 45 of file VectorHistField.H.
VectorHistField::VectorHistField | ( | OptionManager & | mgr, | |
const std::string & | descrName = "VectorHistField" , |
|||
const std::string & | tagName = "VectorHistField" , |
|||
const int | width = 300 , |
|||
const int | height = 300 | |||
) |
Default constructor; see VectorField.H.
Definition at line 50 of file VectorHistField.C.
VectorHistField::~VectorHistField | ( | ) |
Destructor.
Definition at line 60 of file VectorHistField.C.
Image< geom::vec2f > VectorHistField::obstacleTemplate | ( | float | sigma, | |
float | amp | |||
) |
obstacleTemplate -- creates an obstacle template field
Definition at line 138 of file VectorHistField.C.
References angle(), Image< T >::beginw(), Image< T >::getDims(), Image< T >::getHeight(), Image< T >::getWidth(), Point2D< T >::i, and NO_INIT.
void VectorHistField::shiftField | ( | int | dist, | |
int | ang | |||
) |
shiftField -- shifts the field depending on how the robot moved
Definition at line 178 of file VectorHistField.C.
References Point2D< T >::i, and shiftClean().
Image< PixRGB< byte > > VectorHistField::updateField | ( | std::vector< Point2D< float > > | sensorData, | |
Point2D< int > | robotPos, | |||
float | robotOrient, | |||
float | robotDist, | |||
Point2D< int > | goal, | |||
Image< geom::vec2f > | itsObsTemplate | |||
) |
updateField() -- update the current field based on some sensor data of type Point2D<int> a; where a.i = distance a.j=angle of obstacle since this can be pretty implementation specific we keep this virtual so that different algorithms can implement their own implementation of this method.
Definition at line 64 of file VectorHistField.C.
References Image< T >::beginw(), Image< T >::clear(), Image< T >::end(), Image< T >::getDims(), Image< T >::getHeight(), Image< T >::getWidth(), Point2D< T >::i, VectorField::rotateGoalField(), VectorField::scaleFieldBy(), VectorField::scaleGoalFieldBy(), shiftClean(), and ZEROS.