機(jī)器臂matlab篇

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

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

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

2.plot部分

Matlab中Tick(坐標(biāo)軸刻度)的設(shè)置及風(fēng)格

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文字標(biāo)志

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)系作者
  • 序言:七十年代末剃法,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子路鹰,更是在濱河造成了極大的恐慌贷洲,老刑警劉巖,帶你破解...
    沈念sama閱讀 217,826評論 6 506
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件晋柱,死亡現(xiàn)場離奇詭異优构,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)雁竞,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,968評論 3 395
  • 文/潘曉璐 我一進(jìn)店門钦椭,熙熙樓的掌柜王于貴愁眉苦臉地迎上來拧额,“玉大人,你說我怎么就攤上這事彪腔〗慕酰” “怎么了?”我有些...
    開封第一講書人閱讀 164,234評論 0 354
  • 文/不壞的土叔 我叫張陵德挣,是天一觀的道長恭垦。 經(jīng)常有香客問我,道長格嗅,這世上最難降的妖魔是什么番挺? 我笑而不...
    開封第一講書人閱讀 58,562評論 1 293
  • 正文 為了忘掉前任,我火速辦了婚禮吗浩,結(jié)果婚禮上建芙,老公的妹妹穿的比我還像新娘。我一直安慰自己懂扼,他們只是感情好禁荸,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,611評論 6 392
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著阀湿,像睡著了一般赶熟。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上陷嘴,一...
    開封第一講書人閱讀 51,482評論 1 302
  • 那天映砖,我揣著相機(jī)與錄音,去河邊找鬼灾挨。 笑死邑退,一個胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的劳澄。 我是一名探鬼主播地技,決...
    沈念sama閱讀 40,271評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼秒拔!你這毒婦竟也來了莫矗?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 39,166評論 0 276
  • 序言:老撾萬榮一對情侶失蹤砂缩,失蹤者是張志新(化名)和其女友劉穎作谚,沒想到半個月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體庵芭,經(jīng)...
    沈念sama閱讀 45,608評論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡妹懒,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,814評論 3 336
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了双吆。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片眨唬。...
    茶點(diǎn)故事閱讀 39,926評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡滔悉,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出单绑,到底是詐尸還是另有隱情,我是刑警寧澤曹宴,帶...
    沈念sama閱讀 35,644評論 5 346
  • 正文 年R本政府宣布搂橙,位于F島的核電站,受9級特大地震影響笛坦,放射性物質(zhì)發(fā)生泄漏区转。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,249評論 3 329
  • 文/蒙蒙 一版扩、第九天 我趴在偏房一處隱蔽的房頂上張望废离。 院中可真熱鬧,春花似錦礁芦、人聲如沸蜻韭。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,866評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽肖方。三九已至,卻和暖如春未状,著一層夾襖步出監(jiān)牢的瞬間俯画,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 32,991評論 1 269
  • 我被黑心中介騙來泰國打工司草, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留艰垂,地道東北人。 一個月前我還...
    沈念sama閱讀 48,063評論 3 370
  • 正文 我出身青樓埋虹,卻偏偏與公主長得像猜憎,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子吨岭,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,871評論 2 354

推薦閱讀更多精彩內(nèi)容