当前位置:网站首页>Robot toolbox matlab robotics toolbox

Robot toolbox matlab robotics toolbox

2022-06-24 16:43:00 ZC_ Robot robotics

1 First detection Matlab Toolbox already installed in , use “ver” command MATLAB edition 9.9 (R2020b) Simulink edition 10.2 (R2020b) Computer Vision Toolbox edition 9.3 (R2020b) Control System Toolbox edition 10.9 (R2020b) Curve Fitting Toolbox edition 3.5.12 (R2020b) Data Acquisition Toolbox edition 4.2 (R2020b) Deep Learning Toolbox edition 14.1 (R2020b) Global Optimization Toolbox edition 4.4 (R2020b) Image Acquisition Toolbox edition 6.3 (R2020b) Image Processing Toolbox edition 11.2 (R2020b) MATLAB Coder edition 5.1 (R2020b) Machine Vision Toolbox for MATLAB edition 4.3 Model Predictive Control Toolbox edition 7.0 (R2020b) Optimization Toolbox edition 9.0 (R2020b) Parallel Computing Toolbox edition 7.3 (R2020b) Partial Differential Equation Toolbox edition 3.5 (R2020b) Robotics System Toolbox edition 3.2 (R2020b) Robotics Toolbox for MATLAB edition 10.4 Robust Control Toolbox edition 6.9 (R2020b) Signal Processing Toolbox edition 8.5 (R2020b) Simscape edition 5.0 (R2020b) Simscape Multibody edition 7.2 (R2020b) Simulink Coder edition 9.4 (R2020b) Simulink Control Design edition 5.6 (R2020b) Simulink Design Optimization edition 3.9 (R2020b) Stateflow edition 10.3 (R2020b) Statistics and Machine Learning Toolbox edition 12.0 (R2020b) Symbolic Math Toolbox edition 8.6 (R2020b) YALMIP edition 3 (R2009b)

2 With UR5 As an example , The specific modeling and simulation are as follows :

UR5

Use instructions mdl_ur5 -> ur5 You can get :

UR5 Model parameters

3 Robot position and posture transformation , First, take the plane pose transformation as an example

T = SE2(x, y, theta); % x、y For offset ,theta For the angle of rotation

trplot2(T); % Draw T Coordinate system

T = transl2(x, y); % Pure translation transformation

x=100;
y=200;
n=0;
for theta=0:0.1:pi/3
    T = SE2(x, y, theta);
    trplot2(T);                    %  Draw T Coordinate system 
    pause(0.5);
    grid on
    hold on
    n=n+1;
end

The specific operation results are as follows

Coordinate transformation - Plane

% rotx(alpha), roty(beta), rotz(theta); % Around the xyz Rotation matrix of axis rotation (3x3)

% trplot(T); % Draw the corresponding rotation coordinate system

% tranimate(T); % Rotate animation

% transl( [x, y, z] ); % Translation transformation (4x4)

% trotx(theta), troty(theta), trotz(theta); % There is only rotation around xyz Homogeneous transformation matrix of axis rotation (4x4)

alpha=pi/3;
beta=pi/4;
theta=pi/2;
rotx(alpha)
roty(beta)
rotz(theta)

The running results are as follows

ans =
    1.0000         0         0
         0    0.5000   -0.8660
         0    0.8660    0.5000
ans =
    0.7071         0    0.7071
         0    1.0000         0
   -0.7071         0    0.7071
ans =
     0    -1     0
     1     0     0
     0     0     1

4 UR5 test

mdl_ur5
ur5
ur5.teach                                        %  Manipulator control interface     
UR5 Demonstration
mdl_ur5
ur5
q=[0;-pi/3;-pi/4;pi/3;-pi/3;pi/3];
ur5.plot( [q(1), q(2), q(3), q(4),q(5),q(6)] )     
    %  Draw the mechanical arm ,theta Is the initial angle of the joint 
In a particular configuration UR5
q=[0;-pi/3;-pi/4;pi/3;-pi/3;pi/3];
T1=ur5.fkine( [q(1), q(2), q(3), q(4),q(5),q(6)] )     
ur5.ikine6s(T1);  %  Closed form solution of inverse kinematics   
ur5.ikine(T1,q);%  Numerical solution of inverse kinematics     

The forward kinematics of the robot can be obtained from the above , Furthermore, the Cartesian transformation matrix of the robot is :

T1 = 
    0.7891    0.0474    0.6124   -0.1275
    0.4330   -0.7500   -0.5000   -0.1503
    0.4356    0.6597   -0.6124    0.7191
         0         0         0         1

ur5.ikine6s(T1); % Closed form solution of inverse kinematics

Instead, it leads to calculation errors

Inverse kinematics solution

qS=ur5.ikine(T1,q);% Numerical solution of inverse kinematics The calculation of can get :

qS =
    0.0000   -1.0472   -0.7854    1.0472   -1.0472    1.0472


To be continued

原网站

版权声明
本文为[ZC_ Robot robotics]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/04/20210409205859604V.html