Getting errors with code for peter corke

I used petercorke to calculate joint torque with the following command. tau = R.rne(q, qd, qdd, grav, fext)
The following is my code and I got the following error even though I put m,rm,I information
Can you guys help me with this issue?
Error using SerialLink/rne_dh (line 46)
dynamic parameters (m, r, I) not set in link 1
L(1) = Link([0 0.11494 0 pi/2], 'standard', 'I', [0.0000883 0.00016261 0.00017855], 'm', 0.13, 'r', [0.00066653 0.00499854 0.06238723]);
L(2) = Link([0 0 0.13990619 0], 'standard', 'I', [0.0000883 0.00081990 0.00099097], 'm', 0.29765525, 'r', [0.00367492 0.01854848 0.06979806]);
L(3) = Link([0 0 0.25250579 0], 'standard', 'I', [0.00012668 0.00123639 0.00125373], 'm', 0.26643896, 'r', [0.00123746 0.00124098 0.11722665]);
R = SerialLink(L,'name', 'My Robot');
q = [0 pi/2 0];
qd = [0.001 0.001 0.001];
qdd = [0 0 0];
grav = [0 0 -9.81];
fext = [0 -10 0 0 0 0];
R.plot(q);
tau = R.rne(q, qd, qdd, grav, fext)

回答(1 个)

use
L(1).then tab and choose your parameter

1 个评论

Could you expand on this answer please? I am facing a similar problem

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Multibody Dynamics 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by