I'm working with pioneer p3dx. I want to control it with remote API ( matlab ). I designed a map with some obstacles in V-REP. I'm taking a picture when simulation start and sending it to Matlab. Matlab is creating path using Breadth First Algoritm. Everything is working well until this point. When I use 'simxSetJointPosition' code it just doesn't work. wheels are not turning. I couldn't understand my fault. It could be very simple but as I said I'm new at V-REP.
P.S. Motors are working Force/Torque Mode. In matlab I see returnCode 0.
Here is my simulation link: https://www.dropbox.com/s/i0npo07olb2l3 ... p.ttt?dl=0
And here is my Matlab code for movement:
Code: Select all
vrep=remApi('remoteApi'); vrep.simxFinish(-1); clientID=vrep.simxStart('127.0.0.1',19999,true,true,5000,5); if (clientID>-1) disp('Connected') [returnCode,sol_teker]=vrep.simxGetObjectHandle(clientID,'Pioneer_p3dx_leftMotor',vrep.simx_opmode_oneshot_wait); [returnCode,sag_teker]=vrep.simxGetObjectHandle(clientID,'Pioneer_p3dx_rightMotor',vrep.simx_opmode_oneshot_wait); for i=1:500 i [returnCode]=vrep.simxSetJointPosition(clientID,sol_teker,i*pi,vrep.simx_opmode_oneshot) i pause end end vrep.delete();