-
Notifications
You must be signed in to change notification settings - Fork 151
Description
When running with pointcloud enable I can only seem to get mono output from the pointcloud output. I am checking RGB in Rviz and manually inspected the cloud output to verify that indeed it is only publishing mono data.
I can see that the plugin is always dropping into this else if:
realsense_gazebo_plugin/src/gazebo_ros_realsense.cpp
Lines 185 to 190 in 49ab134
else if (this->image_msg_.data.size() == rows_arg * cols_arg) | |
{ | |
// mono (or bayer? @todo; fix for bayer) | |
iter_rgb[0] = image_src[i + j * cols_arg]; | |
iter_rgb[1] = image_src[i + j * cols_arg]; | |
iter_rgb[2] = image_src[i + j * cols_arg]; |
Since we are filling the this->image_msg_
data with both RGB colour images and MONO IR images here:
realsense_gazebo_plugin/src/gazebo_ros_realsense.cpp
Lines 90 to 92 in 49ab134
fillImage(this->image_msg_, pixel_format, cam->ImageHeight(), | |
cam->ImageWidth(), cam->ImageDepth() * cam->ImageWidth(), | |
reinterpret_cast<const void *>(cam->ImageData())); |
I'm suspecting that somehow only the MONO images are actually being used exclusively for:
uint8_t *image_src = (uint8_t *)(&(this->image_msg_.data[0])); |
It seems at least one other user may have experienced this issue too: #3
Any ideas or fixes would be much appreciated! Happy to contribute back if I figure something out too.
Cheers