Skip to content

Conversation

marko-zaric
Copy link

This for fixes the monochrome pointcloud issue #48 many users had with this package by checking the dimension of the sensor_msgs::Image image_msg_.

The problem was that the colored rgb data was always overwritten by the monochrome pointcloud before getting published. I worked around this issue by creating a copy of image_msg_ called image_msgs2_ which stored the content of image_msg_ into image_msgs2_ when the size of the data was not monochrome but 3 dimensional (line 66). Later I simply used this stored color information when ever the color encoding was called instead of the by then overwritten image_msg_.

@emiraykin
Copy link

It worked for me after I aligned the dimensions of all messages ( color , depth and infrared )

@NakanishiKM
Copy link

I tried incorporating your pull request commit.
However, the point cloud color is only black.
This time we are simulating using: https://github.com/rickstaa/realsense-ros-gazebo?tab=readme-ov-file
Is there anything else I need to be careful about other than your commit part?

Paste the screenshots before and after apply your commit.
Screenshot from 2024-03-07 15-15-57
Screenshot from 2024-03-07 14-59-08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants