40 #ifndef PCL_SEGMENTATION_GROUND_PLANE_COMPARATOR_H_
41 #define PCL_SEGMENTATION_GROUND_PLANE_COMPARATOR_H_
43 #include <pcl/common/angles.h>
44 #include <pcl/segmentation/comparator.h>
45 #include <boost/make_shared.hpp>
54 template<
typename Po
intT,
typename Po
intNT>
65 typedef boost::shared_ptr<GroundPlaneComparator<PointT, PointNT> >
Ptr;
66 typedef boost::shared_ptr<const GroundPlaneComparator<PointT, PointNT> >
ConstPtr;
122 inline PointCloudNConstPtr
143 plane_coeff_d_ = boost::make_shared<std::vector<float> >(plane_coeff_d);
147 const std::vector<float>&
194 bool depth_dependent =
false)
220 Eigen::Vector3f vec =
input_->points[idx1].getVector3fMap ();
246 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
250 #endif // PCL_SEGMENTATION_GROUND_PLANE_COMPARATOR_H_
boost::shared_ptr< std::vector< float > > plane_coeff_d_
PointCloud::ConstPtr PointCloudConstPtr
boost::shared_ptr< PointCloud< PointNT > > Ptr
float deg2rad(float alpha)
Convert an angle from degrees to radians.
void setInputNormals(const PointCloudNConstPtr &normals)
Provide a pointer to the input normals.
virtual bool compare(int idx1, int idx2) const
Compare points at two indices by their plane equations.
virtual void setAngularThreshold(float angular_threshold)
Set the tolerance in radians for difference in normal direction between neighboring points...
GroundPlaneComparator is a Comparator for detecting smooth surfaces suitable for driving.
This file defines compatibility wrappers for low level I/O functions.
PointCloudN::Ptr PointCloudNPtr
GroundPlaneComparator(boost::shared_ptr< std::vector< float > > &plane_coeff_d)
Constructor for GroundPlaneComparator.
virtual void setInputCloud(const PointCloudConstPtr &cloud)
Provide the input cloud.
PointCloudNConstPtr normals_
PointCloudN::ConstPtr PointCloudNConstPtr
float getAngularThreshold() const
Get the angular threshold in radians for difference in normal direction between neighboring points...
Comparator is the base class for comparators that compare two points given some function.
boost::shared_ptr< const PointCloud< PointNT > > ConstPtr
boost::shared_ptr< const GroundPlaneComparator< PointT, PointNT > > ConstPtr
void setPlaneCoeffD(std::vector< float > &plane_coeff_d)
Provide a pointer to a vector of the d-coefficient of the planes' hessian normal form.
void setDistanceThreshold(float distance_threshold, bool depth_dependent=false)
Set the tolerance in meters for difference in perpendicular distance (d component of plane equation) ...
float road_angular_threshold_
void setPlaneCoeffD(boost::shared_ptr< std::vector< float > > &plane_coeff_d)
Provide a pointer to a vector of the d-coefficient of the planes' hessian normal form.
PointCloudNConstPtr getInputNormals() const
Get the input normals.
float distance_threshold_
PointCloud represents the base class in PCL for storing collections of 3D points. ...
void setExpectedGroundNormal(Eigen::Vector3f normal)
Set the expected ground plane normal with respect to the sensor.
const std::vector< float > & getPlaneCoeffD() const
Get a pointer to the vector of the d-coefficient of the planes' hessian normal form.
pcl::PointCloud< PointNT > PointCloudN
GroundPlaneComparator()
Empty constructor for GroundPlaneComparator.
virtual void setGroundAngularThreshold(float angular_threshold)
Set the tolerance in radians for difference in normal direction between a point and the expected grou...
PointCloudConstPtr input_
boost::shared_ptr< GroundPlaneComparator< PointT, PointNT > > Ptr
Comparator< PointT >::PointCloud PointCloud
float getDistanceThreshold() const
Get the distance threshold in meters (d component of plane equation) between neighboring points...
virtual ~GroundPlaneComparator()
Destructor for GroundPlaneComparator.
Comparator< PointT >::PointCloudConstPtr PointCloudConstPtr
Eigen::Vector3f desired_road_axis_