机器臂matlab篇

1.Matlab ——旋转矩阵,四元数,欧拉角之间的转换

Matlab ——旋转矩阵,四元数,欧拉角之间的转换
Matlab:旋转转欧拉角

matlab练习程序(旋转矩阵、欧拉角、四元数互转)

2.plot部分

Matlab中Tick(坐标轴刻度)的设置及风格

x=1:8;

subplot(2,2,1)
plot(x)
%tick style 0(auto)

subplot(2,2,2)
plot(x)
set(gca,'xtick',[1 3 6 8]);%style 指定
set(gca,'ytick',[]);%style 2  清空刻度
%set(gca,'xticklabel',[]);% 清空xticklabel

subplot(2,2,3)
plot(x)
set(gca,'xtick',[1 3 6 8]);
set(gca,'xticklabel',sprintf('%03.4f|',get(gca,'xtick')));%style 3  有效位数
set(gca,'ytick',[2 4 5 7]);
set(gca,'yticklabel',{'Two','Four','Five','Seven'});%style 4文字标志

subplot(2,2,4)
plot(x)
set(gca,'xminortick','on');%style 5 小刻度打开
set(gca,'ticklength',[0.05 0.025]);%style 6  刻度长度
set(gca,'tickdir','out');%style 7  刻度放到外围

窗口注释
annotation

//创建文本框注释
figure
plot(1:10)
dim = [.2 .5 .3 .3];
str = 'Straight Line Plot from 1 to 10';
annotation('textbox',dim,'String',str,'FitBoxToText','on');

画竖线line:
在(5,0)到(5,20)画一条黑色的虚线
line([5,5],[0,1],'linestyle','--','color','k');

SerialLink.m类方法:

%SerialLink Serial-link robot class
%
% A concrete class that represents a serial-link arm-type robot.  The
% mechanism is described using Denavit-Hartenberg parameters, one set
% per joint.
%
% Methods::
%
%  plot          display graphical representation of robot
%  plot3d        display 3D graphical model of robot
%  teach         drive the graphical robot
%  getpos        get position of graphical robot
%-
%  jtraj         a joint space trajectory
%-
%  edit          display and edit kinematic and dynamic parameters
%-
%  isspherical   test if robot has spherical wrist
%  islimit       test if robot at joint limit
%  isconfig      test robot joint configuration
%-
%  fkine         forward kinematics
%  A             link transforms
%  trchain       forward kinematics as a chain of elementary transforms
%-
%  ikine6s       inverse kinematics for 6-axis spherical wrist revolute robot
%  ikine         inverse kinematics using iterative numerical method
%  ikunc         inverse kinematics using optimisation
%  ikcon         inverse kinematics using optimisation with joint limits
%  ikine_sym     analytic inverse kinematics obtained symbolically
%-
%  jacob0        Jacobian matrix in world frame
%  jacobn        Jacobian matrix in tool frame
%  jacob_dot     Jacobian derivative
%  maniplty      manipulability
%  vellipse      display velocity ellipsoid
%  fellipse      display force ellipsoid
%  qmincon       null space motion to centre joints between limits
%-
%  accel         joint acceleration
%  coriolis      Coriolis joint force
%  dyn           show dynamic properties of links
%  friction      friction force
%  gravload      gravity joint force
%  inertia       joint inertia matrix
%  cinertia      Cartesian inertia matrix
%  nofriction    set friction parameters to zero
%  rne           inverse dynamics
%  fdyn          forward dynamics
%-
%  payload       add a payload in end-effector frame
%  perturb       randomly perturb link dynamic parameters
%  gravjac       gravity load and Jacobian
%  paycap        payload capacity
%  pay           payload effect
%-
%  sym           a symbolic version of the object
%  gencoords     symbolic generalized coordinates
%  genforces     symbolic generalized forces
%  issym         test if object is symbolic
%
% Properties (read/write)::
%
%  links      vector of Link objects (1xN)
%  gravity    direction of gravity [gx gy gz]
%  base       pose of robot's base (4x4 homog xform)
%  tool       robot's tool transform, T6 to tool tip (4x4 homog xform)
%  qlim       joint limits, [qmin qmax] (Nx2)
%  offset     kinematic joint coordinate offsets (Nx1)
%  name       name of robot, used for graphical display
%  manuf      annotation, manufacturer's name
%  comment    annotation, general comment
%  plotopt    options for plot() method (cell array)
%  fast       use MEX version of RNE.  Can only be set true if the mex
%             file exists.  Default is true.
%
% Properties (read only)::
%
%  n           number of joints
%  config      joint configuration string, eg. 'RRRRRR'
%  mdh         kinematic convention boolean (0=DH, 1=MDH)
%  theta       kinematic: joint angles (1xN)
%  d           kinematic: link offsets (1xN)
%  a           kinematic: link lengths (1xN)
%  alpha       kinematic: link twists (1xN)
%
% Overloaded operators::
%  R1*R2   concatenate two SerialLink manipulators R1 and R2
%
% Note::
%  - SerialLink is a reference object.
%  - SerialLink objects can be used in vectors and arrays
%
% Reference::
% - Robotics, Vision & Control, Chaps 7-9,
%   P. Corke, Springer 2011.
% - Robot, Modeling & Control,
%   M.Spong, S. Hutchinson & M. Vidyasagar, Wiley 2006.
%```
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 作为备用知识,memo 学过矩阵理论或者线性代数的肯定知道正交矩阵(orthogonal matrix)是一个非常...
    HappyPieBinLiu阅读 5,894评论 0 5
  • 摘录于此并修复部分图片,如涉及版权请联系删除 坐标系 为了能够科学的反映物体的运动特性,会在特定的坐标系中进行描述...
    徐凯_xp阅读 7,061评论 0 3
  • 概述 又研究了将近两个星期的3D图形到了我最想研究的地方了,因为欧拉角与四元数的原因导致OpenGL ES的研究进...
    神经骚栋阅读 7,796评论 12 40
  • 欧拉角和四元数 笔记主要摘自下列博文和回答中 如何通俗地解释欧拉角?之后为何要引入四元数? - 知乎 【Unity...
    一只浩阅读 1,118评论 0 0
  • 也许有一天 可以看清你的脸 而不用透过污浊的空气 也许有一天 可以与你在清澈的河边走走 而不至于想要安静而无处可去...
    李欢期阅读 109评论 0 1