simxReadProximitySensor not working on python & matlab

Report crashes, strange behaviour, or apparent bugs
coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: simxReadProximitySensor not working on python & matlab

Post by coppelia »

What is the return value of that function? Did you enable streaming correctly like in the link I provided?

Print the return value:

Code: Select all

[returnValue,data]=vrep.simxGetStringSignal(clientID,'myPts',vrep.simx_opmode_buffer)
Above succeeds with a return value of sim_return_ok only if you have correctly initialized streaming.

Cheers

Space
Posts: 27
Joined: 16 Nov 2015, 17:07

Re: simxReadProximitySensor not working on python & matlab

Post by Space »

Hi Coppelia,

thanks for your replay, I actually got the data and it is working.

my question is why the signal i am plotting is different that the environnement, I don't know how to attach pictures or file i could show you!!

thankvyou

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

Re: simxReadProximitySensor not working on python & matlab

Post by coppelia »

You can share files or images via dropBox or a similar service.

Cheers

Space
Posts: 27
Joined: 16 Nov 2015, 17:07

Re: simxReadProximitySensor not working on python & matlab

Post by Space »

HI Coppelia,

please find the link for the images :

https://www.dropbox.com/sh/u52apfilv4zs ... Ftjba?dl=0

Regards

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

Re: simxReadProximitySensor not working on python & matlab

Post by coppelia »

So it seems you are streaming wrong values. There are many things you could do wrong. Try first with a single point, or a small set of points you generate programmatically.

Cheers

Space
Posts: 27
Joined: 16 Nov 2015, 17:07

Re: simxReadProximitySensor not working on python & matlab

Post by Space »

Hi Coppelia,

I don't underdtand what you mean?
Does the point given are the distance or is it the x,y,z of the detected point?

Thanks for your help.

Space

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

Re: simxReadProximitySensor not working on python & matlab

Post by coppelia »

What is given or returned are the X/Y/Z coordinates. You can easily compute the distances with math.sqrt(x*x+y*y+z*z).

Cheers

Post Reply