IRI ROS Specific Algorithm Class. More...
#include <iri_score_map_mix_node.h>
Public Member Functions | |
ScoreMapMixAlgNode (void) | |
Constructor. | |
~ScoreMapMixAlgNode (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 | algorithm_idCallback (iri_deformable_analysis::SetScoreMixAlgorithmID::Request &req, iri_deformable_analysis::SetScoreMixAlgorithmID::Response &res) |
void | algorithmConfigurationTranslation (int alg_id) |
bool | all_clouds_ready () |
void | computeGraspPoints () |
void | computeScoreMap () |
void | getMax (const pcl::PointCloud< pcl::PointXYZRGB > score_map, pcl::PointXYZRGB &grasp_point, int &pcl_row, int &pcl_col, float &max_score, float &min_score) |
void | normalizeScoreMap (const pcl::PointCloud< pcl::PointXYZRGB > score_map) |
void | normalizeScoreMap (const pcl::PointCloud< pcl::PointXYZRGB > score_map, double max_input, double min_input) |
void | score_map0_callback (const sensor_msgs::PointCloud2::ConstPtr &msg) |
void | score_map1_callback (const sensor_msgs::PointCloud2::ConstPtr &msg) |
void | score_map2_callback (const sensor_msgs::PointCloud2::ConstPtr &msg) |
void | score_map3_callback (const sensor_msgs::PointCloud2::ConstPtr &msg) |
void | score_map4_callback (const sensor_msgs::PointCloud2::ConstPtr &msg) |
void | score_map5_callback (const sensor_msgs::PointCloud2::ConstPtr &msg) |
void | score_map6_callback (const sensor_msgs::PointCloud2::ConstPtr &msg) |
void | score_map7_callback (const sensor_msgs::PointCloud2::ConstPtr &msg) |
Private Attributes | |
CMutex | algorithm_id_mutex_ |
ros::Publisher | algorithm_id_publisher_ |
ros::ServiceServer | algorithm_id_server_ |
geometry_msgs::PoseStamped | best_scored_pose_ |
ros::Publisher | grasping_point_pose_publisher_ |
std::vector< pcl::PointCloud < pcl::PointXYZRGB > > | input_score_maps_ |
int | num_score_maps_ |
pcl::PointCloud< pcl::PointXYZRGB > | output_score_map_ |
CMutex | score_map0_mutex_ |
ros::Subscriber | score_map0_subscriber_ |
CMutex | score_map1_mutex_ |
ros::Subscriber | score_map1_subscriber_ |
CMutex | score_map2_mutex_ |
ros::Subscriber | score_map2_subscriber_ |
CMutex | score_map3_mutex_ |
ros::Subscriber | score_map3_subscriber_ |
CMutex | score_map4_mutex_ |
ros::Subscriber | score_map4_subscriber_ |
CMutex | score_map5_mutex_ |
ros::Subscriber | score_map5_subscriber_ |
CMutex | score_map6_mutex_ |
ros::Subscriber | score_map6_subscriber_ |
CMutex | score_map7_mutex_ |
ros::Subscriber | score_map7_subscriber_ |
sensor_msgs::PointCloud2 | score_map_global_msg_ |
ros::Publisher | score_map_global_publisher_ |
std::vector< bool > | score_map_ready_ |
iri_deformable_analysis::ScoreMapMixResults | score_results_ |
ros::Publisher | score_results_publisher_ |
int | selection_algorithm_id_ |
std_msgs::UInt32 | UInt32_msg_ |
std::vector< double > | weights_ |
IRI ROS Specific Algorithm Class.
Definition at line 63 of file iri_score_map_mix_node.h.
Constructor.
This constructor initializes specific class attributes and all ROS communications variables to enable message exchange.
Definition at line 3 of file iri_score_map_mix_node.cpp.
Destructor.
This destructor frees all necessary dynamic memory allocated within this this class.
Definition at line 44 of file iri_score_map_mix_node.cpp.
void ScoreMapMixAlgNode::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< ScoreMapMixAlgorithm >.
Definition at line 312 of file iri_score_map_mix_node.cpp.
bool ScoreMapMixAlgNode::algorithm_idCallback | ( | iri_deformable_analysis::SetScoreMixAlgorithmID::Request & | req, |
iri_deformable_analysis::SetScoreMixAlgorithmID::Response & | res | ||
) | [private] |
Definition at line 244 of file iri_score_map_mix_node.cpp.
void ScoreMapMixAlgNode::algorithmConfigurationTranslation | ( | int | alg_id | ) | [private] |
Definition at line 338 of file iri_score_map_mix_node.cpp.
bool ScoreMapMixAlgNode::all_clouds_ready | ( | ) | [private] |
Definition at line 316 of file iri_score_map_mix_node.cpp.
void ScoreMapMixAlgNode::computeGraspPoints | ( | ) | [private] |
Definition at line 421 of file iri_score_map_mix_node.cpp.
void ScoreMapMixAlgNode::computeScoreMap | ( | ) | [private] |
Definition at line 360 of file iri_score_map_mix_node.cpp.
void ScoreMapMixAlgNode::getMax | ( | const pcl::PointCloud< pcl::PointXYZRGB > | score_map, |
pcl::PointXYZRGB & | grasp_point, | ||
int & | pcl_row, | ||
int & | pcl_col, | ||
float & | max_score, | ||
float & | min_score | ||
) | [private] |
Definition at line 392 of file iri_score_map_mix_node.cpp.
void ScoreMapMixAlgNode::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< ScoreMapMixAlgorithm >.
Definition at line 49 of file iri_score_map_mix_node.cpp.
void ScoreMapMixAlgNode::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< ScoreMapMixAlgorithm >.
Definition at line 282 of file iri_score_map_mix_node.cpp.
void ScoreMapMixAlgNode::normalizeScoreMap | ( | const pcl::PointCloud< pcl::PointXYZRGB > | score_map | ) | [private] |
Definition at line 490 of file iri_score_map_mix_node.cpp.
void ScoreMapMixAlgNode::normalizeScoreMap | ( | const pcl::PointCloud< pcl::PointXYZRGB > | score_map, |
double | max_input, | ||
double | min_input | ||
) | [private] |
Definition at line 471 of file iri_score_map_mix_node.cpp.
void ScoreMapMixAlgNode::score_map0_callback | ( | const sensor_msgs::PointCloud2::ConstPtr & | msg | ) | [private] |
Definition at line 222 of file iri_score_map_mix_node.cpp.
void ScoreMapMixAlgNode::score_map1_callback | ( | const sensor_msgs::PointCloud2::ConstPtr & | msg | ) | [private] |
Definition at line 202 of file iri_score_map_mix_node.cpp.
void ScoreMapMixAlgNode::score_map2_callback | ( | const sensor_msgs::PointCloud2::ConstPtr & | msg | ) | [private] |
Definition at line 181 of file iri_score_map_mix_node.cpp.
void ScoreMapMixAlgNode::score_map3_callback | ( | const sensor_msgs::PointCloud2::ConstPtr & | msg | ) | [private] |
Definition at line 160 of file iri_score_map_mix_node.cpp.
void ScoreMapMixAlgNode::score_map4_callback | ( | const sensor_msgs::PointCloud2::ConstPtr & | msg | ) | [private] |
Definition at line 139 of file iri_score_map_mix_node.cpp.
void ScoreMapMixAlgNode::score_map5_callback | ( | const sensor_msgs::PointCloud2::ConstPtr & | msg | ) | [private] |
Definition at line 118 of file iri_score_map_mix_node.cpp.
void ScoreMapMixAlgNode::score_map6_callback | ( | const sensor_msgs::PointCloud2::ConstPtr & | msg | ) | [private] |
Definition at line 98 of file iri_score_map_mix_node.cpp.
void ScoreMapMixAlgNode::score_map7_callback | ( | const sensor_msgs::PointCloud2::ConstPtr & | msg | ) | [private] |
Definition at line 72 of file iri_score_map_mix_node.cpp.
CMutex ScoreMapMixAlgNode::algorithm_id_mutex_ [private] |
Definition at line 115 of file iri_score_map_mix_node.h.
Definition at line 81 of file iri_score_map_mix_node.h.
Definition at line 113 of file iri_score_map_mix_node.h.
geometry_msgs::PoseStamped ScoreMapMixAlgNode::best_scored_pose_ [private] |
Definition at line 80 of file iri_score_map_mix_node.h.
Definition at line 79 of file iri_score_map_mix_node.h.
std::vector<pcl::PointCloud<pcl::PointXYZRGB> > ScoreMapMixAlgNode::input_score_maps_ [private] |
Definition at line 69 of file iri_score_map_mix_node.h.
int ScoreMapMixAlgNode::num_score_maps_ [private] |
Definition at line 68 of file iri_score_map_mix_node.h.
pcl::PointCloud<pcl::PointXYZRGB> ScoreMapMixAlgNode::output_score_map_ [private] |
Definition at line 74 of file iri_score_map_mix_node.h.
CMutex ScoreMapMixAlgNode::score_map0_mutex_ [private] |
Definition at line 89 of file iri_score_map_mix_node.h.
Definition at line 87 of file iri_score_map_mix_node.h.
CMutex ScoreMapMixAlgNode::score_map1_mutex_ [private] |
Definition at line 110 of file iri_score_map_mix_node.h.
Definition at line 108 of file iri_score_map_mix_node.h.
CMutex ScoreMapMixAlgNode::score_map2_mutex_ [private] |
Definition at line 107 of file iri_score_map_mix_node.h.
Definition at line 105 of file iri_score_map_mix_node.h.
CMutex ScoreMapMixAlgNode::score_map3_mutex_ [private] |
Definition at line 104 of file iri_score_map_mix_node.h.
Definition at line 102 of file iri_score_map_mix_node.h.
CMutex ScoreMapMixAlgNode::score_map4_mutex_ [private] |
Definition at line 101 of file iri_score_map_mix_node.h.
Definition at line 99 of file iri_score_map_mix_node.h.
CMutex ScoreMapMixAlgNode::score_map5_mutex_ [private] |
Definition at line 98 of file iri_score_map_mix_node.h.
Definition at line 96 of file iri_score_map_mix_node.h.
CMutex ScoreMapMixAlgNode::score_map6_mutex_ [private] |
Definition at line 95 of file iri_score_map_mix_node.h.
Definition at line 93 of file iri_score_map_mix_node.h.
CMutex ScoreMapMixAlgNode::score_map7_mutex_ [private] |
Definition at line 92 of file iri_score_map_mix_node.h.
Definition at line 90 of file iri_score_map_mix_node.h.
sensor_msgs::PointCloud2 ScoreMapMixAlgNode::score_map_global_msg_ [private] |
Definition at line 78 of file iri_score_map_mix_node.h.
Definition at line 77 of file iri_score_map_mix_node.h.
std::vector<bool> ScoreMapMixAlgNode::score_map_ready_ [private] |
Definition at line 70 of file iri_score_map_mix_node.h.
iri_deformable_analysis::ScoreMapMixResults ScoreMapMixAlgNode::score_results_ [private] |
Definition at line 84 of file iri_score_map_mix_node.h.
Definition at line 83 of file iri_score_map_mix_node.h.
int ScoreMapMixAlgNode::selection_algorithm_id_ [private] |
Definition at line 67 of file iri_score_map_mix_node.h.
std_msgs::UInt32 ScoreMapMixAlgNode::UInt32_msg_ [private] |
Definition at line 82 of file iri_score_map_mix_node.h.
std::vector<double> ScoreMapMixAlgNode::weights_ [private] |
Definition at line 73 of file iri_score_map_mix_node.h.