Gazebo | Ignition | Community
Ask Your Question
1

Set near/far clip distance for the visualization window camera

asked 2016-06-16 15:18:00 -0600

c_rist gravatar image

When viewing an outdoor gazebo world from some distance above, I get strong Z-fighting artifacts between two ground planes located on top of each other at a distance of about 0.5 meters. I suppose this could be fixed with a more suitable near and far clip distance for the visualization camera. Is there a way to set this distances in gazebo? Is it possible to access the camera parameters using a Gazebo-GUI-Plugin?

edit retag flag offensive close merge delete

Comments

Hey guys, we have also the problem with z-Fighting. Is there any possibility to modify the near clipping plane??? A solution or even some advice would be great!! Best regards!!

Illuminatur gravatar imageIlluminatur ( 2016-06-26 22:23:03 -0600 )edit

Are there no ideas? Best regards.

Illuminatur gravatar imageIlluminatur ( 2016-07-02 09:38:09 -0600 )edit

@Illuminatur please don't try hijacking the thread, instead open a new question :)

yah130s gravatar imageyah130s ( 2017-05-17 18:22:06 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-07-03 17:15:40 -0600

chapulina gravatar image

It should be possible to do it from a GUI plugin. Just get the user camera:

rendering::UserCameraPtr camera = gazebo::gui::get_active_camera();

And set the new clip distances:

camera->SetClipDist(near, far);

edit flag offensive delete link more

Comments

Thanks a lot, this fixes my problem.

c_rist gravatar imagec_rist ( 2016-07-12 11:35:55 -0600 )edit
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2016-06-16 15:17:24 -0600

Seen: 1,119 times

Last updated: Jul 03 '16