Vision sensor does not detect objects

Typically: "How do I... ", "How can I... " questions
Post Reply
Bellinsbauer
Posts: 21
Joined: 22 Apr 2018, 07:44

Vision sensor does not detect objects

Post by Bellinsbauer »

Hello,
I was trying to understand how a vision sensor works. I saw plenty of topics about this and I found something interesting in this model: http://www.coppeliarobotics.com/scenesA ... sition.ttm. My goal is to use the vision sensor to extract x,y and z coordinates of an object. My question is: why the vision sensor in the scene is able to detect the drawn sphere and not a primitive shape when i insert it? Because I tried to delete the portion of code related with the drawn sphere and to add a new object ( another renderable sphere) but the vision sensor seems to retrieve always the coordinates of the previous sphere that has been eliminated. Probably I am wrong with something but I can't understand.
Best regards

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

Re: Vision sensor does not detect objects

Post by coppelia »

Hello,

I am not sure I understand what you mean. If you associate the vision sensor with a floating view and look at the output, does the sphere appear there? Are you sure the sphere is renderable?
Maybe you can post your scene?

Cheers

Bellinsbauer
Posts: 21
Joined: 22 Apr 2018, 07:44

Re: Vision sensor does not detect objects

Post by Bellinsbauer »

https://www.dropbox.com/s/qg4wy8tmiaam0 ... e.ttt?dl=0 I'm sure the sphere is renderable . I try to clarify what I mean. In the original file there are some code lines that allow to draw a sphere. The script shows which are the coordinates of this drawn sphere. If I delete these lines of code where I create the sphere and I add a new primitive shape ( add --> primitive shape-->sphere) I still obtain the coordinates of the previous drawn sphere even if I move my added sphere in a different point of the scene.

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

Re: Vision sensor does not detect objects

Post by coppelia »

Select the vision sensor and associate it with a floating view. Then you will see what happens: the vision sensor will make a blob detection that will include the sphere but also the floor in front of it. Then the script will compute the 3D coordinate of the center of the blob.

You can select the floor, and in its model dialog, click Model is not renderable. Then your floor will be ignored by the vision sensor.

Cheers

Post Reply