27 #ifndef _NAVIGABILITY_MAP_H_
28 #define _NAVIGABILITY_MAP_H_
40 #include <sensor_msgs/PointCloud2.h>
41 #include <boost/shared_ptr.hpp>
50 #include <pcl_ros/transforms.h>
51 #include <pcl/conversions.h>
52 #include <pcl/point_cloud.h>
53 #include <pcl/point_types.h>
54 #include <pcl/features/normal_3d.h>
55 #include <pcl/kdtree/kdtree_flann.h>
56 #include <pcl/io/pcd_io.h>
57 #include <pcl/surface/gp3.h>
58 #include <pcl/filters/passthrough.h>
61 #include <visualization_msgs/Marker.h>
62 #include <visualization_msgs/MarkerArray.h>
64 #include <colormap/colormap.h>
71 using namespace Eigen;
179 angleX_accessibility=0;
180 angleY_accessibility=0;
181 angleZ_accessibility=0;
183 total_accessibility=0;
185 interpolate_z_data=
false;
186 interpolate_normal_data=
false;
190 angle_confidence_x=0;
191 angle_confidence_y=0;
192 angle_confidence_z=0;
209 typedef Matrix<grid_nodePtr, Dynamic, Dynamic>
Grid;
324 debug_accessibility=1;
325 default_confidence=0.5;
326 fator_confidence_neighbour_limit=1.5;
328 Zmax_heigh_difference=0.1;
329 Standard_Deviation_max=0.2;
331 angleX_max_difference=0.1;
332 angleY_max_difference=0.1;
333 angleZ_max_difference=0.1;
334 Standard_Deviation_anglex_max_confidence=0.2;
335 Standard_Deviation_angley_max_confidence=0.2;
336 Standard_Deviation_anglez_max_confidence=0.2;
338 Radius_neighbors=0.4;
364 void Filter_PointCloud(pcl::PointCloud<pcl::PointXYZ>::Ptr &cloud_in,pcl::PointCloud<pcl::PointXYZ>::Ptr &
pc_filter);
370 void Normal_Estimation(pcl::PointCloud<pcl::PointXYZ>::Ptr &cloud);
376 void inicialize_grid(
void);
385 void setGrid_parameter(
double max_Xval,
double max_Yval);
393 void setGrid_data(pcl::PointCloud<pcl::PointXYZ>& cloud);
400 void calcGrid_data(
void);
406 void fill_data_cells(
void);
418 std::vector<grid_nodePtr> cell_neighbours(
int row_pos,
int col_pos,
int &empty_neighbours,
int &number_neighbours);
424 void set_Cells_accessibility(
void);
430 void polygon_groundtruth(
void);
431 void getCell_inpolygon(
void);
432 void dataCell_inpolygon(
void);
int debug_accessibility
Which accessibility map should be draw.
pcl::PointCloud< pcl::Normal >::Ptr normals
PointCloud that contains the normals.
std::vector< geometry_msgs::Point > obstacle_points
int Use_Radius_Search
1 - to use the radius search ; 0 - to use the number of neighbours search
double Ymin_filter
Min distance to be consider in the Y direction of the PointCloud.
double Sx
The X dimension of the cell.
pcl::PointCloud< pcl::PointXYZ >::Ptr pc_filter(new pcl::PointCloud< pcl::PointXYZ >)
double Standard_Deviation_anglez_max_confidence
Normalization constant for the Angle Z confidence value.
MatrixXd Matrix_Cell_inpolygon_rowcol
double angleZ_accessibility
Angle Z accessibility.
std::vector< cv::Point2f > obstacle_polygon
std::vector< double > angleZ_confidence_neighbours
Vector that contais the Angle Z confidence between neighbours to get the accessibility.
std::vector< double > angleY_confidence_neighbours
Vector that contais the Angle Y confidence between neighbours to get the accessibility.
double angleX_max_difference
Threshold for the Angle X difference between cells.
double med_angle_Y
Mean value of the angle Y of the normal in a node.
MatrixXd Matrix_Points
Matrix with points (X,Y,Z) in a node.
double Xmax_filter
Max distance to be consider in the X direction of the PointCloud.
double angleZ_max_difference
Threshold for the Angle Z difference between cells.
std::vector< double > angleY_difference_neighbours
Vector that contais the Angle Y difference between neighbours to get the accessibility.
double Standard_Deviation_max
Normalization constant for the Z confidence value.
double Z_confidence
Z confidence in a node.
double Zmax_heigh_difference
Threshold for the Z difference between cells.
double angle_confidence_y
Angle Y confidence in a node.
double Sy
The Y dimension of the cell.
Matrix< grid_nodePtr, Dynamic, Dynamic > Grid
std::vector< geometry_msgs::Point > polygon_points
double med_angle_Z
Mean value of the angle Z of the normal in a node.
std::vector< bool > has_fulldata_direction
Vector that contais a boolean value if a neighbour contains all data to get the accessibility.
double Radius_neighbors
The radius of the neighbours search to estimate the normals in the PointCloud.
double med_angle_X
Mean value of the angle X of the normal in a node.
int total_col
Total cols of the grid.
double Standard_Deviation_anglex_max_confidence
Normalization constant for the Angle X confidence value.
double total_accessibility
Total accessibility.
double default_confidence
Default confidence for a cell with one point.
double angle_confidence_z
Angle Z confidence in a node.
bool has_normal
If a node has at least one point with normal.
std::vector< cv::Point2f > xy_polygon
double Zmin_filter
Max distance to be consider in the Z direction of the PointCloud.
double Zmed
Z mean value in a node.
double Standard_Deviation_angley_max_confidence
Normalization constant for the Angle Y confidence value.
Grid grid
The two-dimensional grid with the cells.
int K_neighbors
The number of neighbours search to estimate the normals in the PointCloud.
std::vector< double > z_difference_neighbours
Vector that contais the Z difference between neighbours to get the accessibility. ...
std::vector< double > angleX_confidence_neighbours
Vector that contais the Angle X confidence between neighbours to get the accessibility.
double Ymax_filter
Max distance to be consider in the Y direction of the PointCloud.
double Standard_Deviation_Z
Standard Deviation in Z.
double Zmax_filter
Min distance to be consider in the Z direction of the PointCloud.
MatrixXd Matrix_obstacle_inpolygon_rowcol
double angleX_accessibility
Angle X accessibility.
std::vector< double > angleZ_difference_neighbours
Vector that contais the Angle Z difference between neighbours to get the accessibility.
double angleY_accessibility
Angle Y accessibility.
double angleY_max_difference
Threshold for the Angle Y difference between cells.
bool interpolate_normal_data
true if that cell cointains normal data interpolated from the neighbours, false it contains data from...
boost::shared_ptr< grid_node > grid_nodePtr
std::vector< double > angleX_difference_neighbours
Vector that contais the Angle X difference between neighbours to get the accessibility.
double Xmin_filter
Min distance to be consider in the X direction of the PointCloud.
MatrixXd Angles
Matrix with angles for each normal of a point in a node.
bool interpolate_z_data
true if a cell cointains Z data interpolated from the neighbours, false it contains data from the ori...
int CARaxis_col
Center col of the grid.
double z_accessibility
Z accessibility.
std::vector< double > z_confidence_neighbours
Vector that contais the Z confidence between neighbours to get the accessibility. ...
double angle_confidence_x
Angle X confidence in a node.
int total_row
Total rows of the grid.
int num_points
Number of points projected in a node (cell)
double fator_confidence_neighbour_limit
Limit of the max difference between a cell and a neighbour cell.
int colorrange
Color to represent the maps.