The problem about simxReadProximitySensor on Pioneer_p3dx

Typically: "How do I... ", "How can I... " questions
Post Reply
happyay
Posts: 2
Joined: 24 Jan 2021, 17:26

The problem about simxReadProximitySensor on Pioneer_p3dx

Post by happyay »

Hi,
I make some simulate using Pioneer_p3dx in Python. The connection and contronling the Pioneer_p3dx are ok, when i use the sensing function ,the codes as follow is right sometimes and is wrong sometimes.

errorCode,sensor1=sim.simxGetObjectHandle(clientId,'Pioneer_p3dx_ultrasonicSensor1',sim.simx_opmode_blocking)#it is wrong always if it use ontshot_wait mode

errorCode,detectionState,detectedPoint,detectedObjectHandle,_=sim.simxReadProximitySensor(clientId,sensor1,sim.simx_opmode_streaming)

errorCode,detectionState,detectedPoint,detectedObjectHandle,_=sim.simxReadProximitySensor(clientId,sensor1,sim.simx_opmode_buffer)

I want know why?

Best regards,
happyay

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

Re: The problem about simxReadProximitySensor on Pioneer_p3dx

Post by coppelia »

Not sure I understand which is executing correctly and which not, according to you.

In any case, that's not how you use data streaming with the legacy remote API.

Cheers

happyay
Posts: 2
Joined: 24 Jan 2021, 17:26

Re: The problem about simxReadProximitySensor on Pioneer_p3dx

Post by happyay »

Thank you very much, the problem had solved on your help.

Post Reply