Page 1 of 1

Can V-REP simulate a robot dynamics equation?

Posted: 11 Apr 2017, 08:34
by youngsea
Hi~
The differential equations that describe the movement of a robotic arm can be written in the following form:
M(q) * q_ddot + C(q,q_dot) * q_dot + G(q) = τ
Can the inertia matric M , coriolis and centripedal forces matrix C and the gravity vector G be set in V-REP?
And then I use MATLAB to input a torque which is a function of time.
According to the above equation,the robot in V-REP will move.
Finally I can record the joint angle by the function vrep.simxGetJointPosition() in MATLAB.

Re: Can V-REP simulate a robot dynamics equation?

Posted: 12 Apr 2017, 08:19
by coppelia
Hello,

for each shape, you can set a mass and an inertia matrix in this dialog. Beware however that the principal moment of inertia or the inertia is divided by the mass in the dialog (to have mass and inertia independent).
The gravity vector can be adjusted in this dialog.

Above values can also be adjusted programmatically.

Cheers

Re: Can V-REP simulate a robot dynamics equation?

Posted: 12 Apr 2017, 13:17
by youngsea
Thanks~
What about the torque?How can I set it by MATLAB?

Code: Select all

vrep.simxSetJointForce(clientID,joint1,force,vrep.simx_opmode_oneshot);
The above code seems to have only set the maximum joint torque.

Re: Can V-REP simulate a robot dynamics equation?

Posted: 13 Apr 2017, 13:02
by coppelia
simxSetJointForce is the function you should use. For torque control, make sure that the target joint velocity is quite high (simxSetJointTargetVelocity).

Cheers