Closed sanjuksha closed 1 year ago
Added one more change for Z check based on this comment https://github.com/gazebosim/gazebo-classic/issues/3273#issuecomment-1307742254
cc @kjeppesen1 @mogumbo
This fix works for me :+1: I moved around a pair of wideangle cameras at various angles and positions in a world with a DEM, and I no longer see the lens flare disappearing when it isn't supposed to.
I've restarted the windows build
I cleaned up some of the code changes in https://github.com/gazebosim/gazebo-classic/pull/3276/commits/5740ce52dc46363404be7d46f7fe986afe8d536b and https://github.com/gazebosim/gazebo-classic/pull/3276/commits/adf7d1f4b289af91b40e85240aa13e3b3671de6f and then made an adjustment to the new test in https://github.com/gazebosim/gazebo-classic/pull/3276/commits/c63047ca96959343f094a7c9ec012f150801f7ef to make it easier to confirm the presence of the bug without the fix in this branch
Thanks to some debugging help from @iche033, I added some additional cameras in https://github.com/gazebosim/gazebo-classic/pull/3276/commits/d33593d662e0c62cd85b1f2cb6abfeadba73877f and https://github.com/gazebosim/gazebo-classic/pull/3276/commits/c92f948e4116768ba788ba0bc79e1e4d2f5f6de4 to illustrate some problems with the occlusion checking in the test world added in this pull request
gazebo --verbose worlds/lensflare_wideangle_cam.world
wide_angle_cameras_occluded_high
camera imageThere is a box directly in front of the camera, so it should occlude but doesn't
wide_angle_cameras_occluded_higher
camera imageThere is a box to the right of the camera (partially visible), but it should not be occluding, but the lens flare is not there
It seems to be checking for occlusions in the wrong direction?
Signed-off-by: Sanjuksha Nirgude sanjuksha@gmail.com
🦟 Bug fix
https://github.com/gazebosim/gazebo-classic/issues/3273
Summary
Porting the same change for gazebo classic from https://github.com/gazebosim/gz-rendering/pull/746 and a fix for wide angle camera not showing lensflare at certain angles. Wide Angle camera used to loop through all cameras to find the occlusion scale which resulted into not rendering lensfalre at certain angles. The fix removes the looping through all cameras and uses the camera facing the light source to calculate occlusion.
Checklist
codecheck
passed (See contributing)Results