Hi,
I have made a structure in the VREP environment having two revolute joints. I connected to VREP from MATLAB using remApi functions. I have to update the joint positions from MATLAB. My MATLAB script successfully does that but as my script ends in MATLAB, the joint ("joint_right") acquires a -180 degree position in VREP and keeps that even if I change that manually from the joint properties dialog. My joint type is inverse kinematic with Hybrid Operation.
Kindly guide me what should I do.
Links to my files are as follows:
VREP file: https://drive.google.com/file/d/0B2w3mm ... sp=sharing
Matlab script: https://drive.google.com/file/d/0B2w3mm ... sp=sharing
Thanks,
Umer
Joint Position Change after Running RemApi in matlab
-
- Posts: 20
- Joined: 26 Feb 2015, 09:08
-
- Posts: 20
- Joined: 26 Feb 2015, 09:08
Re: Joint Position Change after Running RemApi in matlab
I just performed the same angular position update using a childscript in the VREP scene and it works perfectly. This means the problem is with the remApi connection.
Re: Joint Position Change after Running RemApi in matlab
Hello,
I am not really sure what you mean. But this is what I see in your Matlab code:
You are setting a joint value from the remote API via a streaming command. This doesn't make sense. You should use:
Streaming values is only to retrieve values from V-REP.
Also, if you end the connection just after you set a value, that value has high chances not to arrive anymore (if you sent it via simx_opmode_oneshot).
Cheers
I am not really sure what you mean. But this is what I see in your Matlab code:
You are setting a joint value from the remote API via a streaming command. This doesn't make sense. You should use:
Code: Select all
vrep.simxSetJointPosition(id,rleg,traj(cnt),vrep.simx_opmode_oneshot)
Also, if you end the connection just after you set a value, that value has high chances not to arrive anymore (if you sent it via simx_opmode_oneshot).
Cheers
-
- Posts: 20
- Joined: 26 Feb 2015, 09:08
Re: Joint Position Change after Running RemApi in matlab
Thank you. Found my mistake.