37 #ifndef MOVEIT_POINT_CONTAINMENT_FILTER_SELF_MASK_ 38 #define MOVEIT_POINT_CONTAINMENT_FILTER_SELF_MASK_ 40 #include <sensor_msgs/PointCloud2.h> 42 #include <boost/function.hpp> 48 #include <boost/thread/mutex.hpp> 83 void maskContainment(
const sensor_msgs::PointCloud2& data_in,
const Eigen::Vector3d& sensor_pos,
84 const double min_sensor_dist,
const double max_sensor_dist, std::vector<int>& mask);
128 std::map<ShapeHandle, std::set<SeeShape, SortBodies>::iterator>
used_handles_;
~ShapeMask()
Destructor to clean up.
ShapeHandle addShape(const shapes::ShapeConstPtr &shape, double scale=1.0, double padding=0.0)
void setTransformCallback(const TransformCallback &transform_callback)
int getMaskContainment(double x, double y, double z) const
Get the containment mask (INSIDE or OUTSIDE) value for an individual point. It is assumed the point i...
bool operator()(const SeeShape &b1, const SeeShape &b2)
void freeMemory()
Free memory.
boost::function< bool(ShapeHandle, Eigen::Affine3d &)> TransformCallback
boost::mutex shapes_lock_
std::vector< bodies::BoundingSphere > bspheres_
Computing a mask for a pointcloud that states which points are inside the robot.
std::map< ShapeHandle, std::set< SeeShape, SortBodies >::iterator > used_handles_
void maskContainment(const sensor_msgs::PointCloud2 &data_in, const Eigen::Vector3d &sensor_pos, const double min_sensor_dist, const double max_sensor_dist, std::vector< int > &mask)
Compute the containment mask (INSIDE or OUTSIDE) for a given pointcloud. If a mask element is INSIDE...
std::set< SeeShape, SortBodies > bodies_
void removeShape(ShapeHandle handle)
TransformCallback transform_callback_
ShapeMask(const TransformCallback &transform_callback=TransformCallback())
Construct the filter.
std::shared_ptr< const Shape > ShapeConstPtr