Vision sensors vs Cameras

Typically: "How do I... ", "How can I... " questions
Post Reply
atoz
Posts: 57
Joined: 18 Oct 2013, 09:02

Vision sensors vs Cameras

Post by atoz » 25 Nov 2017, 00:58

Hi,

I was wondering what is the difference between vision sensors and cameras that makes it so that multiple cameras do not slow down a simulation whilst multiple vision sensors do? Thanks

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

Re: Vision sensors vs Cameras

Post by coppelia » 29 Nov 2017, 09:54

Hello,

a vision sensor has a specific resolution. A camera does not have a specific resolution (the image will be specifically rendered for the viewport it will display in).

This also means that if you have several viewports for the same camera, the scene will be rendered several times.
On the other hand, the vision sensor will render once (when simHandleVisionSensor is called upon it), and transfer the image content back from the GPU to the CPU, so that it is available there for further processing/modification. Then. for each vision sensor viewport, the image is sent to the GPU back (it might have been modified in the mean time, etc.). Those image transfers take quite some time and do not happen with cameras (with cameras, the image simply stays on the GPU).

Cheers

Post Reply