Open marko-zaric opened 1 year ago
It worked for me after I aligned the dimensions of all messages ( color , depth and infrared )
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.
This for fixes the monochrome pointcloud issue #48 many users had with this package by checking the dimension of the sensor_msgs::Image imagemsg.
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 imagemsg called imagemsgs2 which stored the content of imagemsg into imagemsgs2 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 imagemsg.