Skip to content
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

Merged
merged 1 commit into from
Nov 24, 2017

Conversation

UnaNancyOwen
Copy link
Member

Add support pcl::PointXYZRGBA to pcl::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,

@UnaNancyOwen UnaNancyOwen added this to the pcl-1.9.0 milestone Nov 24, 2017
@SergioRAgostinho SergioRAgostinho added changelog: enhancement Meta-information for changelog generation changelog: API break Meta-information for changelog generation labels Nov 24, 2017
/** \brief Returns the maximum number of lasers
*/
static uint8_t
getMaximumNumberOfLasers ();
Copy link
Member

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.

Copy link
Member

@SergioRAgostinho SergioRAgostinho Nov 24, 2017

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.

Copy link
Member

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)

Copy link
Member Author

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);
  }

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Member Author

@UnaNancyOwen UnaNancyOwen Nov 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@taketwo taketwo added the changelog: ABI break Meta-information for changelog generation label Nov 24, 2017
Add support pcl::PointXYZRGBA to pcl::VLPGrabber.
This change will be able to attach color to point cloud using
pcl::visualization::PointCloudColorHandlerRGBField.
@SergioRAgostinho
Copy link
Member

@taketwo Do you think it is worth to keep the breaks ABI label even when it is superseeded by the breaks API one? In this case you added it after. What was the rationale behind it?

@taketwo
Copy link
Member

taketwo commented Aug 26, 2018

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.

@taketwo taketwo removed the changelog: ABI break Meta-information for changelog generation label Aug 26, 2018
@SergioRAgostinho SergioRAgostinho added the changelog: deprecation Meta-information for changelog generation label Sep 25, 2018
@SergioRAgostinho SergioRAgostinho changed the title Add support pcl::PointXYZRGBA to pcl::VLPGrabber Add support pcl::PointXYZRGBA to pcl::VLPGrabber. Deprecate rgb signatures. Sep 25, 2018
@SergioRAgostinho
Copy link
Member

Removing API breakage tag based on #2396 (comment) and #2396 (comment).

@SergioRAgostinho SergioRAgostinho added changelog: ABI break Meta-information for changelog generation changelog: API break Meta-information for changelog generation and removed changelog: API break Meta-information for changelog generation changelog: ABI break Meta-information for changelog generation labels Sep 28, 2018
@SergioRAgostinho
Copy link
Member

Can be considered API breakage because we renamed protected members. If people derive from the class their code will break. Namely current_scan_xyzrgb_, current_sweep_xyzrgb_, scan_xyzrgb_signal_ and sweep_xyzrgb_signal_.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: API break Meta-information for changelog generation changelog: deprecation Meta-information for changelog generation changelog: enhancement Meta-information for changelog generation module: io
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants