IRI ROS Specific Driver Class. More...
#include <tibi_dabo_hideandseek_alg.h>
Public Types | |
typedef tibi_dabo_hideandseek::TibiDaboHideandseekConfig | Config |
define config type | |
Public Member Functions | |
void | config_update (Config &new_cfg, uint32_t level=0) |
config update | |
bool | initGame (const geometry_msgs::PoseStamped seekerPose, const std::vector< geometry_msgs::Point > hiderPose) |
void | initialize (std::string path, std::string pathOut, std::string map, std::string experiment, int solver) |
bool | iteration (const geometry_msgs::PoseStamped seekerPose, const std::vector< geometry_msgs::Point > hiderPose, geometry_msgs::PoseStamped &seekerGoal, int &gameStatus) |
void | lock (void) |
Lock Algorithm. | |
void | setCellSizeM (double cellSizeM) |
void | setWinDistToHider (int winDist) |
void | stopGame (int winState) |
TibiDaboHideandseekAlgorithm (void) | |
constructor | |
bool | try_enter (void) |
Tries Access to Algorithm. | |
void | unlock (void) |
Unlock Algorithm. | |
~TibiDaboHideandseekAlgorithm (void) | |
Destructor. | |
Public Attributes | |
Config | config_ |
config variable | |
Protected Attributes | |
CMutex | alg_mutex_ |
define config type | |
double | cellsize |
std::string | experiment |
std::string | map |
SeekerHS * | mySeekerHS |
std::string | path |
std::string | pathOut |
int | solver |
int | windist |
IRI ROS Specific Driver Class.
Definition at line 44 of file tibi_dabo_hideandseek_alg.h.
typedef tibi_dabo_hideandseek::TibiDaboHideandseekConfig TibiDaboHideandseekAlgorithm::Config |
define config type
Define a Config type with the TibiDaboHideandseekConfig. All driver implementations will then use the same variable type Config.
Definition at line 72 of file tibi_dabo_hideandseek_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 tibi_dabo_hideandseek_alg.cpp.
Destructor.
This destructor is called when the object is about to be destroyed.
Definition at line 16 of file tibi_dabo_hideandseek_alg.cpp.
void TibiDaboHideandseekAlgorithm::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 20 of file tibi_dabo_hideandseek_alg.cpp.
bool TibiDaboHideandseekAlgorithm::initGame | ( | const geometry_msgs::PoseStamped | seekerPose, |
const std::vector< geometry_msgs::Point > | hiderPose | ||
) |
Definition at line 106 of file tibi_dabo_hideandseek_alg.cpp.
void TibiDaboHideandseekAlgorithm::initialize | ( | std::string | path, |
std::string | pathOut, | ||
std::string | map, | ||
std::string | experiment, | ||
int | solver | ||
) |
Definition at line 42 of file tibi_dabo_hideandseek_alg.cpp.
bool TibiDaboHideandseekAlgorithm::iteration | ( | const geometry_msgs::PoseStamped | seekerPose, |
const std::vector< geometry_msgs::Point > | hiderPose, | ||
geometry_msgs::PoseStamped & | seekerGoal, | ||
int & | gameStatus | ||
) |
Definition at line 138 of file tibi_dabo_hideandseek_alg.cpp.
void TibiDaboHideandseekAlgorithm::lock | ( | void | ) | [inline] |
Lock Algorithm.
Locks access to the Algorithm class
Definition at line 97 of file tibi_dabo_hideandseek_alg.h.
void TibiDaboHideandseekAlgorithm::setCellSizeM | ( | double | cellSizeM | ) |
Definition at line 186 of file tibi_dabo_hideandseek_alg.cpp.
void TibiDaboHideandseekAlgorithm::setWinDistToHider | ( | int | winDist | ) |
Definition at line 181 of file tibi_dabo_hideandseek_alg.cpp.
void TibiDaboHideandseekAlgorithm::stopGame | ( | int | winState | ) |
Definition at line 191 of file tibi_dabo_hideandseek_alg.cpp.
bool TibiDaboHideandseekAlgorithm::try_enter | ( | void | ) | [inline] |
Tries Access to Algorithm.
Tries access to Algorithm
Definition at line 113 of file tibi_dabo_hideandseek_alg.h.
void TibiDaboHideandseekAlgorithm::unlock | ( | void | ) | [inline] |
Unlock Algorithm.
Unlocks access to the Algorithm class
Definition at line 104 of file tibi_dabo_hideandseek_alg.h.
CMutex TibiDaboHideandseekAlgorithm::alg_mutex_ [protected] |
define config type
Define a Config type with the TibiDaboHideandseekConfig. All driver implementations will then use the same variable type Config.
Definition at line 53 of file tibi_dabo_hideandseek_alg.h.
double TibiDaboHideandseekAlgorithm::cellsize [protected] |
Definition at line 63 of file tibi_dabo_hideandseek_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 80 of file tibi_dabo_hideandseek_alg.h.
std::string TibiDaboHideandseekAlgorithm::experiment [protected] |
Definition at line 60 of file tibi_dabo_hideandseek_alg.h.
std::string TibiDaboHideandseekAlgorithm::map [protected] |
Definition at line 59 of file tibi_dabo_hideandseek_alg.h.
SeekerHS* TibiDaboHideandseekAlgorithm::mySeekerHS [protected] |
Definition at line 56 of file tibi_dabo_hideandseek_alg.h.
std::string TibiDaboHideandseekAlgorithm::path [protected] |
Definition at line 57 of file tibi_dabo_hideandseek_alg.h.
std::string TibiDaboHideandseekAlgorithm::pathOut [protected] |
Definition at line 58 of file tibi_dabo_hideandseek_alg.h.
int TibiDaboHideandseekAlgorithm::solver [protected] |
Definition at line 61 of file tibi_dabo_hideandseek_alg.h.
int TibiDaboHideandseekAlgorithm::windist [protected] |
Definition at line 62 of file tibi_dabo_hideandseek_alg.h.