I am using matlab and python to simulate the navigation of my robot a pioneer p3dx.
for this, i added a Sick 2D laser on the robot but each time i try to get the data from it it returns 0.
before you ask, the connection with Vrep is working as i get the handle value of the laser and my version of python is 2.7 and matlab 2010, see below :
Code: Select all
[~,laserScannerHandle] = vrep.simxGetObjectHandle(clientID,'LaserScanner_2D',vrep.simx_opmode_oneshot_wait);
for t =1:0.1:200
[~,detectionState,detectedPointL,detectedObjectHandle,detectedSurfaceNormalVector] = vrep.simxReadProximitySensor(clientID,laserScannerHandle,vrep.simx_opmode_streaming);
[~,detectionState,detectedPointL,detectedObjectHandle,detectedSurfaceNormalVector] = vrep.simxReadProximitySensor(clientID,laserScannerHandle,vrep.simx_opmode_buffer)