IRI ROS Specific Driver Class. More...
#include <vws_alg.h>
Public Types | |
typedef iri_vws::VwsConfig | Config |
define config type | |
Public Member Functions | |
void | config_update (Config &new_cfg, uint32_t level=0) |
config update | |
cv::Mat | descriptors_srv_to_mat (iri_perception_msgs::DescriptorsToVws::Request &req) |
Convert Descriptor msgs to cv::Mat. | |
iri_perception_msgs::GeoVwSet | get_geo_vw_from_descriptors (iri_perception_msgs::DescriptorsToVws::Request &req) |
GeoVw from descriptors. | |
void | lock (void) |
Lock Algorithm. | |
bool | try_enter (void) |
Tries Access to Algorithm. | |
void | unlock (void) |
Unlock Algorithm. | |
VwsAlgorithm (void) | |
constructor | |
~VwsAlgorithm (void) | |
Destructor. | |
Public Attributes | |
cv::Mat | centroids_ |
bool | centroids_ready_ |
Config | config_ |
config variable | |
Protected Attributes | |
CMutex | alg_mutex_ |
define config type |
typedef iri_vws::VwsConfig VwsAlgorithm::Config |
VwsAlgorithm::VwsAlgorithm | ( | void | ) |
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 vws_alg.cpp.
VwsAlgorithm::~VwsAlgorithm | ( | void | ) |
Destructor.
This destructor is called when the object is about to be destroyed.
Definition at line 7 of file vws_alg.cpp.
void VwsAlgorithm::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 11 of file vws_alg.cpp.
cv::Mat VwsAlgorithm::descriptors_srv_to_mat | ( | iri_perception_msgs::DescriptorsToVws::Request & | req | ) |
Convert Descriptor msgs to cv::Mat.
Convert Descriptor msgs to cv::Mat
Definition at line 22 of file vws_alg.cpp.
iri_perception_msgs::GeoVwSet VwsAlgorithm::get_geo_vw_from_descriptors | ( | iri_perception_msgs::DescriptorsToVws::Request & | req | ) |
GeoVw from descriptors.
Get geo visual words from descriptors
Definition at line 37 of file vws_alg.cpp.
void VwsAlgorithm::lock | ( | void | ) | [inline] |
bool VwsAlgorithm::try_enter | ( | void | ) | [inline] |
void VwsAlgorithm::unlock | ( | void | ) | [inline] |
CMutex VwsAlgorithm::alg_mutex_ [protected] |
cv::Mat VwsAlgorithm::centroids_ |
config variable
This variable has all the driver parameters defined in the cfg config file. Is updated everytime function config_update() is called.