%Set initial orientation and position
for idx1=1:num_kilobots
if idx1 == 1
vrep.simxSetObjectPosition(clientID,kilohandles(num_kilobots),-1,[-0.5,0.17,0],vrep.simx_opmode_oneshot);
%vrep.simxSetObjectOrientation(clientID,kilohandles(num_kilobots),-1, [0 0 90],vrep.simx_opmode_oneshot);
pause(5)
[returnCode,position1] = vrep.simxGetObjectPosition(clientID,kilohandles(num_kilobots),-1,vrep.simx_opmode_buffer);
[returnCode,orientation1] = vrep.simxGetObjectOrientation(clientID,kilohandles(num_kilobots),-1,vrep.simx_opmode_buffer);
disp(position1)
disp(orientation1)
end
end
START = 1;
while (START == 1)
%Turn on the joints
vrep.simxSetJointTargetVelocity(clientID,left_Motor,2,vrep.simx_opmode_blocking);
vrep.simxSetJointTargetVelocity(clientID,right_Motor,2,vrep.simx_opmode_blocking);
START=0;
end
I would like to know to make the program run perfectly because when I set the position and orientation to the robot and after it tries to move, but it's not possible, actually, it moves, but not the correct way.
Problem with set the orientation and postion using MATLAB API
-
- Posts: 6
- Joined: 23 Jul 2018, 10:50
Re: Problem with set the orientation and postion using MATLAB API
hello,
not sure what you mean when you say
Have also a look here.
Cheers
not sure what you mean when you say
...it tries to move, but it's not possible
Have also a look here.
Cheers