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?

Postby youngsea » 11 Apr 2017, 08:34

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
Site Admin
Posts: 6047
Joined: 14 Dec 2012, 00:25

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

Postby coppelia » 12 Apr 2017, 08:19

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?

Postby youngsea » 12 Apr 2017, 13:17

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
Site Admin
Posts: 6047
Joined: 14 Dec 2012, 00:25

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

Postby coppelia » 13 Apr 2017, 13:02

simxSetJointForce is the function you should use. For torque control, make sure that the target joint velocity is quite high (simxSetJointTargetVelocity).

Cheers


Return to “General questions”

Who is online

Users browsing this forum: Baidu [Spider] and 20 guests