Go to the documentation of this file.
39 #include <sensor_msgs/PointCloud2.h>
41 #include <boost/function.hpp>
46 #include <boost/thread/mutex.hpp>
81 void maskContainment(
const sensor_msgs::PointCloud2& data_in,
const Eigen::Vector3d& sensor_pos,
82 const double min_sensor_dist,
const double max_sensor_dist, std::vector<int>& mask);
107 bool operator()(
const SeeShape& b1,
const SeeShape& b2)
const
109 if (b1.volume > b2.volume)
111 if (b1.volume < b2.volume)
113 return b1.handle < b2.handle;
121 std::set<SeeShape, SortBodies>
bodies_;
122 std::vector<bodies::BoundingSphere>
bspheres_;
130 std::map<ShapeHandle, std::set<SeeShape, SortBodies>::iterator>
used_handles_;
boost::mutex shapes_lock_
Protects, bodies_ and bspheres_. All public methods acquire this mutex for their whole duration.
boost::function< bool(ShapeHandle, Eigen::Isometry3d &)> TransformCallback
virtual ~ShapeMask()
Destructor to clean up.
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 freeMemory()
Free memory.
void removeShape(ShapeHandle handle)
std::vector< bodies::BoundingSphere > bspheres_
bool operator()(const SeeShape &b1, const SeeShape &b2) const
ShapeMask(const TransformCallback &transform_callback=TransformCallback())
Construct the filter.
Computing a mask for a pointcloud that states which points are inside the robot.
void setTransformCallback(const TransformCallback &transform_callback)
std::map< ShapeHandle, std::set< SeeShape, SortBodies >::iterator > used_handles_
std::shared_ptr< const Shape > ShapeConstPtr
TransformCallback transform_callback_
ShapeHandle addShape(const shapes::ShapeConstPtr &shape, double scale=1.0, double padding=0.0)
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...
perception
Author(s): Ioan Sucan
, Jon Binney , Suat Gedikli
autogenerated on Sat Mar 15 2025 02:26:49