IRI ROS Specific Algorithm Class. More...
#include <cleaning_plan_alg_node.h>
Public Member Functions | |
CleaningPlanAlgNode (void) | |
Constructor. | |
~CleaningPlanAlgNode (void) | |
Destructor. | |
Protected Member Functions | |
void | addNodeDiagnostics (void) |
node add diagnostics | |
void | getNearestCleanPlan (iri_clean_board::PlanToTrajectories::Request req, iri_clean_board::PlanToTrajectories::Response &res) |
void | getNoPerceptionCleanPlan (iri_clean_board::PlanToTrajectories::Request req, iri_clean_board::PlanToTrajectories::Response &res) |
void | mainNodeThread (void) |
main node thread | |
void | node_config_update (Config &config, uint32_t level) |
dynamic reconfigure server callback | |
void | savePlanningResponse (iri_clean_board::PlanToTrajectories::Request req, iri_clean_board::PlanToTrajectories::Response &res) |
Private Member Functions | |
bool | get_dirty_areas_state_representationCallback (iri_clean_board::StateRepresentation::Request &req, iri_clean_board::StateRepresentation::Response &res) |
bool | get_trajectories_from_planCallback (iri_clean_board::PlanToTrajectories::Request &req, iri_clean_board::PlanToTrajectories::Response &res) |
bool | representation_to_stringCallback (estirabot_msgs::RepresentationToString::Request &req, estirabot_msgs::RepresentationToString::Response &res) |
void | show_dirty_areas_information (sensor_msgs::PointCloud2 pointcloud, std::vector< estirabot_msgs::DirtyArea > dirty_areas) |
Private Attributes | |
bool | board_plan |
tf::TransformBroadcaster | br |
EllipsesRepresentation | ellipses_representation |
std::string | file_planner_state |
CMutex | get_dirty_areas_state_representation_mutex_ |
ros::ServiceServer | get_dirty_areas_state_representation_server_ |
CMutex | get_trajectories_from_plan_mutex_ |
ros::ServiceServer | get_trajectories_from_plan_server_ |
sensor_msgs::Image | Image_msg_ |
ros::Publisher | image_plan_out_publisher_ |
visualization_msgs::MarkerArray | MarkerArray_msg_ |
uint32_t | max_number_actions |
bool | no_perception |
bool | no_planning |
CMutex | representation_to_string_mutex_ |
ros::ServiceServer | representation_to_string_server_ |
ros::Publisher | visualization_markers_publisher_ |
IRI ROS Specific Algorithm Class.
Definition at line 58 of file cleaning_plan_alg_node.h.
Constructor.
This constructor initializes specific class attributes and all ROS communications variables to enable message exchange.
Definition at line 6 of file cleaning_plan_alg_node.cpp.
Destructor.
This destructor frees all necessary dynamic memory allocated within this this class.
Definition at line 33 of file cleaning_plan_alg_node.cpp.
void CleaningPlanAlgNode::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< CleaningPlanAlgorithm >.
Definition at line 368 of file cleaning_plan_alg_node.cpp.
bool CleaningPlanAlgNode::get_dirty_areas_state_representationCallback | ( | iri_clean_board::StateRepresentation::Request & | req, |
iri_clean_board::StateRepresentation::Response & | res | ||
) | [private] |
Definition at line 71 of file cleaning_plan_alg_node.cpp.
bool CleaningPlanAlgNode::get_trajectories_from_planCallback | ( | iri_clean_board::PlanToTrajectories::Request & | req, |
iri_clean_board::PlanToTrajectories::Response & | res | ||
) | [private] |
Definition at line 123 of file cleaning_plan_alg_node.cpp.
void CleaningPlanAlgNode::getNearestCleanPlan | ( | iri_clean_board::PlanToTrajectories::Request | req, |
iri_clean_board::PlanToTrajectories::Response & | res | ||
) | [protected] |
Definition at line 291 of file cleaning_plan_alg_node.cpp.
void CleaningPlanAlgNode::getNoPerceptionCleanPlan | ( | iri_clean_board::PlanToTrajectories::Request | req, |
iri_clean_board::PlanToTrajectories::Response & | res | ||
) | [protected] |
Definition at line 330 of file cleaning_plan_alg_node.cpp.
void CleaningPlanAlgNode::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< CleaningPlanAlgorithm >.
Definition at line 38 of file cleaning_plan_alg_node.cpp.
void CleaningPlanAlgNode::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< CleaningPlanAlgorithm >.
Definition at line 352 of file cleaning_plan_alg_node.cpp.
bool CleaningPlanAlgNode::representation_to_stringCallback | ( | estirabot_msgs::RepresentationToString::Request & | req, |
estirabot_msgs::RepresentationToString::Response & | res | ||
) | [private] |
Definition at line 53 of file cleaning_plan_alg_node.cpp.
void CleaningPlanAlgNode::savePlanningResponse | ( | iri_clean_board::PlanToTrajectories::Request | req, |
iri_clean_board::PlanToTrajectories::Response & | res | ||
) | [protected] |
Definition at line 152 of file cleaning_plan_alg_node.cpp.
void CleaningPlanAlgNode::show_dirty_areas_information | ( | sensor_msgs::PointCloud2 | pointcloud, |
std::vector< estirabot_msgs::DirtyArea > | dirty_areas | ||
) | [private] |
Definition at line 203 of file cleaning_plan_alg_node.cpp.
bool CleaningPlanAlgNode::board_plan [private] |
Definition at line 95 of file cleaning_plan_alg_node.h.
Definition at line 90 of file cleaning_plan_alg_node.h.
Definition at line 87 of file cleaning_plan_alg_node.h.
std::string CleaningPlanAlgNode::file_planner_state [private] |
Definition at line 97 of file cleaning_plan_alg_node.h.
CMutex CleaningPlanAlgNode::get_dirty_areas_state_representation_mutex_ [private] |
Definition at line 75 of file cleaning_plan_alg_node.h.
Definition at line 73 of file cleaning_plan_alg_node.h.
CMutex CleaningPlanAlgNode::get_trajectories_from_plan_mutex_ [private] |
Definition at line 78 of file cleaning_plan_alg_node.h.
Definition at line 76 of file cleaning_plan_alg_node.h.
sensor_msgs::Image CleaningPlanAlgNode::Image_msg_ [private] |
Definition at line 63 of file cleaning_plan_alg_node.h.
Definition at line 62 of file cleaning_plan_alg_node.h.
visualization_msgs::MarkerArray CleaningPlanAlgNode::MarkerArray_msg_ [private] |
Definition at line 65 of file cleaning_plan_alg_node.h.
uint32_t CleaningPlanAlgNode::max_number_actions [private] |
Definition at line 93 of file cleaning_plan_alg_node.h.
bool CleaningPlanAlgNode::no_perception [private] |
Definition at line 96 of file cleaning_plan_alg_node.h.
bool CleaningPlanAlgNode::no_planning [private] |
Definition at line 94 of file cleaning_plan_alg_node.h.
CMutex CleaningPlanAlgNode::representation_to_string_mutex_ [private] |
Definition at line 72 of file cleaning_plan_alg_node.h.
Definition at line 70 of file cleaning_plan_alg_node.h.
Definition at line 64 of file cleaning_plan_alg_node.h.