Grid based representation of planar region. More...
#include <grid_plane.h>
Public Types | |
typedef boost::tuple< int, int > | IndexPair |
typedef std::set< IndexPair > | IndexPairSet |
typedef boost::shared_ptr< GridPlane > | Ptr |
Public Member Functions | |
virtual void | addIndexPair (IndexPair pair) |
Add IndexPair to this instance. More... | |
virtual GridPlane::Ptr | clone () |
virtual GridPlane::Ptr | dilate (int num) |
Dilate grid cells with specified number of pixels. More... | |
virtual GridPlane::Ptr | erode (int num) |
Erode grid cells with specified number of pixels. More... | |
virtual void | fillCellsFromCube (Cube &cube) |
virtual size_t | fillCellsFromPointCloud (pcl::PointCloud< pcl::PointNormal >::Ptr &cloud, double distance_threshold) |
virtual size_t | fillCellsFromPointCloud (pcl::PointCloud< pcl::PointNormal >::Ptr &cloud, double distance_threshold, std::set< int > &non_plane_indices) |
virtual size_t | fillCellsFromPointCloud (pcl::PointCloud< pcl::PointNormal >::Ptr &cloud, double distance_threshold, double normal_threshold, std::set< int > &non_plane_indices) |
virtual ConvexPolygon::Ptr | getPolygon () |
return ConvexPolygon pointer of this instance. More... | |
virtual double | getResolution () |
GridPlane (ConvexPolygon::Ptr plane, const double resolution) | |
virtual bool | isOccupied (const IndexPair &pair) |
virtual bool | isOccupied (const Eigen::Vector3f &p) |
p should be local coordinate More... | |
virtual bool | isOccupiedGlobal (const Eigen::Vector3f &p) |
p should be global coordinate More... | |
virtual IndexPair | projectLocalPointAsIndexPair (const Eigen::Vector3f &p) |
Project 3-D point to GridPlane::IndexPair. p should be represented in local coordinates. More... | |
virtual jsk_recognition_msgs::SimpleOccupancyGrid | toROSMsg () |
virtual Eigen::Vector3f | unprojectIndexPairAsGlobalPoint (const IndexPair &pair) |
Unproject GridPlane::IndexPair to 3-D global point. More... | |
virtual Eigen::Vector3f | unprojectIndexPairAsLocalPoint (const IndexPair &pair) |
Unproject GridPlane::IndexPair to 3-D local point. More... | |
virtual | ~GridPlane () |
Static Public Member Functions | |
static GridPlane | fromROSMsg (const jsk_recognition_msgs::SimpleOccupancyGrid &rosmsg, const Eigen::Affine3f &offset) |
Construct GridPlane object from jsk_recognition_msgs::SimpleOccupancyGrid. More... | |
Protected Attributes | |
IndexPairSet | cells_ |
ConvexPolygon::Ptr | convex_ |
double | resolution_ |
Grid based representation of planar region.
Each cell represents a square region as belows: +-----—+ | | | + | | | +-----—+
The width and height of the cell is equivalent to resolution_, and the value of cells_ represents a center point. (i, j) means rectanglar region of (x, y) which satisfies followings: i * resolution - 0.5 * resolution <= x < i * resolution + 0.5 * resolution j * resolution - 0.5 * resolution <= y < j * resolution + 0.5 * resolution
Definition at line 73 of file grid_plane.h.
typedef boost::tuple<int, int> jsk_recognition_utils::GridPlane::IndexPair |
Definition at line 77 of file grid_plane.h.
Definition at line 78 of file grid_plane.h.
Definition at line 76 of file grid_plane.h.
jsk_recognition_utils::GridPlane::GridPlane | ( | ConvexPolygon::Ptr | plane, |
const double | resolution | ||
) |
Definition at line 43 of file grid_plane.cpp.
|
virtual |
Definition at line 49 of file grid_plane.cpp.
|
virtual |
Add IndexPair to this instance.
Definition at line 65 of file grid_plane.cpp.
|
virtual |
Definition at line 144 of file grid_plane.cpp.
|
virtual |
Dilate grid cells with specified number of pixels.
Definition at line 70 of file grid_plane.cpp.
|
virtual |
Erode grid cells with specified number of pixels.
Definition at line 91 of file grid_plane.cpp.
|
virtual |
Definition at line 166 of file grid_plane.cpp.
|
virtual |
Definition at line 288 of file grid_plane.cpp.
|
virtual |
Definition at line 218 of file grid_plane.cpp.
|
virtual |
Definition at line 227 of file grid_plane.cpp.
|
static |
Construct GridPlane object from jsk_recognition_msgs::SimpleOccupancyGrid.
Definition at line 320 of file grid_plane.cpp.
|
inlinevirtual |
return ConvexPolygon pointer of this instance.
Definition at line 154 of file grid_plane.h.
|
inlinevirtual |
Definition at line 95 of file grid_plane.h.
|
virtual |
Definition at line 118 of file grid_plane.cpp.
|
virtual |
p should be local coordinate
Definition at line 133 of file grid_plane.cpp.
|
virtual |
p should be global coordinate
Definition at line 139 of file grid_plane.cpp.
|
virtual |
Project 3-D point to GridPlane::IndexPair. p should be represented in local coordinates.
Definition at line 54 of file grid_plane.cpp.
|
virtual |
Definition at line 296 of file grid_plane.cpp.
|
virtual |
Unproject GridPlane::IndexPair to 3-D global point.
Definition at line 159 of file grid_plane.cpp.
|
virtual |
Unproject GridPlane::IndexPair to 3-D local point.
Definition at line 151 of file grid_plane.cpp.
|
protected |
Definition at line 163 of file grid_plane.h.
|
protected |
Definition at line 162 of file grid_plane.h.
|
protected |
Definition at line 164 of file grid_plane.h.