-
-
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
Add support pcl::PointXYZRGBA to pcl::VLPGrabber. Deprecate rgb signatures. #2102
Add support pcl::PointXYZRGBA to pcl::VLPGrabber. Deprecate rgb signatures. #2102
Conversation
io/include/pcl/io/hdl_grabber.h
Outdated
/** \brief Returns the maximum number of lasers | ||
*/ | ||
static uint8_t | ||
getMaximumNumberOfLasers (); |
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.
This method is shadowed in the deriving class. This is a recipe for troubles!
Suppose you have HDLGrabber* grabber = new VLPGrabber;
.
What do you think grabber->getMaximumNumberOfLasers()
will return?
Please change into virtual const.
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.
Suppose you have
HDLGrabber* grabber = new VLPGrabber;
I argue that that use case is not really applicable given the current inheritance scheme (poorly implemented).
Edit: Then again, your suggestion prevents even more poop to happen on an already poopy situation.
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.
Well, I did not invent this, this is exactly use-case Tsukasa proposed: #1738 (comment)
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.
Does your proposal mean this?
- static uint8_t
- getMaximumNumberOfLasers ();
+ virtual uint8_t
+ getMaximumNumberOfLasers () const;
uint8_t
- pcl::HDLGrabber::getMaximumNumberOfLasers ()
+ pcl::HDLGrabber::getMaximumNumberOfLasers () const
{
return (HDL_MAX_NUM_LASERS);
}
- static uint8_t
- getMaximumNumberOfLasers ();
+ virtual uint8_t
+ getMaximumNumberOfLasers () const;
uint8_t
- pcl::VLPGrabber::getMaximumNumberOfLasers ()
+ pcl::VLPGrabber::getMaximumNumberOfLasers () const
{
return (VLP_MAX_NUM_LASERS);
}
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.
Yes
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.
Fixed
Add support pcl::PointXYZRGBA to pcl::VLPGrabber. This change will be able to attach color to point cloud using pcl::visualization::PointCloudColorHandlerRGBField.
39551d2
to
67f69bc
Compare
@taketwo Do you think it is worth to keep the |
API break implies ABI break. Further, ABI changes per se are not interesting for users, it's only for us to know if version number needs to be bumped. In this sense yes, ABI break tag is redundant. I don't remember what my rationale was, but from now on we can agree that ABI tag is not needed if there is API tag already. |
Removing API breakage tag based on #2396 (comment) and #2396 (comment). |
Can be considered API breakage because we renamed protected members. If people derive from the class their code will break. Namely |
Add support
pcl::PointXYZRGBA
topcl::VLPGrabber
.This change will be able to attach color to point cloud using
pcl::visualization::PointCloudColorHandlerRGBField
.This pull request is a re-send #1738.
Please check the discussion about this pull request.
Thanks,