Main Page
Classes
Files
File List
File Members
src
perception
pointcloud_segmentation
include
pointcloud_segmentation
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>
54
class
plane_road_extraction
55
{
56
public
:
57
59
plane_road_extraction
()
60
{
61
};
62
64
~plane_road_extraction
()
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
plane_road_extraction::pub_road_ptr
ros::Publisher * pub_road_ptr
Pointer to road publisher.
Definition:
plane_road_extraction.h:83
plane_road_extraction::pc_clusters
PointCloud< T > pc_clusters
Clusters point cloud.
Definition:
plane_road_extraction.h:77
plane_road_extraction::plane_road_extraction
plane_road_extraction()
class constructor
Definition:
plane_road_extraction.h:59
plane_road_extraction::~plane_road_extraction
~plane_road_extraction()
class destructor
Definition:
plane_road_extraction.h:64
plane_road_extraction::pms
plane_model_road< T > pms
Class object for plane model road segmentation.
Definition:
plane_road_extraction.h:80
plane_road_extraction
Definition:
plane_road_extraction.h:54
plane_road_extraction::pub_road_perimeter_ptr
ros::Publisher * pub_road_perimeter_ptr
Pointer to road perimeter publisher.
Definition:
plane_road_extraction.h:89
plane_road_extraction.hpp
plane_road_extraction class implementation
plane_road_extraction::pub_clusters_ptr
ros::Publisher * pub_clusters_ptr
Pointer to clusters publisher.
Definition:
plane_road_extraction.h:86
plane_road_extraction::pc_road
PointCloud< T > pc_road
Road point cloud.
Definition:
plane_road_extraction.h:74
plane_road_extraction::z_min
double z_min
Extraction limits to pointcloud.
Definition:
plane_road_extraction.h:92
pointcloud_segmentation
Author(s): Tiago Talhada
autogenerated on Mon Mar 2 2015 01:32:39