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

Report crashes, strange behaviour, or apparent bugs
Post Reply
DrRiften
Posts: 8
Joined: 06 Jun 2024, 13:36

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

Post 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

coppelia
Site Admin
Posts: 10504
Joined: 14 Dec 2012, 00:25

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

Post 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

Post Reply