Gazebo 1.9 has issues when moving camera on the scene

asked 2015-11-03 10:27:08 -0600

a.ambrosano gravatar image

updated 2015-11-04 11:18:44 -0600

I'm using Gazebo 1.9 installed on Ubuntu 12.04 and getting this behaviour when navigating the scene with the mouse. This is my current setup:

  • Ubuntu 12.04
  • Gazebo 1.9
  • OGRE 1.7.4
  • ASUS Radeon R7 370 with fglrx drivers 2:8.960-0ubuntu1 (not sure how to read the version of this package)

I tried activating VSync for OGRE on the Gazebo sources and compiling them but without any success.

When installing Gazebo 4 from repositories the problem just disappears.

Any idea where to look for the source of this problem?

EDIT: I went through all the OGRE samples (/usr/bin/SampleBrowser) and didn't notice this behaviour in any of them. So I guess it's somehow due to some rendering issue on Gazebo 1.9

EDIT 2: Seems the problem is solved, I changed the following line in gazebo/rendering/Camera.cc

void Camera::PostRender()
{
    this->renderTarget->swapBuffers();

    if (this->newData && (this->captureData || this->captureDataOnce))
    {
    ...
    }

    this->newData = false;
}

to

void Camera::PostRender()
{
    if (this->newData) this->renderTarget->swapBuffers();

    if (this->newData && (this->captureData || this->captureDataOnce))
    {
    ...
    }

    this->newData = false;
}

since the postRender was always being executed and the buffer swapped even without any new data, creating that awful effect.

edit retag flag offensive close merge delete