How to create runtime zoomable camera sensor in gazebo?

asked 2022-05-31 07:31:08 -0500

Mike_ gravatar image

I'm trying to do so with camera sensor and libgazebo_ros_camera controller and while I can set camera fov in urdf file, it seems where is no way to do it at runtime.

Looks like it was possible in the past (https://github.com/ros-simulation/gaz...)

However, an attempt to uncomment it, while compiles fine, leads to a runtime crash in gazebo:

terminate called after throwing an instance of 'Ogre::RenderingAPIException'
  what():  OGRE EXCEPTION(3:RenderingAPIException): Zero sized texture surface on texture c1/rt0/rtt/140158813143352/aurora::pitch::wide_camera_RttTex face 0 mipmap 0. Probably, the GL driver refused to create the texture. in GLTexture::_createSurfaceList at /build/ogre-1.9-kiU5_5/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/OgreGLTexture.cpp (line 415)

Which looks like we can't just change camera parameters at runtime.

Is there any other way to create zoomable camera in gazebo? ( I'm using gazebo-classic 11.11.0 and ros-noetic on ubuntu 20.04 )

edit retag flag offensive close merge delete