How to simulate monochrome / greyscale camera in Gazebo?
Is there a proper way to simulate monochrome / greyscale camera in Gazebo?
The answer to question #3470 suggests setting the <format>
tag to L8
. This almost works as expected, but I noticed that the output image only uses the red channel of the rendered scene. Thus a blue object would appear as black, as shown below:
Is there a way to get the sensor to output the mean greyscale value (e.g. (R+G+B)/3
)?
Edit: adding a photo showing the same result in RViz and the Gazebo Topic Visualizer, as well as showing the ambient and background color settings