Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
ClosedDoorDetectorAlgNode Class Reference

IRI ROS Specific Algorithm Class. More...

#include <closed_door_detector_alg_node.h>

Inheritance diagram for ClosedDoorDetectorAlgNode:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ClosedDoorDetectorAlgNode (void)
 Constructor.
 ~ClosedDoorDetectorAlgNode (void)
 Destructor.

Protected Member Functions

void addNodeDiagnostics (void)
 node add diagnostics
double AngleBetweenLines (cv::Point point1, cv::Point point2, cv::Point point3, cv::Point point4)
 Angle between two lines.
void DoorSizeCalibration (cv::Mat inputImage, double min_dst_h, double max_dst_h, double min_dst_v, double max_dst_v, int handle_width, int handle_height)
 Display door/handle size limits.
void DrawRect (cv::Mat inputImage, cv::Point q1, cv::Point q2, cv::Point q3, cv::Point q4, cv::Scalar color, int lineSize, int filled)
 Draw Quadrilateral.
void mainNodeThread (void)
 main node thread
void node_config_update (Config &config, uint32_t level)
 dynamic reconfigure server callback

Private Member Functions

void door_action_start_callback (const std_msgs::Int8::ConstPtr &msg)
void image_color_callback (const sensor_msgs::Image::ConstPtr &msg)
void image_depth_callback (const sensor_msgs::Image::ConstPtr &msg)
void points_callback (const sensor_msgs::PointCloud2::ConstPtr &msg)

Private Attributes

int allowed_blobs
int area
int aspect
bool Aspect_filter
double b1
double b2
double b3
double b4
cv::Point2d b_c1
cv::Point2d b_c2
cv::Point2d b_c3
cv::Point2d b_c4
cv::Point2d b_door_centroid
cv::Point2d b_handle
float b_handle_x
float b_handle_y
float b_handle_z
cv::Scalar black
cv_bridge::CvImagePtr blobs
cv::Point2d c1
cv::Point2d c10
cv::Point2d c11
cv::Point2d c12
cv::Point2d c2
cv::Point2d c3
cv::Point2d c4
cv::Point2d c5
cv::Point2d c6
cv::Point2d c7
cv::Point2d c8
cv::Point2d c9
cv_bridge::CvImagePtr canny
int captured_depth
int check
ros::Publisher closed_door_coordinates_publisher_
pcl::PointCloud< pcl::PointXYZ > cloud
cv::Vec3b color
std::vector< cv::Vec3b > colorTab
int compCount
int cx_max
int cx_min
int cy_max
int cy_min
float * Da
int debugging_images
cv_bridge::CvImagePtr depth_raw
float * Di
CMutex door_action_start_mutex_
ros::Subscriber door_action_start_subscriber_
std_msgs::Int32MultiArray door_coordinates
ros::Publisher door_handle_publisher_
int door_x
int door_y
bool DSC
double dst
double dst_down
double dst_h
double dst_left
double dst_right
double dst_up
double dst_v
double dx
double dy
int f_c1
int f_c2
int f_c3
int f_c4
int flat
int frames_size
bool Geom_filter
int geometry
cv_bridge::CvImagePtr gradient
double h_r
int handle_height
int handle_location
float handle_mask_width
int handle_maxx
int handle_maxy
int handle_minx
int handle_miny
int handle_width
int handle_x
int handle_y
int i_max
int i_min
int idx
char * Ii
CMutex image_color_mutex_
ros::Subscriber image_color_subscriber_
CMutex image_depth_mutex_
ros::Subscriber image_depth_subscriber_
std_msgs::Int32MultiArray Int32MultiArray_msg_
int k_max
int k_min
int lower_offset
double m1
double m2
double m3
double m4
int max_door_height
int max_door_width
double max_dst_h
double max_dst_v
float meters
int min_door_height
int min_door_width
double min_dst_h
double min_dst_v
bool no_simulator
int offset_d
int offset_l
int offset_r
int offset_u
pcl::PointXYZ offsetPoint3D
cv_bridge::CvImagePtr original
cv::Vec3b original_color
cv::Point2d p_left
cv::Point2d p_up
bool Persp_filter
int perspective
int point
pcl::PointXYZ point3D
CMutex points_mutex_
ros::Subscriber points_subscriber_
geometry_msgs::PoseStamped PoseStamped_msg_
double r
bool Range_filter
int repeated_color
cv::RNG rng
int roi_x
int roi_y
cv::Point2d s_c1
cv::Point2d s_c2
cv::Point2d s_c3
cv::Point2d s_c4
cv::Point2d s_door_centroid
cv::Point2d s_handle
int segment_fidelity
int segment_size
int sensor_range
bool SFT
bool SHM
int size
bool Size_filter
std::vector< cv::Point2d > ss_c1
std::vector< cv::Point2d > ss_c2
std::vector< cv::Point2d > ss_c3
std::vector< cv::Point2d > ss_c4
std::vector< cv::Point2d > ss_door_centroid
std::vector< cv::Point2d > ss_handle
std::vector< float > ss_handle_x
std::vector< float > ss_handle_y
std::vector< float > ss_handle_z
int start
double step_x
double step_y
int support
bool SVP
double theta
double theta1
double theta2
double theta3
double theta4
int upper_offset
double v_r
std::vector< cv::Point2d > vec_down
std::vector< cv::Point2d > vec_left
std::vector< cv::Point2d > vec_right
std::vector< cv::Point2d > vec_up
cv::Scalar white
float x
float x_i
float y
float y_i
float z
float z_i

Static Private Attributes

static const double cx_d = 3.3930780975300314e+02
static const double cy_d = 2.4273913761751615e+02
static const double fx_d = 1.0 / 5.9421434211923247e+02
static const double fy_d = 1.0 / 5.9104053696870778e+02
static const double max_range = 5.5
static const double min_range = 0.5

Detailed Description

IRI ROS Specific Algorithm Class.

Definition at line 70 of file closed_door_detector_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 10 of file closed_door_detector_alg_node.cpp.

Destructor.

This destructor frees all necessary dynamic memory allocated within this this class.

Definition at line 46 of file closed_door_detector_alg_node.cpp.


Member Function Documentation

void ClosedDoorDetectorAlgNode::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< ClosedDoorDetectorAlgorithm >.

Definition at line 1245 of file closed_door_detector_alg_node.cpp.

double ClosedDoorDetectorAlgNode::AngleBetweenLines ( cv::Point  point1,
cv::Point  point2,
cv::Point  point3,
cv::Point  point4 
) [protected]

Angle between two lines.

Return minimum angle between two lines in radians

Definition at line 1308 of file closed_door_detector_alg_node.cpp.

void ClosedDoorDetectorAlgNode::door_action_start_callback ( const std_msgs::Int8::ConstPtr &  msg) [private]

Definition at line 67 of file closed_door_detector_alg_node.cpp.

void ClosedDoorDetectorAlgNode::DoorSizeCalibration ( cv::Mat  inputImage,
double  min_dst_h,
double  max_dst_h,
double  min_dst_v,
double  max_dst_v,
int  handle_width,
int  handle_height 
) [protected]

Display door/handle size limits.

Display current door limits and handle size in inputImage in order to modify these parameters based on visual feedback

Definition at line 1256 of file closed_door_detector_alg_node.cpp.

void ClosedDoorDetectorAlgNode::DrawRect ( cv::Mat  inputImage,
cv::Point  q1,
cv::Point  q2,
cv::Point  q3,
cv::Point  q4,
cv::Scalar  color,
int  lineSize,
int  filled 
) [protected]

Draw Quadrilateral.

Draw a Quadrilateral shape on inputImage given 4 cvPoint coordinates in clockwise order. If filled == 0 4 lines are drawn. If filled == 1 a filled quadrilateral is drawn

Definition at line 1284 of file closed_door_detector_alg_node.cpp.

void ClosedDoorDetectorAlgNode::image_color_callback ( const sensor_msgs::Image::ConstPtr &  msg) [private]

Definition at line 114 of file closed_door_detector_alg_node.cpp.

void ClosedDoorDetectorAlgNode::image_depth_callback ( const sensor_msgs::Image::ConstPtr &  msg) [private]
void ClosedDoorDetectorAlgNode::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< ClosedDoorDetectorAlgorithm >.

Definition at line 51 of file closed_door_detector_alg_node.cpp.

void ClosedDoorDetectorAlgNode::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< ClosedDoorDetectorAlgorithm >.

Definition at line 1216 of file closed_door_detector_alg_node.cpp.

void ClosedDoorDetectorAlgNode::points_callback ( const sensor_msgs::PointCloud2::ConstPtr &  msg) [private]

Definition at line 94 of file closed_door_detector_alg_node.cpp.


Member Data Documentation

Definition at line 102 of file closed_door_detector_alg_node.h.

Definition at line 133 of file closed_door_detector_alg_node.h.

Definition at line 147 of file closed_door_detector_alg_node.h.

Definition at line 121 of file closed_door_detector_alg_node.h.

Definition at line 175 of file closed_door_detector_alg_node.h.

Definition at line 176 of file closed_door_detector_alg_node.h.

Definition at line 177 of file closed_door_detector_alg_node.h.

Definition at line 178 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::b_c1 [private]

Definition at line 242 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::b_c2 [private]

Definition at line 243 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::b_c3 [private]

Definition at line 244 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::b_c4 [private]

Definition at line 245 of file closed_door_detector_alg_node.h.

Definition at line 240 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::b_handle [private]

Definition at line 241 of file closed_door_detector_alg_node.h.

Definition at line 211 of file closed_door_detector_alg_node.h.

Definition at line 212 of file closed_door_detector_alg_node.h.

Definition at line 213 of file closed_door_detector_alg_node.h.

cv::Scalar ClosedDoorDetectorAlgNode::black [private]

Definition at line 270 of file closed_door_detector_alg_node.h.

Definition at line 266 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::c1 [private]

Definition at line 222 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::c10 [private]

Definition at line 231 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::c11 [private]

Definition at line 232 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::c12 [private]

Definition at line 233 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::c2 [private]

Definition at line 223 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::c3 [private]

Definition at line 224 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::c4 [private]

Definition at line 225 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::c5 [private]

Definition at line 226 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::c6 [private]

Definition at line 227 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::c7 [private]

Definition at line 228 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::c8 [private]

Definition at line 229 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::c9 [private]

Definition at line 230 of file closed_door_detector_alg_node.h.

Definition at line 265 of file closed_door_detector_alg_node.h.

Definition at line 159 of file closed_door_detector_alg_node.h.

Definition at line 143 of file closed_door_detector_alg_node.h.

Definition at line 76 of file closed_door_detector_alg_node.h.

Definition at line 271 of file closed_door_detector_alg_node.h.

cv::Vec3b ClosedDoorDetectorAlgNode::color [private]

Definition at line 246 of file closed_door_detector_alg_node.h.

Definition at line 262 of file closed_door_detector_alg_node.h.

Definition at line 125 of file closed_door_detector_alg_node.h.

const double ClosedDoorDetectorAlgNode::cx_d = 3.3930780975300314e+02 [static, private]

Definition at line 202 of file closed_door_detector_alg_node.h.

Definition at line 128 of file closed_door_detector_alg_node.h.

Definition at line 127 of file closed_door_detector_alg_node.h.

const double ClosedDoorDetectorAlgNode::cy_d = 2.4273913761751615e+02 [static, private]

Definition at line 203 of file closed_door_detector_alg_node.h.

Definition at line 130 of file closed_door_detector_alg_node.h.

Definition at line 129 of file closed_door_detector_alg_node.h.

Definition at line 218 of file closed_door_detector_alg_node.h.

Definition at line 112 of file closed_door_detector_alg_node.h.

Definition at line 264 of file closed_door_detector_alg_node.h.

Definition at line 217 of file closed_door_detector_alg_node.h.

Definition at line 82 of file closed_door_detector_alg_node.h.

Definition at line 80 of file closed_door_detector_alg_node.h.

std_msgs::Int32MultiArray ClosedDoorDetectorAlgNode::door_coordinates [private]

Definition at line 263 of file closed_door_detector_alg_node.h.

Definition at line 74 of file closed_door_detector_alg_node.h.

Definition at line 166 of file closed_door_detector_alg_node.h.

Definition at line 167 of file closed_door_detector_alg_node.h.

Definition at line 114 of file closed_door_detector_alg_node.h.

Definition at line 181 of file closed_door_detector_alg_node.h.

Definition at line 189 of file closed_door_detector_alg_node.h.

Definition at line 182 of file closed_door_detector_alg_node.h.

Definition at line 190 of file closed_door_detector_alg_node.h.

Definition at line 191 of file closed_door_detector_alg_node.h.

Definition at line 188 of file closed_door_detector_alg_node.h.

Definition at line 183 of file closed_door_detector_alg_node.h.

Definition at line 179 of file closed_door_detector_alg_node.h.

Definition at line 180 of file closed_door_detector_alg_node.h.

Definition at line 135 of file closed_door_detector_alg_node.h.

Definition at line 136 of file closed_door_detector_alg_node.h.

Definition at line 137 of file closed_door_detector_alg_node.h.

Definition at line 138 of file closed_door_detector_alg_node.h.

Definition at line 146 of file closed_door_detector_alg_node.h.

Definition at line 126 of file closed_door_detector_alg_node.h.

const double ClosedDoorDetectorAlgNode::fx_d = 1.0 / 5.9421434211923247e+02 [static, private]

Definition at line 200 of file closed_door_detector_alg_node.h.

const double ClosedDoorDetectorAlgNode::fy_d = 1.0 / 5.9104053696870778e+02 [static, private]

Definition at line 201 of file closed_door_detector_alg_node.h.

Definition at line 120 of file closed_door_detector_alg_node.h.

Definition at line 149 of file closed_door_detector_alg_node.h.

Definition at line 268 of file closed_door_detector_alg_node.h.

Definition at line 199 of file closed_door_detector_alg_node.h.

Definition at line 110 of file closed_door_detector_alg_node.h.

Definition at line 111 of file closed_door_detector_alg_node.h.

Definition at line 210 of file closed_door_detector_alg_node.h.

Definition at line 163 of file closed_door_detector_alg_node.h.

Definition at line 165 of file closed_door_detector_alg_node.h.

Definition at line 162 of file closed_door_detector_alg_node.h.

Definition at line 164 of file closed_door_detector_alg_node.h.

Definition at line 109 of file closed_door_detector_alg_node.h.

Definition at line 160 of file closed_door_detector_alg_node.h.

Definition at line 161 of file closed_door_detector_alg_node.h.

Definition at line 152 of file closed_door_detector_alg_node.h.

Definition at line 151 of file closed_door_detector_alg_node.h.

Definition at line 144 of file closed_door_detector_alg_node.h.

Definition at line 219 of file closed_door_detector_alg_node.h.

Definition at line 91 of file closed_door_detector_alg_node.h.

Definition at line 89 of file closed_door_detector_alg_node.h.

Definition at line 85 of file closed_door_detector_alg_node.h.

Definition at line 83 of file closed_door_detector_alg_node.h.

std_msgs::Int32MultiArray ClosedDoorDetectorAlgNode::Int32MultiArray_msg_ [private]

Definition at line 77 of file closed_door_detector_alg_node.h.

Definition at line 154 of file closed_door_detector_alg_node.h.

Definition at line 153 of file closed_door_detector_alg_node.h.

Definition at line 157 of file closed_door_detector_alg_node.h.

Definition at line 171 of file closed_door_detector_alg_node.h.

Definition at line 172 of file closed_door_detector_alg_node.h.

Definition at line 173 of file closed_door_detector_alg_node.h.

Definition at line 174 of file closed_door_detector_alg_node.h.

Definition at line 108 of file closed_door_detector_alg_node.h.

Definition at line 106 of file closed_door_detector_alg_node.h.

Definition at line 187 of file closed_door_detector_alg_node.h.

Definition at line 186 of file closed_door_detector_alg_node.h.

const double ClosedDoorDetectorAlgNode::max_range = 5.5 [static, private]

Definition at line 205 of file closed_door_detector_alg_node.h.

Definition at line 209 of file closed_door_detector_alg_node.h.

Definition at line 107 of file closed_door_detector_alg_node.h.

Definition at line 105 of file closed_door_detector_alg_node.h.

Definition at line 184 of file closed_door_detector_alg_node.h.

Definition at line 185 of file closed_door_detector_alg_node.h.

const double ClosedDoorDetectorAlgNode::min_range = 0.5 [static, private]

Definition at line 204 of file closed_door_detector_alg_node.h.

Definition at line 113 of file closed_door_detector_alg_node.h.

Definition at line 142 of file closed_door_detector_alg_node.h.

Definition at line 139 of file closed_door_detector_alg_node.h.

Definition at line 140 of file closed_door_detector_alg_node.h.

Definition at line 141 of file closed_door_detector_alg_node.h.

Definition at line 273 of file closed_door_detector_alg_node.h.

Definition at line 267 of file closed_door_detector_alg_node.h.

Definition at line 247 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::p_left [private]

Definition at line 220 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::p_up [private]

Definition at line 221 of file closed_door_detector_alg_node.h.

Definition at line 119 of file closed_door_detector_alg_node.h.

Definition at line 148 of file closed_door_detector_alg_node.h.

Definition at line 134 of file closed_door_detector_alg_node.h.

pcl::PointXYZ ClosedDoorDetectorAlgNode::point3D [private]

Definition at line 272 of file closed_door_detector_alg_node.h.

Definition at line 88 of file closed_door_detector_alg_node.h.

Definition at line 86 of file closed_door_detector_alg_node.h.

geometry_msgs::PoseStamped ClosedDoorDetectorAlgNode::PoseStamped_msg_ [private]

Definition at line 75 of file closed_door_detector_alg_node.h.

double ClosedDoorDetectorAlgNode::r [private]

Definition at line 197 of file closed_door_detector_alg_node.h.

Definition at line 118 of file closed_door_detector_alg_node.h.

Definition at line 145 of file closed_door_detector_alg_node.h.

cv::RNG ClosedDoorDetectorAlgNode::rng [private]

Definition at line 248 of file closed_door_detector_alg_node.h.

Definition at line 131 of file closed_door_detector_alg_node.h.

Definition at line 132 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::s_c1 [private]

Definition at line 236 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::s_c2 [private]

Definition at line 237 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::s_c3 [private]

Definition at line 238 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::s_c4 [private]

Definition at line 239 of file closed_door_detector_alg_node.h.

Definition at line 234 of file closed_door_detector_alg_node.h.

cv::Point2d ClosedDoorDetectorAlgNode::s_handle [private]

Definition at line 235 of file closed_door_detector_alg_node.h.

Definition at line 103 of file closed_door_detector_alg_node.h.

Definition at line 104 of file closed_door_detector_alg_node.h.

Definition at line 155 of file closed_door_detector_alg_node.h.

Definition at line 117 of file closed_door_detector_alg_node.h.

Definition at line 115 of file closed_door_detector_alg_node.h.

Definition at line 150 of file closed_door_detector_alg_node.h.

Definition at line 122 of file closed_door_detector_alg_node.h.

Definition at line 258 of file closed_door_detector_alg_node.h.

Definition at line 259 of file closed_door_detector_alg_node.h.

Definition at line 260 of file closed_door_detector_alg_node.h.

Definition at line 261 of file closed_door_detector_alg_node.h.

Definition at line 256 of file closed_door_detector_alg_node.h.

Definition at line 257 of file closed_door_detector_alg_node.h.

Definition at line 249 of file closed_door_detector_alg_node.h.

Definition at line 250 of file closed_door_detector_alg_node.h.

Definition at line 251 of file closed_door_detector_alg_node.h.

Definition at line 156 of file closed_door_detector_alg_node.h.

Definition at line 169 of file closed_door_detector_alg_node.h.

Definition at line 170 of file closed_door_detector_alg_node.h.

Definition at line 168 of file closed_door_detector_alg_node.h.

Definition at line 116 of file closed_door_detector_alg_node.h.

Definition at line 192 of file closed_door_detector_alg_node.h.

Definition at line 193 of file closed_door_detector_alg_node.h.

Definition at line 194 of file closed_door_detector_alg_node.h.

Definition at line 195 of file closed_door_detector_alg_node.h.

Definition at line 196 of file closed_door_detector_alg_node.h.

Definition at line 158 of file closed_door_detector_alg_node.h.

Definition at line 198 of file closed_door_detector_alg_node.h.

Definition at line 253 of file closed_door_detector_alg_node.h.

Definition at line 254 of file closed_door_detector_alg_node.h.

Definition at line 255 of file closed_door_detector_alg_node.h.

Definition at line 252 of file closed_door_detector_alg_node.h.

cv::Scalar ClosedDoorDetectorAlgNode::white [private]

Definition at line 269 of file closed_door_detector_alg_node.h.

Definition at line 214 of file closed_door_detector_alg_node.h.

Definition at line 206 of file closed_door_detector_alg_node.h.

Definition at line 215 of file closed_door_detector_alg_node.h.

Definition at line 207 of file closed_door_detector_alg_node.h.

Definition at line 216 of file closed_door_detector_alg_node.h.

Definition at line 208 of file closed_door_detector_alg_node.h.


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


iri_door_detector
Author(s): Jose Rodriguez
autogenerated on Fri Dec 6 2013 23:57:17