MATLAB机器人仿真(一)
Contents
[NOTE] Updated September 24, 2021. This article may have outdated content or subject matter.
二维空间姿态描述
>> T1 = SE2(1,2,30*pi/180)
T1 =
0.8660 -0.5000 1
0.5000 0.8660 2
0 0 1
>> axis([0 5 0 5])
>> trplot2(T1,'frame','1','color','b')
>> T2 = SE2(2,1,0)
T2 =
1 0 2
0 1 1
0 0 1
>> hold on
>> trplot2(T2,'frame','2','color','r')
>> T3 = T1 * T2
T3 =
0.8660 -0.5000 2.232
0.5000 0.8660 3.866
0 0 1
>> trplot2(T3,'frame','3','color','g')
>> T4 = T2 * T1
T4 =
0.8660 -0.5000 3
0.5000 0.8660 3
0 0 1
>> trplot2(T4,'frame','4','color','c')
三维空间姿态描述
>> R = rotx(pi/2)
* roty(pi/2))
>> R =
1.0000 0 0
0 0.9996 -0.0274
0 0.0274 0.9996
* roty(pi/2))
↑
Invalid use of operator.
>> R = rotx(pi/2) * roty(pi/2)
R =
0.9996 0 0.0274
0.0008 0.9996 -0.0274
-0.0274 0.0274 0.9992
>> trplot(R)
>> R = roty(pi/2) * rotx(pi/2)
R =
0.9996 0.0008 0.0274
0 0.9996 -0.0274
-0.0274 0.0274 0.9992
>> trplot(R)
>> tranimate(R)
>> R=R*transl(0,1,0)
R =
1.0000 0 0 0
0 0.9996 -0.0274 0.9996
0 0.0274 0.9996 0.0274
0 0 0 1.0000
>> tranimate(R)
>> tranimate(R)
>> R=R*transl(0,1,0)*transl(1,0,0)
R =
1.0000 0 0 1.0000
0 0.9996 -0.0274 1.9992
0 0.0274 0.9996 0.0548
0 0 0 1.0000
>> tranimate(R)
Author w0x7ce
LastMod 2021-09-24