How to get the position coordinates of an object using vision sensor and proximity sensor with remote api

Typically: "How do I... ", "How can I... " questions
Post Reply
Aadhithya K
Posts: 9
Joined: 05 Apr 2021, 16:26

How to get the position coordinates of an object using vision sensor and proximity sensor with remote api

Post by Aadhithya K »

I have to detect an object using a vision and proximity sensor which is attached to a model. Using the sensors I have to get the coordinates of the object detected using vision sensor.
After detecting the object and getting its coordinates I have to move the model towards it by planning a path. (which needs to be done during simulation through the remote api)

I am new to CoppeliaSim and do not know if we need both the sensors or the vision sensor is enough.
I use the remote api and detect the object using Yolov4 model in python.
I would like to get the coordinates and pass them to the python program using remote api.


Thanks in advance
Aadhithya K

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

Re: How to get the position coordinates of an object using vision sensor and proximity sensor with remote api

Post by coppelia »

Hello,

first you need to be able to extract a coordinate from your model, that you are trying to detect. There are many different ways of doing this, and the task is not always obvious. Using a vision sensor, have a look at the demo model located in Models/components/sensors/Blob to 3D position.ttm

You can't do above task directly from your remote API client, but your remote API client (I am guessing you are using the legacy remote API client) can call simxCallScriptFunction, which in its turn can handle the detection, or data retrieval.

Cheers

Post Reply