Earlier today, I was watching this video and at the exact time I where I gave link, the tutor gets sensor read data from Python. But when I try to get sensor data with command
I get the errorCode variable as 3 and sensor1 value as 0 which is as I understand because no values have been returned (1) and then request timed out (2) = 3. There is a cuboid which is far an adequate distance from the Pioneer p3dx which is Renderable, Collidable and Detectable (by all sensors).
Code: Select all
errorCode,sensor1=vrep.simxGetObjectHandle(clientID, 'Pioneer_p3dx_ultrasonicSensor1', vrep.simx_opmode_oneshot_wait)
I have tried replace cuboid if it is neither too close nor too far, checked if sensors work in simulation if there is a slight chance of simulation error, checked my setup as I can but couldn't find a solution, unfortunately.
This is a screenshot of the sim: http://i.imgur.com/oxRxSpV.jpg
Is there anyone who has had this issue or know what may cause no-value return to occur?
Thanks in advance,
EDIT: I don't know how but after resetting Renderable/Collidable/Detectable properties the issue was fixed, but after reverting it was still fixed too. Couldn't find what was wrong but seems like the procedure I wrote above wasn't faulty, so this post should not be misleading.