IRI ROS Specific Algorithm Class. More...
#include <iri_clothes_grasping_point_alg_node.h>
IRI ROS Specific Algorithm Class.
Definition at line 83 of file iri_clothes_grasping_point_alg_node.h.
Constructor.
This constructor initializes specific class attributes and all ROS communications variables to enable message exchange.
Definition at line 9 of file iri_clothes_grasping_point_alg_node.cpp.
Destructor.
This destructor frees all necessary dynamic memory allocated within this this class.
Definition at line 391 of file iri_clothes_grasping_point_alg_node.cpp.
void IriClothesGraspingPointAlgNode::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< IriClothesGraspingPointAlgorithm >.
Definition at line 432 of file iri_clothes_grasping_point_alg_node.cpp.
void IriClothesGraspingPointAlgNode::binaryObjectSelection | ( | const cv::Mat | labelled_image, |
cv::Mat & | binary_image, | ||
unsigned char | Red, | ||
unsigned char | Green, | ||
unsigned char | Blue | ||
) | [private] |
-1 stands for random selection
Definition at line 43 of file iri_clothes_grasping_point_alg_node.cpp.
void IriClothesGraspingPointAlgNode::count_labels | ( | cv::Mat | labelled_image, |
std::set< unsigned int > & | labels | ||
) | [private] |
Definition at line 123 of file iri_clothes_grasping_point_alg_node.cpp.
void IriClothesGraspingPointAlgNode::draw_clothes_centers | ( | cv::Mat & | src_img | ) | [private] |
Definition at line 157 of file iri_clothes_grasping_point_alg_node.cpp.
void IriClothesGraspingPointAlgNode::draw_contours_center | ( | cv::Mat | binary_img, |
cv::Mat & | color_output | ||
) | [private] |
Detect edges using canny
Find contours
Get the moments
Get the mass centers:
Draw contours
Calculate the area with the moments 00 and compare with the result of the OpenCV function
Definition at line 66 of file iri_clothes_grasping_point_alg_node.cpp.
void IriClothesGraspingPointAlgNode::draw_intersections | ( | cv::Mat & | src_img | ) | [private] |
Definition at line 177 of file iri_clothes_grasping_point_alg_node.cpp.
void IriClothesGraspingPointAlgNode::image_callback | ( | const sensor_msgs::ImageConstPtr & | msg | ) | [private] |
Definition at line 308 of file iri_clothes_grasping_point_alg_node.cpp.
void IriClothesGraspingPointAlgNode::image_from_pcl2 | ( | cv::Mat & | rgb_image | ) | [private] |
Definition at line 331 of file iri_clothes_grasping_point_alg_node.cpp.
void IriClothesGraspingPointAlgNode::image_processing | ( | const cv::Mat | src_img | ) | [private] |
Definition at line 261 of file iri_clothes_grasping_point_alg_node.cpp.
void IriClothesGraspingPointAlgNode::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< IriClothesGraspingPointAlgorithm >.
Definition at line 398 of file iri_clothes_grasping_point_alg_node.cpp.
void IriClothesGraspingPointAlgNode::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< IriClothesGraspingPointAlgorithm >.
Definition at line 419 of file iri_clothes_grasping_point_alg_node.cpp.
void IriClothesGraspingPointAlgNode::pcl2_segmented_callback | ( | const sensor_msgs::PointCloud2ConstPtr & | msg | ) | [private] |
Definition at line 348 of file iri_clothes_grasping_point_alg_node.cpp.
cv::Mat IriClothesGraspingPointAlgNode::binary_img1_ [private] |
Definition at line 100 of file iri_clothes_grasping_point_alg_node.h.
cv::Mat IriClothesGraspingPointAlgNode::binary_img2_ [private] |
Definition at line 101 of file iri_clothes_grasping_point_alg_node.h.
int IriClothesGraspingPointAlgNode::canny_max_thresh_ [private] |
Definition at line 92 of file iri_clothes_grasping_point_alg_node.h.
int IriClothesGraspingPointAlgNode::canny_threshold_ [private] |
Definition at line 91 of file iri_clothes_grasping_point_alg_node.h.
Definition at line 89 of file iri_clothes_grasping_point_alg_node.h.
cv::Mat IriClothesGraspingPointAlgNode::global_cloth_center_ [private] |
Definition at line 105 of file iri_clothes_grasping_point_alg_node.h.
cv::Mat IriClothesGraspingPointAlgNode::global_cloth_center_color_ [private] |
Definition at line 106 of file iri_clothes_grasping_point_alg_node.h.
cv::Mat IriClothesGraspingPointAlgNode::global_intersect_ [private] |
Definition at line 103 of file iri_clothes_grasping_point_alg_node.h.
cv::Mat IriClothesGraspingPointAlgNode::global_intersect_color_ [private] |
Definition at line 104 of file iri_clothes_grasping_point_alg_node.h.
std::vector<cv::Point2f> IriClothesGraspingPointAlgNode::grasping_point_list_ [private] |
Definition at line 98 of file iri_clothes_grasping_point_alg_node.h.
iri_clothes_grasping_point::GraspingPointList3d IriClothesGraspingPointAlgNode::graspingPointList3d_msg_ [private] |
Definition at line 120 of file iri_clothes_grasping_point_alg_node.h.
iri_clothes_grasping_point::GraspingPointList IriClothesGraspingPointAlgNode::graspingPointList_msg_ [private] |
Definition at line 121 of file iri_clothes_grasping_point_alg_node.h.
Definition at line 124 of file iri_clothes_grasping_point_alg_node.h.
Definition at line 125 of file iri_clothes_grasping_point_alg_node.h.
Definition at line 126 of file iri_clothes_grasping_point_alg_node.h.
Definition at line 127 of file iri_clothes_grasping_point_alg_node.h.
Definition at line 128 of file iri_clothes_grasping_point_alg_node.h.
Definition at line 129 of file iri_clothes_grasping_point_alg_node.h.
Definition at line 123 of file iri_clothes_grasping_point_alg_node.h.
Definition at line 130 of file iri_clothes_grasping_point_alg_node.h.
Definition at line 133 of file iri_clothes_grasping_point_alg_node.h.
Definition at line 114 of file iri_clothes_grasping_point_alg_node.h.
cv::Mat IriClothesGraspingPointAlgNode::intersect_ [private] |
Definition at line 102 of file iri_clothes_grasping_point_alg_node.h.
Definition at line 87 of file iri_clothes_grasping_point_alg_node.h.
double IriClothesGraspingPointAlgNode::minarea_ [private] |
Definition at line 86 of file iri_clothes_grasping_point_alg_node.h.
Definition at line 134 of file iri_clothes_grasping_point_alg_node.h.
pcl::PointCloud<pcl::PointXYZRGB> IriClothesGraspingPointAlgNode::pcl_xyzrgb_ [private] |
Definition at line 135 of file iri_clothes_grasping_point_alg_node.h.
Definition at line 122 of file iri_clothes_grasping_point_alg_node.h.
Definition at line 118 of file iri_clothes_grasping_point_alg_node.h.
Definition at line 119 of file iri_clothes_grasping_point_alg_node.h.