* Deriving typedef from pcl type * Explicit boost shared_ptr for function parameters * Use boost::shared_ptr instead of PCL::Ptr * Implementing boost-std compatibility * Using the compatibility layer
This commit is contained in:
@@ -43,7 +43,7 @@ pcl_ros::BoundaryEstimation::emptyPublish (const PointCloudInConstPtr &cloud)
|
||||
{
|
||||
PointCloudOut output;
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -57,17 +57,17 @@ pcl_ros::BoundaryEstimation::computePublish (const PointCloudInConstPtr &cloud,
|
||||
impl_.setRadiusSearch (search_radius_);
|
||||
|
||||
// Set the inputs
|
||||
impl_.setInputCloud (cloud);
|
||||
impl_.setInputCloud (pcl_ptr(cloud));
|
||||
impl_.setIndices (indices);
|
||||
impl_.setSearchSurface (surface);
|
||||
impl_.setInputNormals (normals);
|
||||
impl_.setSearchSurface (pcl_ptr(surface));
|
||||
impl_.setInputNormals (pcl_ptr(normals));
|
||||
// Estimate the feature
|
||||
PointCloudOut output;
|
||||
impl_.compute (output);
|
||||
|
||||
// Enforce that the TF frame and the timestamp are copied
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
typedef pcl_ros::BoundaryEstimation BoundaryEstimation;
|
||||
|
||||
@@ -43,7 +43,7 @@ pcl_ros::FPFHEstimation::emptyPublish (const PointCloudInConstPtr &cloud)
|
||||
{
|
||||
PointCloudOut output;
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -57,10 +57,10 @@ pcl_ros::FPFHEstimation::computePublish (const PointCloudInConstPtr &cloud,
|
||||
impl_.setRadiusSearch (search_radius_);
|
||||
|
||||
// Set the inputs
|
||||
impl_.setInputCloud (cloud);
|
||||
impl_.setInputCloud (pcl_ptr(cloud));
|
||||
impl_.setIndices (indices);
|
||||
impl_.setSearchSurface (surface);
|
||||
impl_.setInputNormals (normals);
|
||||
impl_.setSearchSurface (pcl_ptr(surface));
|
||||
impl_.setInputNormals (pcl_ptr(normals));
|
||||
// Estimate the feature
|
||||
PointCloudOut output;
|
||||
impl_.compute (output);
|
||||
@@ -68,7 +68,7 @@ pcl_ros::FPFHEstimation::computePublish (const PointCloudInConstPtr &cloud,
|
||||
// Publish a Boost shared ptr const data
|
||||
// Enforce that the TF frame and the timestamp are copied
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
typedef pcl_ros::FPFHEstimation FPFHEstimation;
|
||||
|
||||
@@ -43,7 +43,7 @@ pcl_ros::FPFHEstimationOMP::emptyPublish (const PointCloudInConstPtr &cloud)
|
||||
{
|
||||
PointCloudOut output;
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -57,10 +57,10 @@ pcl_ros::FPFHEstimationOMP::computePublish (const PointCloudInConstPtr &cloud,
|
||||
impl_.setRadiusSearch (search_radius_);
|
||||
|
||||
// Set the inputs
|
||||
impl_.setInputCloud (cloud);
|
||||
impl_.setInputCloud (pcl_ptr(cloud));
|
||||
impl_.setIndices (indices);
|
||||
impl_.setSearchSurface (surface);
|
||||
impl_.setInputNormals (normals);
|
||||
impl_.setSearchSurface (pcl_ptr(surface));
|
||||
impl_.setInputNormals (pcl_ptr(normals));
|
||||
// Estimate the feature
|
||||
PointCloudOut output;
|
||||
impl_.compute (output);
|
||||
@@ -68,7 +68,7 @@ pcl_ros::FPFHEstimationOMP::computePublish (const PointCloudInConstPtr &cloud,
|
||||
// Publish a Boost shared ptr const data
|
||||
// Enforce that the TF frame and the timestamp are copied
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
typedef pcl_ros::FPFHEstimationOMP FPFHEstimationOMP;
|
||||
|
||||
@@ -43,7 +43,7 @@ pcl_ros::MomentInvariantsEstimation::emptyPublish (const PointCloudInConstPtr &c
|
||||
{
|
||||
PointCloudOut output;
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -56,9 +56,9 @@ pcl_ros::MomentInvariantsEstimation::computePublish (const PointCloudInConstPtr
|
||||
impl_.setRadiusSearch (search_radius_);
|
||||
|
||||
// Set the inputs
|
||||
impl_.setInputCloud (cloud);
|
||||
impl_.setInputCloud (pcl_ptr(cloud));
|
||||
impl_.setIndices (indices);
|
||||
impl_.setSearchSurface (surface);
|
||||
impl_.setSearchSurface (pcl_ptr(surface));
|
||||
// Estimate the feature
|
||||
PointCloudOut output;
|
||||
impl_.compute (output);
|
||||
@@ -66,7 +66,7 @@ pcl_ros::MomentInvariantsEstimation::computePublish (const PointCloudInConstPtr
|
||||
// Publish a Boost shared ptr const data
|
||||
// Enforce that the TF frame and the timestamp are copied
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
typedef pcl_ros::MomentInvariantsEstimation MomentInvariantsEstimation;
|
||||
|
||||
@@ -43,7 +43,7 @@ pcl_ros::NormalEstimation::emptyPublish (const PointCloudInConstPtr &cloud)
|
||||
{
|
||||
PointCloudOut output;
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -56,9 +56,9 @@ pcl_ros::NormalEstimation::computePublish (const PointCloudInConstPtr &cloud,
|
||||
impl_.setRadiusSearch (search_radius_);
|
||||
|
||||
// Set the inputs
|
||||
impl_.setInputCloud (cloud);
|
||||
impl_.setInputCloud (pcl_ptr(cloud));
|
||||
impl_.setIndices (indices);
|
||||
impl_.setSearchSurface (surface);
|
||||
impl_.setSearchSurface (pcl_ptr(surface));
|
||||
// Estimate the feature
|
||||
PointCloudOut output;
|
||||
impl_.compute (output);
|
||||
@@ -66,7 +66,7 @@ pcl_ros::NormalEstimation::computePublish (const PointCloudInConstPtr &cloud,
|
||||
// Publish a Boost shared ptr const data
|
||||
// Enforce that the TF frame and the timestamp are copied
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
typedef pcl_ros::NormalEstimation NormalEstimation;
|
||||
|
||||
@@ -43,7 +43,7 @@ pcl_ros::NormalEstimationOMP::emptyPublish (const PointCloudInConstPtr &cloud)
|
||||
{
|
||||
PointCloudOut output;
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -56,9 +56,9 @@ pcl_ros::NormalEstimationOMP::computePublish (const PointCloudInConstPtr &cloud,
|
||||
impl_.setRadiusSearch (search_radius_);
|
||||
|
||||
// Set the inputs
|
||||
impl_.setInputCloud (cloud);
|
||||
impl_.setInputCloud (pcl_ptr(cloud));
|
||||
impl_.setIndices (indices);
|
||||
impl_.setSearchSurface (surface);
|
||||
impl_.setSearchSurface (pcl_ptr(surface));
|
||||
// Estimate the feature
|
||||
PointCloudOut output;
|
||||
impl_.compute (output);
|
||||
@@ -66,7 +66,7 @@ pcl_ros::NormalEstimationOMP::computePublish (const PointCloudInConstPtr &cloud,
|
||||
// Publish a Boost shared ptr const data
|
||||
// Enforce that the TF frame and the timestamp are copied
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
typedef pcl_ros::NormalEstimationOMP NormalEstimationOMP;
|
||||
|
||||
@@ -45,7 +45,7 @@ pcl_ros::NormalEstimationTBB::emptyPublish (const PointCloudInConstPtr &cloud)
|
||||
{
|
||||
PointCloud output;
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -71,7 +71,7 @@ pcl_ros::NormalEstimationTBB::computePublish (const PointCloudInConstPtr &cloud,
|
||||
// Publish a Boost shared ptr const data
|
||||
// Enforce that the TF frame and the timestamp are copied
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
typedef pcl_ros::NormalEstimationTBB NormalEstimationTBB;
|
||||
|
||||
@@ -43,7 +43,7 @@ pcl_ros::PFHEstimation::emptyPublish (const PointCloudInConstPtr &cloud)
|
||||
{
|
||||
PointCloudOut output;
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -57,10 +57,10 @@ pcl_ros::PFHEstimation::computePublish (const PointCloudInConstPtr &cloud,
|
||||
impl_.setRadiusSearch (search_radius_);
|
||||
|
||||
// Set the inputs
|
||||
impl_.setInputCloud (cloud);
|
||||
impl_.setInputCloud (pcl_ptr(cloud));
|
||||
impl_.setIndices (indices);
|
||||
impl_.setSearchSurface (surface);
|
||||
impl_.setInputNormals (normals);
|
||||
impl_.setSearchSurface (pcl_ptr(surface));
|
||||
impl_.setInputNormals (pcl_ptr(normals));
|
||||
// Estimate the feature
|
||||
PointCloudOut output;
|
||||
impl_.compute (output);
|
||||
@@ -68,7 +68,7 @@ pcl_ros::PFHEstimation::computePublish (const PointCloudInConstPtr &cloud,
|
||||
// Publish a Boost shared ptr const data
|
||||
// Enforce that the TF frame and the timestamp are copied
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
typedef pcl_ros::PFHEstimation PFHEstimation;
|
||||
|
||||
@@ -43,7 +43,7 @@ pcl_ros::PrincipalCurvaturesEstimation::emptyPublish (const PointCloudInConstPtr
|
||||
{
|
||||
PointCloudOut output;
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -57,10 +57,10 @@ pcl_ros::PrincipalCurvaturesEstimation::computePublish (const PointCloudInConstP
|
||||
impl_.setRadiusSearch (search_radius_);
|
||||
|
||||
// Set the inputs
|
||||
impl_.setInputCloud (cloud);
|
||||
impl_.setInputCloud (pcl_ptr(cloud));
|
||||
impl_.setIndices (indices);
|
||||
impl_.setSearchSurface (surface);
|
||||
impl_.setInputNormals (normals);
|
||||
impl_.setSearchSurface (pcl_ptr(surface));
|
||||
impl_.setInputNormals (pcl_ptr(normals));
|
||||
// Estimate the feature
|
||||
PointCloudOut output;
|
||||
impl_.compute (output);
|
||||
@@ -68,7 +68,7 @@ pcl_ros::PrincipalCurvaturesEstimation::computePublish (const PointCloudInConstP
|
||||
// Publish a Boost shared ptr const data
|
||||
// Enforce that the TF frame and the timestamp are copied
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
typedef pcl_ros::PrincipalCurvaturesEstimation PrincipalCurvaturesEstimation;
|
||||
|
||||
@@ -42,7 +42,7 @@ pcl_ros::SHOTEstimation::emptyPublish (const PointCloudInConstPtr &cloud)
|
||||
{
|
||||
PointCloudOut output;
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -56,10 +56,10 @@ pcl_ros::SHOTEstimation::computePublish (const PointCloudInConstPtr &cloud,
|
||||
impl_.setRadiusSearch (search_radius_);
|
||||
|
||||
// Set the inputs
|
||||
impl_.setInputCloud (cloud);
|
||||
impl_.setInputCloud (pcl_ptr(cloud));
|
||||
impl_.setIndices (indices);
|
||||
impl_.setSearchSurface (surface);
|
||||
impl_.setInputNormals (normals);
|
||||
impl_.setSearchSurface (pcl_ptr(surface));
|
||||
impl_.setInputNormals (pcl_ptr(normals));
|
||||
// Estimate the feature
|
||||
PointCloudOut output;
|
||||
impl_.compute (output);
|
||||
@@ -67,7 +67,7 @@ pcl_ros::SHOTEstimation::computePublish (const PointCloudInConstPtr &cloud,
|
||||
// Publish a Boost shared ptr const data
|
||||
// Enforce that the TF frame and the timestamp are copied
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
typedef pcl_ros::SHOTEstimation SHOTEstimation;
|
||||
|
||||
@@ -42,7 +42,7 @@ pcl_ros::SHOTEstimationOMP::emptyPublish (const PointCloudInConstPtr &cloud)
|
||||
{
|
||||
PointCloudOut output;
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -56,10 +56,10 @@ pcl_ros::SHOTEstimationOMP::computePublish (const PointCloudInConstPtr &cloud,
|
||||
impl_.setRadiusSearch (search_radius_);
|
||||
|
||||
// Set the inputs
|
||||
impl_.setInputCloud (cloud);
|
||||
impl_.setInputCloud (pcl_ptr(cloud));
|
||||
impl_.setIndices (indices);
|
||||
impl_.setSearchSurface (surface);
|
||||
impl_.setInputNormals (normals);
|
||||
impl_.setSearchSurface (pcl_ptr(surface));
|
||||
impl_.setInputNormals (pcl_ptr(normals));
|
||||
// Estimate the feature
|
||||
PointCloudOut output;
|
||||
impl_.compute (output);
|
||||
@@ -67,7 +67,7 @@ pcl_ros::SHOTEstimationOMP::computePublish (const PointCloudInConstPtr &cloud,
|
||||
// Publish a Boost shared ptr const data
|
||||
// Enforce that the TF frame and the timestamp are copied
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
typedef pcl_ros::SHOTEstimationOMP SHOTEstimationOMP;
|
||||
|
||||
@@ -43,7 +43,7 @@ pcl_ros::VFHEstimation::emptyPublish (const PointCloudInConstPtr &cloud)
|
||||
{
|
||||
PointCloudOut output;
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -57,10 +57,10 @@ pcl_ros::VFHEstimation::computePublish (const PointCloudInConstPtr &cloud,
|
||||
impl_.setRadiusSearch (search_radius_);
|
||||
|
||||
// Set the inputs
|
||||
impl_.setInputCloud (cloud);
|
||||
impl_.setInputCloud (pcl_ptr(cloud));
|
||||
impl_.setIndices (indices);
|
||||
impl_.setSearchSurface (surface);
|
||||
impl_.setInputNormals (normals);
|
||||
impl_.setSearchSurface (pcl_ptr(surface));
|
||||
impl_.setInputNormals (pcl_ptr(normals));
|
||||
// Estimate the feature
|
||||
PointCloudOut output;
|
||||
impl_.compute (output);
|
||||
@@ -68,7 +68,7 @@ pcl_ros::VFHEstimation::computePublish (const PointCloudInConstPtr &cloud,
|
||||
// Publish a Boost shared ptr const data
|
||||
// Enforce that the TF frame and the timestamp are copied
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
typedef pcl_ros::VFHEstimation VFHEstimation;
|
||||
|
||||
@@ -203,7 +203,7 @@ pcl_ros::EuclideanClusterExtraction::input_indices_callback (
|
||||
if (indices)
|
||||
indices_ptr.reset (new std::vector<int> (indices->indices));
|
||||
|
||||
impl_.setInputCloud (cloud);
|
||||
impl_.setInputCloud (pcl_ptr(cloud));
|
||||
impl_.setIndices (indices_ptr);
|
||||
|
||||
std::vector<pcl::PointIndices> clusters;
|
||||
@@ -240,7 +240,7 @@ pcl_ros::EuclideanClusterExtraction::input_indices_callback (
|
||||
header.stamp += ros::Duration (i * 0.001);
|
||||
toPCL(header, output.header);
|
||||
// Publish a Boost shared ptr const data
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
NODELET_DEBUG ("[segmentAndPublish] Published cluster %zu (with %zu values and stamp %f) on topic %s",
|
||||
i, clusters[i].indices.size (), header.stamp.toSec (), pnh_->resolveName ("output").c_str ());
|
||||
}
|
||||
|
||||
@@ -190,16 +190,16 @@ pcl_ros::ExtractPolygonalPrismData::input_hull_indices_callback (
|
||||
pub_output_.publish (inliers);
|
||||
return;
|
||||
}
|
||||
impl_.setInputPlanarHull (planar_hull.makeShared ());
|
||||
impl_.setInputPlanarHull (pcl_ptr(planar_hull.makeShared ()));
|
||||
}
|
||||
else
|
||||
impl_.setInputPlanarHull (hull);
|
||||
impl_.setInputPlanarHull (pcl_ptr(hull));
|
||||
|
||||
IndicesPtr indices_ptr;
|
||||
if (indices && !indices->header.frame_id.empty ())
|
||||
indices_ptr.reset (new std::vector<int> (indices->indices));
|
||||
|
||||
impl_.setInputCloud (cloud);
|
||||
impl_.setInputCloud (pcl_ptr(cloud));
|
||||
impl_.setIndices (indices_ptr);
|
||||
|
||||
// Final check if the data is empty (remember that indices are set to the size of the data -- if indices* = NULL)
|
||||
|
||||
@@ -325,7 +325,7 @@ pcl_ros::SACSegmentation::input_indices_callback (const PointCloudConstPtr &clou
|
||||
if (indices && !indices->header.frame_id.empty ())
|
||||
indices_ptr.reset (new std::vector<int> (indices->indices));
|
||||
|
||||
impl_.setInputCloud (cloud_tf);
|
||||
impl_.setInputCloud (pcl_ptr(cloud_tf));
|
||||
impl_.setIndices (indices_ptr);
|
||||
|
||||
// Final check if the data is empty (remember that indices are set to the size of the data -- if indices* = NULL)
|
||||
@@ -652,8 +652,8 @@ pcl_ros::SACSegmentationFromNormals::input_normals_indices_callback (
|
||||
return;
|
||||
}
|
||||
|
||||
impl_.setInputCloud (cloud);
|
||||
impl_.setInputNormals (cloud_normals);
|
||||
impl_.setInputCloud (pcl_ptr(cloud));
|
||||
impl_.setInputNormals (pcl_ptr(cloud_normals));
|
||||
|
||||
IndicesPtr indices_ptr;
|
||||
if (indices && !indices->header.frame_id.empty ())
|
||||
|
||||
@@ -116,7 +116,7 @@ pcl_ros::SegmentDifferences::input_target_callback (const PointCloudConstPtr &cl
|
||||
NODELET_ERROR ("[%s::input_indices_callback] Invalid input!", getName ().c_str ());
|
||||
PointCloud output;
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -127,13 +127,13 @@ pcl_ros::SegmentDifferences::input_target_callback (const PointCloudConstPtr &cl
|
||||
cloud->width * cloud->height, pcl::getFieldsList (*cloud).c_str (), fromPCL(cloud->header).stamp.toSec (), cloud->header.frame_id.c_str (), pnh_->resolveName ("input").c_str (),
|
||||
cloud_target->width * cloud_target->height, pcl::getFieldsList (*cloud_target).c_str (), fromPCL(cloud_target->header).stamp.toSec (), cloud_target->header.frame_id.c_str (), pnh_->resolveName ("target").c_str ());
|
||||
|
||||
impl_.setInputCloud (cloud);
|
||||
impl_.setTargetCloud (cloud_target);
|
||||
impl_.setInputCloud (pcl_ptr(cloud));
|
||||
impl_.setTargetCloud (pcl_ptr(cloud_target));
|
||||
|
||||
PointCloud output;
|
||||
impl_.segment (output);
|
||||
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
NODELET_DEBUG ("[%s::segmentAndPublish] Published PointCloud2 with %zu points and stamp %f on topic %s", getName ().c_str (),
|
||||
output.points.size (), fromPCL(output.header).stamp.toSec (), pnh_->resolveName ("output").c_str ());
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ void
|
||||
NODELET_ERROR ("[%s::input_indices_callback] Invalid input!", getName ().c_str ());
|
||||
// Publish an empty message
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
return;
|
||||
}
|
||||
// If indices are given, check if they are valid
|
||||
@@ -131,7 +131,7 @@ void
|
||||
NODELET_ERROR ("[%s::input_indices_callback] Invalid indices!", getName ().c_str ());
|
||||
// Publish an empty message
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ void
|
||||
if (indices)
|
||||
indices_ptr.reset (new std::vector<int> (indices->indices));
|
||||
|
||||
impl_.setInputCloud (cloud);
|
||||
impl_.setInputCloud (pcl_ptr(cloud));
|
||||
impl_.setIndices (indices_ptr);
|
||||
|
||||
// Estimate the feature
|
||||
@@ -195,7 +195,7 @@ void
|
||||
}
|
||||
// Publish a Boost shared ptr const data
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
}
|
||||
|
||||
typedef pcl_ros::ConvexHull2D ConvexHull2D;
|
||||
|
||||
@@ -142,7 +142,7 @@ pcl_ros::MovingLeastSquares::input_indices_callback (const PointCloudInConstPtr
|
||||
{
|
||||
NODELET_ERROR ("[%s::input_indices_callback] Invalid input!", getName ().c_str ());
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
return;
|
||||
}
|
||||
// If indices are given, check if they are valid
|
||||
@@ -150,7 +150,7 @@ pcl_ros::MovingLeastSquares::input_indices_callback (const PointCloudInConstPtr
|
||||
{
|
||||
NODELET_ERROR ("[%s::input_indices_callback] Invalid indices!", getName ().c_str ());
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ pcl_ros::MovingLeastSquares::input_indices_callback (const PointCloudInConstPtr
|
||||
///
|
||||
|
||||
// Reset the indices and surface pointers
|
||||
impl_.setInputCloud (cloud);
|
||||
impl_.setInputCloud (pcl_ptr(cloud));
|
||||
|
||||
IndicesPtr indices_ptr;
|
||||
if (indices)
|
||||
@@ -183,9 +183,9 @@ pcl_ros::MovingLeastSquares::input_indices_callback (const PointCloudInConstPtr
|
||||
// Publish a Boost shared ptr const data
|
||||
// Enforce that the TF frame and the timestamp are copied
|
||||
output.header = cloud->header;
|
||||
pub_output_.publish (output.makeShared ());
|
||||
pub_output_.publish (ros_ptr(output.makeShared ()));
|
||||
normals->header = cloud->header;
|
||||
pub_normals_.publish (normals);
|
||||
pub_normals_.publish (ros_ptr(normals));
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user