機器臂matlab篇

1.Matlab ——旋轉(zhuǎn)矩陣,四元數(shù),歐拉角之間的轉(zhuǎn)換

Matlab ——旋轉(zhuǎn)矩陣,四元數(shù),歐拉角之間的轉(zhuǎn)換
Matlab:旋轉(zhuǎn)轉(zhuǎn)歐拉角

matlab練習程序(旋轉(zhuǎn)矩陣、歐拉角、四元數(shù)互轉(zhuǎn))

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  有效位數(shù)
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

//創(chuàng)建文本框注釋
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.
%```
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關(guān)閱讀更多精彩內(nèi)容

  • 作為備用知識,memo 學過矩陣理論或者線性代數(shù)的肯定知道正交矩陣(orthogonal matrix)是一個非常...
    HappyPieBinLiu閱讀 6,184評論 0 5
  • 摘錄于此并修復部分圖片,如涉及版權(quán)請聯(lián)系刪除 坐標系 為了能夠科學的反映物體的運動特性,會在特定的坐標系中進行描述...
    徐凱_xp閱讀 7,390評論 0 3
  • 概述 又研究了將近兩個星期的3D圖形到了我最想研究的地方了,因為歐拉角與四元數(shù)的原因?qū)е翺penGL ES的研究進...
    神經(jīng)騷棟閱讀 8,020評論 12 40
  • 歐拉角和四元數(shù) 筆記主要摘自下列博文和回答中 如何通俗地解釋歐拉角?之后為何要引入四元數(shù)? - 知乎 【Unity...
    一只浩閱讀 1,215評論 0 0
  • 也許有一天 可以看清你的臉 而不用透過污濁的空氣 也許有一天 可以與你在清澈的河邊走走 而不至于想要安靜而無處可去...
    李歡期閱讀 126評論 0 1

友情鏈接更多精彩內(nèi)容