Vision sensor picking up shapes even though their visibility layers are all off

Typically: "How do I... ", "How can I... " questions
Post Reply
cleu892
Posts: 14
Joined: 16 May 2022, 13:09

Vision sensor picking up shapes even though their visibility layers are all off

Post by cleu892 »

Hello,

I have built a custom robot in CoppeliaSim by first creating the base shapes and joints in CoppeliaSim, and then importing my CAD files of the robot as meshes and putting them on top of the base robot. I have hidden the base robot (unticked all of the camera visibility layers for every part that I want to hide) so that only the detailed CAD robot is shown.

When I look at my DefaultCamera, I can not see any of my hidden shapes. However, my vision sensor is still picking up the shapes of the basic model - how should I go about hiding them from this sensor? I read some previous posts and have made my vision sensor "explicit handling" and added a child script with:

Code: Select all

function sysCall_init()
    -- do some initialization here
        h=sim.getObjectHandle(sim.handle_self)
end

function sysCall_sensing()
    -- put your sensing code here
    sim.handleVisionSensor(h)
end
But wasn't quite sure where to go from here, or if this was relevant.

Thanks!

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

Re: Vision sensor picking up shapes even though their visibility layers are all off

Post by coppelia »

Hello,

what CoppeliaSim version are you using?

Cheers

cleu892
Posts: 14
Joined: 16 May 2022, 13:09

Re: Vision sensor picking up shapes even though their visibility layers are all off

Post by cleu892 »

Hi,

I am using Version 4.3.0 (Rev 3) built Feb 11 2022.

Cheers

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

Re: Vision sensor picking up shapes even though their visibility layers are all off

Post by coppelia »

That is strange: vision sensors should see the same shapes as cameras. In the past, there was a renderable flag specific to vision sensors. Can you share the scene file, so that we can have a look at it?

Cheers


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

Re: Vision sensor picking up shapes even though their visibility layers are all off

Post by coppelia »

You have 5 vision sensors in the scene. All appear to be operating as expected... i.e. not seeing any hidden shapes.

Can you tell me: 1) which sensor is not operating as expected, and 2) what is the expected image from that sensor?

Edit: now I see it. You have revision 3. Please download revision 5 from here, that should fix the problem

Cheers

cleu892
Posts: 14
Joined: 16 May 2022, 13:09

Re: Vision sensor picking up shapes even though their visibility layers are all off

Post by cleu892 »

Hi again,

Thank you very much! I will do that.

Cheers~

cleu892
Posts: 14
Joined: 16 May 2022, 13:09

Re: Vision sensor picking up shapes even though their visibility layers are all off

Post by cleu892 »

Hi there, just a follow up question, how do I use the CoppeliaSim_Edu_V4_3_0_rev5_macOS10_15 folder from the link you've sent earlier? Do I need to move it somewhere or download something else before my CoppeliaSim updated to Rev 5?
Cheers

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

Re: Vision sensor picking up shapes even though their visibility layers are all off

Post by coppelia »

Simply download the last CoppeliaSim package from here. Now we have rev. 10. Remove your previous installation beforehand.

Cheers

Post Reply