Matlab Robotics Toolbox系列—使用篇(7)

Chapter 7 Forward Dynamics

% 正向动力学是在给定关节位置、速度以及力矩的情况下计算其加速度?

>> mdl_puma560

 

假定puma位于qz位置,该臂形下关节力矩为0,此时各关节加速度可计算。

% zeros用于建立一个零矩阵,zeros(m,n) mxn 零矩阵

>> p560.accel(qz, zeros(1,6), zeros(1,6))

 

ans =

 

   -0.2462

   -8.6829

    3.1462

    0.0021

    0.0603

0.0001

 

% 整合机器人动力学,并计时, fdyn(时间间隔,用户提供的控制功能 ,起始臂形)

>> tic

>> [t q qd] = p560.nofriction().fdyn(10, [], qz);

>> toc

% 输出运动与时间关系

>> subplot(3,1,1)

>> plot(t,q(:,1))

>> xlabel('Time (s)');

>> ylabel('Joint 1 (rad)')

 

>> subplot(3,1,2)

>> plot(t,q(:,2))

>> xlabel('Time (s)');

>> ylabel('Joint 2 (rad)')

 

>> subplot(3,1,3)

>> plot(t,q(:,3))

>> xlabel('Time (s)');

>> ylabel('Joint 3 (rad)')

 

% 单受重力影响下机械臂的运动

>> p560.plot(q)


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值