-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct setting of is_dense flag in SegmentDifferences. Deprecate unused parameter in method. #2380
Conversation
Flag must be set after copyPointCloud, otherwise it will be overwritten. Remove unused parameter tgt and redundant copying of attributes.
All makes sense to me, thanks. However we'll need to keep around the old function signature and add a depreciation warning. Something like this: template <typename PointT>
PCL_DEPRECATED ("getPointCloudDifferences() does not use the tgt parameter, thus it is
deprecated and will be removed in future releases.")
inline void getPointCloudDifference (
const pcl::PointCloud<PointT> &src, const pcl::PointCloud<PointT> &tgt,
double threshold, const boost::shared_ptr<pcl::search::Search<PointT> > &tree,
pcl::PointCloud<PointT> &output)
{
getPointCloudDifferences<PointT> (src, pcl::PointCloud<PointT> (), threshold, tree, output);
} |
Hi Sergey, I have made the changes you requested, it's now possible again to call the function with the old signature. I cannot see the deprecated warning with my GCC 4.9 and VS 2015 compilers however. We use the same macro and it stopped working when changing from VS 2010 to 2015. |
Thanks. I experimented with deprecation warnings last month on GCC 5.5; it worked. So at least some users will see them. |
{ | ||
getPointCloudDifference<PointT> (src, pcl::PointCloud<PointT>(), threshold, tree, output); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to rock the boat this late. Isn't the idea behind this deprecation accept the extra tgt
parameter but invoke the version without it like shown below?
template <typename PointT>
PCL_DEPRECATED("getPointCloudDifference() does not use the tgt parameter, thus it is deprecated and will be removed in future releases.")
inline void getPointCloudDifference (
const pcl::PointCloud<PointT> &src,
const pcl::PointCloud<PointT> &, // removed parameter to suppress warning
double threshold,
const boost::shared_ptr<pcl::search::Search<PointT> > &tree,
pcl::PointCloud<PointT> &output)
{
getPointCloudDifference<PointT> (src, threshold, tree, output); // without the extra parameter
}
Isn't the method recursively calling itself with the current change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good catch!
is_dense
flag must be set aftercopyPointCloud
, otherwise it will be overwritten.is_dense
should be set to true (because it IS true, not because we don't want to check).copyPointCloud
.tgt
ingetPointCloudDifference
, it only needs the kd-tree.