plane_road_extraction.h
Go to the documentation of this file.
1 /**************************************************************************************************
2  Software License Agreement (BSD License)
3 
4  Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt
5  All rights reserved.
6 
7  Redistribution and use in source and binary forms, with or without modification, are permitted
8  provided that the following conditions are met:
9 
10  *Redistributions of source code must retain the above copyright notice, this list of
11  conditions and the following disclaimer.
12  *Redistributions in binary form must reproduce the above copyright notice, this list of
13  conditions and the following disclaimer in the documentation and/or other materials provided
14  with the distribution.
15  *Neither the name of the University of Aveiro nor the names of its contributors may be used to
16  endorse or promote products derived from this software without specific prior written permission.
17 
18  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
19  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
21  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24  IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 ***************************************************************************************************/
32 #ifndef _PLANE_ROAD_EXTRACTION_H_
33 #define _PLANE_ROAD_EXTRACTION_H_
34 
35 // ROS includes.
36 #include <ros/ros.h>
37 #include <sensor_msgs/PointCloud2.h>
38 #include <tf/transform_listener.h>
39 #include <pcl_ros/transforms.h>
40 
41 // PCL includes
42 #include <pcl/point_types.h>
43 #include <pcl/conversions.h>
44 #include <pcl/surface/convex_hull.h>
45 
46 // LAR includes
47 #include <points_from_volume/points_from_volume.h>
48 #include <plane_model_road_segmentation/plane_model_road_segmentation.h>
49 
50 using namespace std;
51 using namespace pcl;
52 
53 template<class T>
55 {
56 public:
57 
60  {
61  };
62 
65  {
66  };
67 
68  // VARIABLES
69 
71  PointCloud<T> pc_in;
72 
74  PointCloud<T> pc_road;
75 
77  PointCloud<T> pc_clusters;
78 
80  plane_model_road<T> pms;
81 
83  ros::Publisher * pub_road_ptr;
84 
86  ros::Publisher * pub_clusters_ptr;
87 
89  ros::Publisher * pub_road_perimeter_ptr;
90 
92  double z_min,z_max;
93 
94  // FUNCTIONS
95 
97  void filter (const sensor_msgs::PointCloud2Ptr& msg);
98 
106  PointCloud<T> project_cloud_on_plane(PointCloud<T> cloud_in, ModelCoefficients::Ptr coefficients);
107 
116  T transform_pcl_point(string frame1, tf::Transform transform, T pt_origin);
117 
118 };
119 
120 #include "plane_road_extraction.hpp"
121 
122 #endif
ros::Publisher * pub_road_ptr
Pointer to road publisher.
PointCloud< T > pc_clusters
Clusters point cloud.
plane_road_extraction()
class constructor
~plane_road_extraction()
class destructor
plane_model_road< T > pms
Class object for plane model road segmentation.
ros::Publisher * pub_road_perimeter_ptr
Pointer to road perimeter publisher.
plane_road_extraction class implementation
ros::Publisher * pub_clusters_ptr
Pointer to clusters publisher.
PointCloud< T > pc_road
Road point cloud.
double z_min
Extraction limits to pointcloud.


pointcloud_segmentation
Author(s): Tiago Talhada
autogenerated on Mon Mar 2 2015 01:32:39