Page 1 of 1

First image taken by vision sensor in OpenGL3 render mode is always empty.

Posted: 15 Jul 2024, 08:40
by DrRiften
I'm recording rgb images from a vision sensor in OpenGL3 render mode during simulation.

Code: Select all

function sysCall_sensing()
	local file_path = xxxxx
	local image, resolution = sim.getVisionSensorImg(sensor)
	sim.saveImage(image, resolution, 0, file_path, -1)
end
After the startup of coppeliaSim, the first image taken during the first simulation would always be empty (pure black). This only happens during the first simulation after coppeliaSim startup. The first image during next simulation would be normal. And only happens in OpenGL3 render mode. Legacy OpenGL is fine.

CoppeliaSim Version: EDU 4.7.0 rev.0

Re: First image taken by vision sensor in OpenGL3 render mode is always empty.

Posted: 19 Jul 2024, 13:58
by coppelia
Hello,

this is kind of normal. To avoid this, simply load the openGL3 plugin before that with:

Code: Select all

require('simOpenGL3')
Cheers