Different image camera and vision sensor

Report crashes, strange behaviour, or apparent bugs
Post Reply
zdenoB
Posts: 7
Joined: 31 Oct 2019, 07:35

Different image camera and vision sensor

Post 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!

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

Re: Different image camera and vision sensor

Post 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

zdenoB
Posts: 7
Joined: 31 Oct 2019, 07:35

Re: Different image camera and vision sensor

Post 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.

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

Re: Different image camera and vision sensor

Post 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

zdenoB
Posts: 7
Joined: 31 Oct 2019, 07:35

Re: Different image camera and vision sensor

Post 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
Last edited by zdenoB on 30 Mar 2020, 19:16, edited 1 time in total.

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

Re: Different image camera and vision sensor

Post 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

zdenoB
Posts: 7
Joined: 31 Oct 2019, 07:35

Re: Different image camera and vision sensor

Post by zdenoB »

I've changed my code and now it works correctly.
Thank you.

Post Reply