Robotics StackExchange | Archived questions

How to create runtime zoomable camera sensor in gazebo?

I'm trying to do so with camera sensor and libgazeboroscamera 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/gazebo_ros_pkgs/blob/231a7219b36b8a6cdd100b59f66a3df2955df787/gazebo_plugins/src/gazebo_ros_camera_utils.cpp#L342)

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 )

Asked by Mike_ on 2022-05-31 07:31:08 UTC

Comments

Answers