Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
IriClothesGraspingPointAlgNode Class Reference

IRI ROS Specific Algorithm Class. More...

#include <iri_clothes_grasping_point_alg_node.h>

Inheritance diagram for IriClothesGraspingPointAlgNode:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 IriClothesGraspingPointAlgNode (void)
 Constructor.
 ~IriClothesGraspingPointAlgNode (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

void binaryObjectSelection (const cv::Mat labelled_image, cv::Mat &binary_image, unsigned char Red, unsigned char Green, unsigned char Blue)
void count_labels (cv::Mat labelled_image, std::set< unsigned int > &labels)
void draw_clothes_centers (cv::Mat &src_img)
void draw_contours_center (cv::Mat binary_img, cv::Mat &color_output)
void draw_intersections (cv::Mat &src_img)
void image_callback (const sensor_msgs::ImageConstPtr &msg)
void image_from_pcl2 (cv::Mat &rgb_image)
void image_processing (const cv::Mat src_img)
void pcl2_segmented_callback (const sensor_msgs::PointCloud2ConstPtr &msg)

Private Attributes

cv::Mat binary_img1_
cv::Mat binary_img2_
int canny_max_thresh_
int canny_threshold_
cv_bridge::CvImage cv_image
cv::Mat global_cloth_center_
cv::Mat global_cloth_center_color_
cv::Mat global_intersect_
cv::Mat global_intersect_color_
std::vector< cv::Point2f > grasping_point_list_
iri_clothes_grasping_point::GraspingPointList3d graspingPointList3d_msg_
iri_clothes_grasping_point::GraspingPointList graspingPointList_msg_
image_transport::Publisher image_pub1_
image_transport::Publisher image_pub2_
image_transport::Publisher image_pub3_
image_transport::Publisher image_pub4_
image_transport::Publisher image_pub5_
image_transport::Publisher image_pub6_
image_transport::Publisher image_pub_
image_transport::Publisher image_pub_result_
image_transport::Subscriber image_sub_
image_transport::ImageTransport imgtransport_
cv::Mat intersect_
bool intersections_
double minarea_
ros::Subscriber pcl2_sub_
pcl::PointCloud< pcl::PointXYZRGB > pcl_xyzrgb_
iri_clothes_grasping_point::Pixel pixel_msg_
ros::Publisher point_list_publisher_
ros::Publisher poses_list_publisher_

Detailed Description

IRI ROS Specific Algorithm Class.

Definition at line 83 of file iri_clothes_grasping_point_alg_node.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Parameters:
configan object with new configuration from all algorithm parameters defined in the config file.
levelinteger 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.


Member Data Documentation

Definition at line 100 of file iri_clothes_grasping_point_alg_node.h.

Definition at line 101 of file iri_clothes_grasping_point_alg_node.h.

Definition at line 92 of file iri_clothes_grasping_point_alg_node.h.

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.

Definition at line 105 of file iri_clothes_grasping_point_alg_node.h.

Definition at line 106 of file iri_clothes_grasping_point_alg_node.h.

Definition at line 103 of file iri_clothes_grasping_point_alg_node.h.

Definition at line 104 of file iri_clothes_grasping_point_alg_node.h.

Definition at line 98 of file iri_clothes_grasping_point_alg_node.h.

Definition at line 120 of file iri_clothes_grasping_point_alg_node.h.

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.

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.

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.

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.


The documentation for this class was generated from the following files:


iri_clothes_grasping_point
Author(s):
autogenerated on Fri Dec 6 2013 20:29:58