1.Matlab ——旋转矩阵,四元数,欧拉角之间的转换
2.plot部分
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.
%```