Page 1 of 1

Different image camera and vision sensor

Posted: 24 Jan 2020, 18:04
by zdenoB
In my scene I have one vision sensor and one camera, both in same pose.

When I run the simulation I have a different visual information from them.
Left Camera - Right Visual Sensor
Image
Image
Image

Are visual information on left side correct or the information on the right side?

Thank you for your help!

Re: Different image camera and vision sensor

Posted: 27 Jan 2020, 19:38
by coppelia
Hello,

if your camera and vision sensor are at the same pose, same view angle and same viewport proportions, then you should see the robot in a similar way left and right. Keep however following in mind:
  • a camera will display objects that are in the current view layers
  • a vision sensor will display objects that are renderable, independent of the view layers they are in
  • when looking at a model via a camera, you may only see the currently visible parts... other parts may be hidden in a layer that is currently not shown. This is often used with robot models, where the visible parts are detailed and used for collision detection, distance calculation and proximity sensor simulation, and where the hidden parts are simplified and often used for dynamics. If your visible parts and hidden parts do not overlap, then you have a problem, and this is also what might be going on in your scene. Try to look at your scene by toggling the visible layers a few times (also during simulation). You will quickly see if something is not right.
Cheers

Re: Different image camera and vision sensor

Posted: 29 Jan 2020, 21:34
by zdenoB
Hello,

Thank you for your answer.
All objects are set to be visible in all layers and to be renderable. I'm not using different structure parts for a different purpose.
The problem occurs only if joints are not strong enough. When I changed max torque on joints to higher value then this weird behavior disappear.

Any idea how to solve it? I can't use higher values for joints torque.

Thank you in advance.

Re: Different image camera and vision sensor

Posted: 30 Jan 2020, 06:19
by coppelia
Can you post a simple scene where that strange behaviour occurs? It will be easier for us to check what is going on...

Cheers

Re: Different image camera and vision sensor

Posted: 26 Mar 2020, 19:53
by zdenoB
coppelia wrote:
30 Jan 2020, 06:19
Can you post a simple scene where that strange behaviour occurs? It will be easier for us to check what is going on...

Cheers
Hello,
Sorry for my late reply.
Cheers

Re: Different image camera and vision sensor

Posted: 30 Mar 2020, 09:50
by coppelia
The reason why your vision sensor and camera are not showing the same behaviour is because you perform some actuation in the sensing section of your child script. So what is happening in each simulation step:

1. regular actuation
2. vision sensor is taking an image (in the sensing section)
3. you are changing things in the scene (in the sensing section)
4. the camera is taking an image

In the sensing section you should normally only do sensing tasks.

Cheers

Re: Different image camera and vision sensor

Posted: 30 Mar 2020, 19:16
by zdenoB
I've changed my code and now it works correctly.
Thank you.