|
Point Cloud Library (PCL) 1.15.1
|
GroundPlaneComparator is a Comparator for detecting smooth surfaces suitable for driving. More...
#include <pcl/segmentation/ground_plane_comparator.h>
Public Types | |
| using | PointCloud = typename Comparator<PointT>::PointCloud |
| using | PointCloudConstPtr = typename Comparator<PointT>::PointCloudConstPtr |
| using | PointCloudN = pcl::PointCloud<PointNT> |
| using | PointCloudNPtr = typename PointCloudN::Ptr |
| using | PointCloudNConstPtr = typename PointCloudN::ConstPtr |
| using | Ptr = shared_ptr<GroundPlaneComparator<PointT, PointNT> > |
| using | ConstPtr = shared_ptr<const GroundPlaneComparator<PointT, PointNT> > |
| Public Types inherited from pcl::Comparator< PointT > | |
| using | PointCloud = pcl::PointCloud<PointT> |
| using | PointCloudPtr = typename PointCloud::Ptr |
| using | PointCloudConstPtr = typename PointCloud::ConstPtr |
| using | Ptr = shared_ptr<Comparator<PointT> > |
| using | ConstPtr = shared_ptr<const Comparator<PointT> > |
Public Member Functions | |
| GroundPlaneComparator () | |
| Empty constructor for GroundPlaneComparator. | |
| GroundPlaneComparator (shared_ptr< std::vector< float > > &plane_coeff_d) | |
| Constructor for GroundPlaneComparator. | |
| ~GroundPlaneComparator () override=default | |
| Destructor for GroundPlaneComparator. | |
| void | setInputCloud (const PointCloudConstPtr &cloud) override |
| Provide the input cloud. | |
| void | setInputNormals (const PointCloudNConstPtr &normals) |
| Provide a pointer to the input normals. | |
| PointCloudNConstPtr | getInputNormals () const |
| Get the input normals. | |
| void | setPlaneCoeffD (shared_ptr< std::vector< float > > &plane_coeff_d) |
| Provide a pointer to a vector of the d-coefficient of the planes' hessian normal form. | |
| void | setPlaneCoeffD (std::vector< float > &plane_coeff_d) |
| Provide a pointer to a vector of the d-coefficient of the planes' hessian normal form. | |
| const std::vector< float > & | getPlaneCoeffD () const |
| Get a pointer to the vector of the d-coefficient of the planes' hessian normal form. | |
| virtual void | setAngularThreshold (float angular_threshold) |
| Set the tolerance in radians for difference in normal direction between neighboring points, to be considered part of the same plane. | |
| virtual void | setGroundAngularThreshold (float angular_threshold) |
| Set the tolerance in radians for difference in normal direction between a point and the expected ground normal. | |
| void | setExpectedGroundNormal (Eigen::Vector3f normal) |
| Set the expected ground plane normal with respect to the sensor. | |
| float | getAngularThreshold () const |
| Get the angular threshold in radians for difference in normal direction between neighboring points, to be considered part of the same plane. | |
| void | setDistanceThreshold (float distance_threshold, bool depth_dependent=false) |
| Set the tolerance in meters for difference in perpendicular distance (d component of plane equation) to the plane between neighboring points, to be considered part of the same plane. | |
| float | getDistanceThreshold () const |
| Get the distance threshold in meters (d component of plane equation) between neighboring points, to be considered part of the same plane. | |
| bool | compare (int idx1, int idx2) const override |
| Compare points at two indices by their plane equations. | |
| Public Member Functions inherited from pcl::Comparator< PointT > | |
| Comparator () | |
| Empty constructor for comparator. | |
| virtual | ~Comparator ()=default |
| Empty destructor for comparator. | |
| virtual PointCloudConstPtr | getInputCloud () const |
| Get the input cloud this comparator operates on. | |
Protected Attributes | |
| PointCloudNConstPtr | normals_ |
| shared_ptr< std::vector< float > > | plane_coeff_d_ |
| float | angular_threshold_ |
| float | road_angular_threshold_ |
| float | distance_threshold_ |
| bool | depth_dependent_ |
| Eigen::Vector3f | z_axis_ |
| Eigen::Vector3f | desired_road_axis_ |
| Protected Attributes inherited from pcl::Comparator< PointT > | |
| PointCloudConstPtr | input_ |
GroundPlaneComparator is a Comparator for detecting smooth surfaces suitable for driving.
In conjunction with OrganizedConnectedComponentSegmentation, this allows smooth groundplanes / road surfaces to be segmented from point clouds.
Definition at line 56 of file ground_plane_comparator.h.
| using pcl::GroundPlaneComparator< PointT, PointNT >::ConstPtr = shared_ptr<const GroundPlaneComparator<PointT, PointNT> > |
Definition at line 67 of file ground_plane_comparator.h.
| using pcl::GroundPlaneComparator< PointT, PointNT >::PointCloud = typename Comparator<PointT>::PointCloud |
Definition at line 59 of file ground_plane_comparator.h.
| using pcl::GroundPlaneComparator< PointT, PointNT >::PointCloudConstPtr = typename Comparator<PointT>::PointCloudConstPtr |
Definition at line 60 of file ground_plane_comparator.h.
| using pcl::GroundPlaneComparator< PointT, PointNT >::PointCloudN = pcl::PointCloud<PointNT> |
Definition at line 62 of file ground_plane_comparator.h.
| using pcl::GroundPlaneComparator< PointT, PointNT >::PointCloudNConstPtr = typename PointCloudN::ConstPtr |
Definition at line 64 of file ground_plane_comparator.h.
| using pcl::GroundPlaneComparator< PointT, PointNT >::PointCloudNPtr = typename PointCloudN::Ptr |
Definition at line 63 of file ground_plane_comparator.h.
| using pcl::GroundPlaneComparator< PointT, PointNT >::Ptr = shared_ptr<GroundPlaneComparator<PointT, PointNT> > |
Definition at line 66 of file ground_plane_comparator.h.
|
inline |
Empty constructor for GroundPlaneComparator.
Definition at line 72 of file ground_plane_comparator.h.
References angular_threshold_, pcl::deg2rad(), depth_dependent_, desired_road_axis_, distance_threshold_, normals_, road_angular_threshold_, and z_axis_.
|
inline |
Constructor for GroundPlaneComparator.
| [in] | plane_coeff_d | a reference to a vector of d coefficients of plane equations. Must be the same size as the input cloud and input normals. a, b, and c coefficients are in the input normals. |
Definition at line 86 of file ground_plane_comparator.h.
References angular_threshold_, pcl::deg2rad(), depth_dependent_, desired_road_axis_, distance_threshold_, normals_, plane_coeff_d_, road_angular_threshold_, and z_axis_.
|
overridedefault |
Destructor for GroundPlaneComparator.
|
inlineoverridevirtual |
Compare points at two indices by their plane equations.
True if the angle between the normals is less than the angular threshold, and the difference between the d component of the normals is less than distance threshold, else false
| idx1 | The first index for the comparison |
| idx2 | The second index for the comparison |
Implements pcl::Comparator< PointT >.
Definition at line 212 of file ground_plane_comparator.h.
References angular_threshold_, desired_road_axis_, normals_, and road_angular_threshold_.
|
inline |
Get the angular threshold in radians for difference in normal direction between neighboring points, to be considered part of the same plane.
Definition at line 182 of file ground_plane_comparator.h.
References angular_threshold_.
|
inline |
Get the distance threshold in meters (d component of plane equation) between neighboring points, to be considered part of the same plane.
Definition at line 201 of file ground_plane_comparator.h.
References distance_threshold_.
|
inline |
Get the input normals.
Definition at line 122 of file ground_plane_comparator.h.
References normals_.
|
inline |
Get a pointer to the vector of the d-coefficient of the planes' hessian normal form.
Definition at line 147 of file ground_plane_comparator.h.
References plane_coeff_d_.
|
inlinevirtual |
Set the tolerance in radians for difference in normal direction between neighboring points, to be considered part of the same plane.
| [in] | angular_threshold | the tolerance in radians |
Definition at line 156 of file ground_plane_comparator.h.
References angular_threshold_.
|
inline |
Set the tolerance in meters for difference in perpendicular distance (d component of plane equation) to the plane between neighboring points, to be considered part of the same plane.
| [in] | distance_threshold | the tolerance in meters (at 1m) |
| [in] | depth_dependent | whether to scale the threshold based on range from the sensor (default: false) |
Definition at line 192 of file ground_plane_comparator.h.
References depth_dependent_, and distance_threshold_.
|
inline |
Set the expected ground plane normal with respect to the sensor.
Pixels labeled as ground must be within ground_angular_threshold radians of this normal to be labeled as ground.
| [in] | normal | The normal direction of the expected ground plane. |
Definition at line 174 of file ground_plane_comparator.h.
References desired_road_axis_.
|
inlinevirtual |
Set the tolerance in radians for difference in normal direction between a point and the expected ground normal.
| [in] | angular_threshold | the |
Definition at line 165 of file ground_plane_comparator.h.
References road_angular_threshold_.
|
inlineoverridevirtual |
Provide the input cloud.
| [in] | cloud | the input point cloud. |
Reimplemented from pcl::Comparator< PointT >.
Definition at line 106 of file ground_plane_comparator.h.
References pcl::Comparator< PointT >::input_.
|
inline |
Provide a pointer to the input normals.
| [in] | normals | the input normal cloud. |
Definition at line 115 of file ground_plane_comparator.h.
References normals_.
|
inline |
Provide a pointer to a vector of the d-coefficient of the planes' hessian normal form.
a, b, and c are provided by the normal cloud.
| [in] | plane_coeff_d | a pointer to the plane coefficients. |
Definition at line 131 of file ground_plane_comparator.h.
References plane_coeff_d_.
|
inline |
Provide a pointer to a vector of the d-coefficient of the planes' hessian normal form.
a, b, and c are provided by the normal cloud.
| [in] | plane_coeff_d | a pointer to the plane coefficients. |
Definition at line 140 of file ground_plane_comparator.h.
References pcl::make_shared(), and plane_coeff_d_.
|
protected |
Definition at line 238 of file ground_plane_comparator.h.
Referenced by compare(), getAngularThreshold(), GroundPlaneComparator(), GroundPlaneComparator(), and setAngularThreshold().
|
protected |
Definition at line 241 of file ground_plane_comparator.h.
Referenced by GroundPlaneComparator(), GroundPlaneComparator(), and setDistanceThreshold().
|
protected |
Definition at line 243 of file ground_plane_comparator.h.
Referenced by compare(), GroundPlaneComparator(), GroundPlaneComparator(), and setExpectedGroundNormal().
|
protected |
Definition at line 240 of file ground_plane_comparator.h.
Referenced by getDistanceThreshold(), GroundPlaneComparator(), GroundPlaneComparator(), and setDistanceThreshold().
|
protected |
Definition at line 236 of file ground_plane_comparator.h.
Referenced by compare(), getInputNormals(), GroundPlaneComparator(), GroundPlaneComparator(), and setInputNormals().
|
protected |
Definition at line 237 of file ground_plane_comparator.h.
Referenced by getPlaneCoeffD(), GroundPlaneComparator(), setPlaneCoeffD(), and setPlaneCoeffD().
|
protected |
Definition at line 239 of file ground_plane_comparator.h.
Referenced by compare(), GroundPlaneComparator(), GroundPlaneComparator(), and setGroundAngularThreshold().
|
protected |
Definition at line 242 of file ground_plane_comparator.h.
Referenced by GroundPlaneComparator(), and GroundPlaneComparator().