IRI ROS Specific Algorithm Class. More...
#include <rule_learner_alg_node.h>
Public Member Functions | |
RuleLearnerAlgNode (void) | |
Constructor. | |
~RuleLearnerAlgNode (void) | |
Destructor. | |
Protected Member Functions | |
void | addNodeDiagnostics (void) |
node add diagnostics | |
void | mainNodeThread (void) |
main node thread | |
void | node_config_update (Config &config, uint32_t level) |
dynamic reconfigure server callback | |
Private Member Functions | |
bool | add_actionCallback (estirabot_msgs::AddAction::Request &req, estirabot_msgs::AddAction::Response &res) |
bool | add_stateCallback (estirabot_msgs::AddState::Request &req, estirabot_msgs::AddState::Response &res) |
Private Attributes | |
CMutex | add_action_mutex_ |
ros::ServiceServer | add_action_server_ |
CMutex | add_state_mutex_ |
ros::ServiceServer | add_state_server_ |
std::vector < estirabot_msgs::DirtyArea > | dirty_areas_ |
ros::ServiceClient | get_state_changes_client_ |
estirabot_msgs::StateRepresentationChanges | get_state_changes_srv_ |
Symbol | last_action_ |
std::string | last_state_ |
ros::ServiceClient | learn_pasula_client_ |
iri_learning_msgs::LearnRulesFromTransitions | learn_pasula_srv_ |
bool | needs_learning_ |
uint | pasula_iter_ |
ros::Duration | pasula_time_ |
ros::ServiceClient | representation_to_string_client_ |
estirabot_msgs::RepresentationToString | representation_to_string_srv_ |
IRI ROS Specific Algorithm Class.
Definition at line 49 of file rule_learner_alg_node.h.
Constructor.
This constructor initializes specific class attributes and all ROS communications variables to enable message exchange.
Definition at line 3 of file rule_learner_alg_node.cpp.
Destructor.
This destructor frees all necessary dynamic memory allocated within this this class.
Definition at line 31 of file rule_learner_alg_node.cpp.
bool RuleLearnerAlgNode::add_actionCallback | ( | estirabot_msgs::AddAction::Request & | req, |
estirabot_msgs::AddAction::Response & | res | ||
) | [private] |
Definition at line 150 of file rule_learner_alg_node.cpp.
bool RuleLearnerAlgNode::add_stateCallback | ( | estirabot_msgs::AddState::Request & | req, |
estirabot_msgs::AddState::Response & | res | ||
) | [private] |
Definition at line 132 of file rule_learner_alg_node.cpp.
void RuleLearnerAlgNode::addNodeDiagnostics | ( | void | ) | [protected, virtual] |
node add diagnostics
In this abstract function additional ROS diagnostics applied to the specific algorithms may be added.
Implements algorithm_base::IriBaseAlgorithm< RuleLearnerAlgorithm >.
Definition at line 178 of file rule_learner_alg_node.cpp.
void RuleLearnerAlgNode::mainNodeThread | ( | void | ) | [protected, virtual] |
main node thread
This is the main thread node function. Code written here will be executed in every node loop while the algorithm is on running state. Loop frequency can be tuned by modifying loop_rate attribute.
Here data related to the process loop or to ROS topics (mainly data structs related to the MSG and SRV files) must be updated. ROS publisher objects must publish their data in this process. ROS client servers may also request data to the corresponding server topics.
Implements algorithm_base::IriBaseAlgorithm< RuleLearnerAlgorithm >.
Definition at line 36 of file rule_learner_alg_node.cpp.
void RuleLearnerAlgNode::node_config_update | ( | Config & | config, |
uint32_t | level | ||
) | [protected, virtual] |
dynamic reconfigure server callback
This method is called whenever a new configuration is received through the dynamic reconfigure. The derivated generic algorithm class must implement it.
config | an object with new configuration from all algorithm parameters defined in the config file. |
level | integer referring the level in which the configuration has been changed. |
Implements algorithm_base::IriBaseAlgorithm< RuleLearnerAlgorithm >.
Definition at line 171 of file rule_learner_alg_node.cpp.
CMutex RuleLearnerAlgNode::add_action_mutex_ [private] |
Definition at line 65 of file rule_learner_alg_node.h.
Definition at line 63 of file rule_learner_alg_node.h.
CMutex RuleLearnerAlgNode::add_state_mutex_ [private] |
Definition at line 62 of file rule_learner_alg_node.h.
Definition at line 60 of file rule_learner_alg_node.h.
std::vector<estirabot_msgs::DirtyArea> RuleLearnerAlgNode::dirty_areas_ [private] |
Definition at line 83 of file rule_learner_alg_node.h.
Definition at line 72 of file rule_learner_alg_node.h.
estirabot_msgs::StateRepresentationChanges RuleLearnerAlgNode::get_state_changes_srv_ [private] |
Definition at line 73 of file rule_learner_alg_node.h.
Symbol RuleLearnerAlgNode::last_action_ [private] |
Definition at line 80 of file rule_learner_alg_node.h.
std::string RuleLearnerAlgNode::last_state_ [private] |
Definition at line 81 of file rule_learner_alg_node.h.
Definition at line 68 of file rule_learner_alg_node.h.
iri_learning_msgs::LearnRulesFromTransitions RuleLearnerAlgNode::learn_pasula_srv_ [private] |
Definition at line 69 of file rule_learner_alg_node.h.
bool RuleLearnerAlgNode::needs_learning_ [private] |
Definition at line 86 of file rule_learner_alg_node.h.
uint RuleLearnerAlgNode::pasula_iter_ [private] |
Definition at line 89 of file rule_learner_alg_node.h.
Definition at line 88 of file rule_learner_alg_node.h.
Definition at line 70 of file rule_learner_alg_node.h.
estirabot_msgs::RepresentationToString RuleLearnerAlgNode::representation_to_string_srv_ [private] |
Definition at line 71 of file rule_learner_alg_node.h.