IRI ROS Specific Driver Class. More...
#include <map_location_alg.h>
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 |
IRI ROS Specific Driver Class.
Definition at line 46 of file map_location_alg.h.
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
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.
void MapLocationAlgorithm::addLocation | ( | float | xpos, |
float | ypos, | ||
int | colorindex | ||
) |
Definition at line 193 of file map_location_alg.cpp.
void MapLocationAlgorithm::addLocationWithCode | ( | int | code | ) |
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.
new_cfg | the new driver configuration state |
level | level 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.
cv::Mat MapLocationAlgorithm::getImage | ( | ) |
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.
void MapLocationAlgorithm::loadFiles | ( | ) |
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.
void MapLocationAlgorithm::loadLocations | ( | ) | [protected] |
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.
void MapLocationAlgorithm::logoIteration | ( | ) |
Definition at line 64 of file map_location_alg.cpp.
void MapLocationAlgorithm::mapIteration | ( | ) |
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
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.
CMutex MapLocationAlgorithm::alg_mutex_ [protected] |
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.
cv::Mat MapLocationAlgorithm::image |
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.
std::string MapLocationAlgorithm::path |
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.