Is there a way to simulate camera depth of field in Gazebo? [closed]
Simply put, I am trying to create a realistic camera simulation that includes making objects that are out of focus blurry. There does not seem to be any documentation online of this being done though. I already have a camera model that publishes distorted image_raw topics for reference.
Seeing as you're specifically asking about Gazebo and how its sensor are simulated, I believe it would be better to ask your question over at
answers.gazebosim.org
.If/when you post there, please post a comment with a link here, so we can keep things connected.
https://answers.gazebosim.org/questio...
Since its difficult for new users to comment on that thread in answers.gazebosim.org, @McGroto - did you find any answer elsewhere? I too am looking for focus control and aperture settings to control bokeh and depth of field, but it seems most answers online refer to gazebo only modelling a pinhole camera = infinite focal distance?
@w00dw0rm there is not an official way to do this in gazebo. I ended up defining the camera as a depth camera, then taking the raw images and depth images and making the depth of field effect in post processing. You can set this up yourself by subscribing to both topics and then performing a blurring operation once you have both.
If you come up with a better technique though I'd like to know!