Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
MapLocationAlgorithm Class Reference

IRI ROS Specific Driver Class. More...

#include <map_location_alg.h>

List of all members.

Public Types

typedef
iri_map_location::MapLocationConfig 
Config
 define config type

Public Member Functions

void addLocation (float xpos, float ypos, int colorindex)
void addLocationWithCode (int code)
void config_update (Config &new_cfg, uint32_t level=0)
 config update
cv::Mat getImage ()
void loadFiles ()
void lock (void)
 Lock Algorithm.
void logoIteration ()
void mapIteration ()
 MapLocationAlgorithm (void)
 constructor
bool try_enter (void)
 Tries Access to Algorithm.
void unlock (void)
 Unlock Algorithm.
 ~MapLocationAlgorithm (void)
 Destructor.

Public Attributes

Config config_
 config variable
cv::Mat image
std::string path

Protected Member Functions

void drawCircle (int x, int y, int r, CvScalar color)
void initialize ()
void initText (cv::Size *textSize, CvFont *font, int const fontFace, double const fontScale, float const fontShare, int const fontThickness, int const fontLineType, std::vector< std::string > const text)
void loadCaption ()
cv::Mat loadImage (std::string const imagePath, int mode)
void loadLocations ()
void showImage ()

Protected Attributes

CMutex alg_mutex_
 define config type
std::vector< CvScalar > colorList
std::vector< CvScalar > currentColor
std::vector< std::string > currentText
std::vector< std::vector< int > > locations
cv::Mat logo2Image
std::string logo2Path
cv::Mat logoImage
std::string logoPath
cv::Mat mapImage
std::string mapPath
int t
std::vector< std::string > textList

Detailed Description

IRI ROS Specific Driver Class.

Definition at line 46 of file map_location_alg.h.


Member Typedef Documentation

typedef iri_map_location::MapLocationConfig MapLocationAlgorithm::Config

define config type

Define a Config type with the MapLocationConfig. All driver implementations will then use the same variable type Config.

Definition at line 90 of file map_location_alg.h.


Constructor & Destructor Documentation

constructor

In this constructor parameters related to the specific driver can be initalized. Those parameters can be also set in the openDriver() function. Attributes from the main node driver class IriBaseDriver such as loop_rate, may be also overload here.

Definition at line 3 of file map_location_alg.cpp.

Destructor.

This destructor is called when the object is about to be destroyed.

Definition at line 28 of file map_location_alg.cpp.


Member Function Documentation

void MapLocationAlgorithm::addLocation ( float  xpos,
float  ypos,
int  colorindex 
)

Definition at line 193 of file map_location_alg.cpp.

Definition at line 242 of file map_location_alg.cpp.

void MapLocationAlgorithm::config_update ( Config new_cfg,
uint32_t  level = 0 
)

config update

In this function the driver parameters must be updated with the input config variable. Then the new configuration state will be stored in the Config attribute.

Parameters:
new_cfgthe new driver configuration state
levellevel in which the update is taken place

Definition at line 33 of file map_location_alg.cpp.

void MapLocationAlgorithm::drawCircle ( int  x,
int  y,
int  r,
CvScalar  color 
) [protected]

Definition at line 181 of file map_location_alg.cpp.

Definition at line 293 of file map_location_alg.cpp.

void MapLocationAlgorithm::initialize ( ) [protected]

Definition at line 45 of file map_location_alg.cpp.

void MapLocationAlgorithm::initText ( cv::Size *  textSize,
CvFont *  font,
int const  fontFace,
double const  fontScale,
float const  fontShare,
int const  fontThickness,
int const  fontLineType,
std::vector< std::string > const  text 
) [protected]

Definition at line 168 of file map_location_alg.cpp.

void MapLocationAlgorithm::loadCaption ( ) [protected]

Definition at line 93 of file map_location_alg.cpp.

Definition at line 306 of file map_location_alg.cpp.

cv::Mat MapLocationAlgorithm::loadImage ( std::string const  imagePath,
int  mode 
) [protected]

Definition at line 78 of file map_location_alg.cpp.

Definition at line 155 of file map_location_alg.cpp.

void MapLocationAlgorithm::lock ( void  ) [inline]

Lock Algorithm.

Locks access to the Algorithm class

Definition at line 115 of file map_location_alg.h.

Definition at line 64 of file map_location_alg.cpp.

Definition at line 50 of file map_location_alg.cpp.

void MapLocationAlgorithm::showImage ( ) [protected]

Definition at line 298 of file map_location_alg.cpp.

bool MapLocationAlgorithm::try_enter ( void  ) [inline]

Tries Access to Algorithm.

Tries access to Algorithm

Returns:
true if the lock was adquired, false otherwise

Definition at line 131 of file map_location_alg.h.

void MapLocationAlgorithm::unlock ( void  ) [inline]

Unlock Algorithm.

Unlocks access to the Algorithm class

Definition at line 122 of file map_location_alg.h.


Member Data Documentation

define config type

Define a Config type with the MapLocationConfig. All driver implementations will then use the same variable type Config.

Definition at line 55 of file map_location_alg.h.

std::vector< CvScalar > MapLocationAlgorithm::colorList [protected]

Definition at line 68 of file map_location_alg.h.

config variable

This variable has all the driver parameters defined in the cfg config file. Is updated everytime function config_update() is called.

Definition at line 98 of file map_location_alg.h.

std::vector< CvScalar > MapLocationAlgorithm::currentColor [protected]

Definition at line 70 of file map_location_alg.h.

std::vector< std::string > MapLocationAlgorithm::currentText [protected]

Definition at line 71 of file map_location_alg.h.

Definition at line 148 of file map_location_alg.h.

std::vector< std::vector<int> > MapLocationAlgorithm::locations [protected]

Definition at line 72 of file map_location_alg.h.

cv::Mat MapLocationAlgorithm::logo2Image [protected]

Definition at line 63 of file map_location_alg.h.

std::string MapLocationAlgorithm::logo2Path [protected]

Definition at line 60 of file map_location_alg.h.

cv::Mat MapLocationAlgorithm::logoImage [protected]

Definition at line 62 of file map_location_alg.h.

std::string MapLocationAlgorithm::logoPath [protected]

Definition at line 59 of file map_location_alg.h.

cv::Mat MapLocationAlgorithm::mapImage [protected]

Definition at line 61 of file map_location_alg.h.

std::string MapLocationAlgorithm::mapPath [protected]

Definition at line 58 of file map_location_alg.h.

Definition at line 156 of file map_location_alg.h.

int MapLocationAlgorithm::t [protected]

Definition at line 65 of file map_location_alg.h.

std::vector< std::string > MapLocationAlgorithm::textList [protected]

Definition at line 69 of file map_location_alg.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


iri_map_location
Author(s): fherrero
autogenerated on Tue Jan 15 2013 15:09:06