41 OccupancyMapUpdater(
"PointCloudMoveitFilter"),
45 max_range_(
std::numeric_limits<double>::infinity()),
47 point_cloud_subscriber_(
NULL),
48 point_cloud_filter_(
NULL),
50 keep_organized_(false)
62 if (!params.
hasMember(
"point_cloud_topic"))
70 if (!params.
hasMember(
"filtered_cloud_topic")) {
71 ROS_ERROR(
"filtered_cloud_topic is required");
77 if (params.
hasMember(
"filtered_cloud_use_color")) {
78 use_color_ = (bool)params[
"filtered_cloud_use_color"];
80 if (params.
hasMember(
"filtered_cloud_keep_organized")) {
106 #if (ROS_VERSION_MINIMUM(1,14,0) || MOVEIT_VERSION_MAJOR >= 1) // melodic or MoveIt 1.0 115 ROS_ERROR(
"Internal error. Shape filter handle %u not found", h);
118 transform = it->second;
128 ROS_ERROR(
"Shape filter not yet initialized!");
151 #if (ROS_VERSION_MINIMUM(1,14,0) || MOVEIT_VERSION_MAJOR >= 1) // melodic or MoveIt 1.0 161 &PointCloudMoveitFilter::cloudMsgCallback<pcl::PointXYZRGB>,
167 &PointCloudMoveitFilter::cloudMsgCallback<pcl::PointXYZ>,
170 ROS_INFO(
"Listening to '%s' using message filter with target frame '%s'",
171 point_cloud_topic_.c_str(),
179 &PointCloudMoveitFilter::cloudMsgCallback<pcl::PointXYZRGB>,
184 boost::bind(&PointCloudMoveitFilter::cloudMsgCallback<pcl::PointXYZ>,
187 ROS_INFO(
"Listening to '%s'", point_cloud_topic_.c_str());
const std::string & getMessage() const
boost::scoped_ptr< point_containment_filter::ShapeMask > shape_mask_
virtual ~PointCloudMoveitFilter()
OccupancyMapMonitor * monitor_
virtual ShapeHandle excludeShape(const shapes::ShapeConstPtr &shape)
virtual void forgetShape(ShapeHandle handle)
ros::NodeHandle private_nh_
ros::Publisher filtered_cloud_publisher_
occupancy_map_monitor::ShapeHandle ShapeHandle
virtual bool setParams(XmlRpc::XmlRpcValue ¶ms)
tf::MessageFilter< sensor_msgs::PointCloud2 > * point_cloud_filter_
virtual void stopHelper()
const std::string & getMapFrame() const
const boost::shared_ptr< tf::Transformer > & getTFClient() const
unsigned int point_subsample_
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
bool hasMember(const std::string &name) const
boost::shared_ptr< tf::Transformer > tf_
static void readXmlParam(XmlRpc::XmlRpcValue ¶ms, const std::string ¶m_name, double *value)
std::string filtered_cloud_topic_
message_filters::Subscriber< sensor_msgs::PointCloud2 > * point_cloud_subscriber_
virtual bool getShapeTransform(ShapeHandle h, Eigen::Affine3d &transform) const
std::string getTargetFramesString()
std::string point_cloud_topic_
ShapeTransformCache transform_cache_
virtual bool initialize()
CLASS_LOADER_REGISTER_CLASS(Dog, Base)
Connection registerCallback(const C &callback)
std::shared_ptr< const Shape > ShapeConstPtr