## Can V-REP simulate a robot dynamics equation?

Typically: "How do I... ", "How can I... " questions
youngsea
Posts: 18
Joined: 11 Apr 2016, 12:40

### Can V-REP simulate a robot dynamics equation?

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.

coppelia
Posts: 8828
Joined: 14 Dec 2012, 00:25

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

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

youngsea
Posts: 18
Joined: 11 Apr 2016, 12:40

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

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.

coppelia