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

MONO8 transformer for point cloud plugin #1145

Merged

Conversation

wkentaro
Copy link
Contributor

Why?

I need to overlay color point cloud on mono one.
For example, grasp point on sensor input.

rviz_point_cloud_mono8

@wjwwood
Copy link
Member

wjwwood commented Aug 30, 2017

Thanks for the pr, we'll have a look asap.

@wjwwood wjwwood added this to the untargeted milestone Aug 30, 2017
float b = rgb_lut[rgb & 0xff];
float mono = 0.2989 * r + 0.5870 * g + 0.1140 * b;
iter->color.r = iter->color.g = iter->color.b = mono;
iter->color.a = 1.0f;
Copy link
Contributor

Choose a reason for hiding this comment

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

AFAICT the defaults for green and blue channels will be 1.0, so I would think we need to set them to mono here as well to get the greyscale result that you show in the screenshot from the initial post. However, your image seems to show the pointcloud displaying as expected only setting the red. I want to confirm that only setting the red is sufficient before approving this PR (@wkentaro I know it's been a while since this PR was opened but if you had a specific reason for only setting the red channel I am interested).

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I misread the line and it is setting all three.

Copy link
Contributor

@dhood dhood left a comment

Choose a reason for hiding this comment

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

looks good thanks

@dhood dhood merged commit 041273a into ros-visualization:kinetic-devel Dec 11, 2017
@wkentaro wkentaro deleted the mono8_point_cloud_transformer branch December 12, 2017 02:38
130s pushed a commit to 130s/rviz that referenced this pull request Aug 21, 2024
…atus (ros-visualization#1137) (ros-visualization#1145)

Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
(cherry picked from commit ad1990bfa180f39b4cf04116438453783bb125f9)

Co-authored-by: Alejandro Hernández Cordero <alejandro@openrobotics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants