当前位置:网站首页>Introduction to robotics I. spatial transformation (1) posture, transformation

Introduction to robotics I. spatial transformation (1) posture, transformation

2022-07-06 00:52:00 RuiH. AI

Preface

Due to the close relationship between visual servo and manipulator , Therefore, we should start from the foundation , Record the robot kinematics .

This paper records the position and posture of rigid bodies . actually , Spatial transformation in SLAM It has been mentioned once in the column , However, the introduction to robotics gives a more detailed description of rigid body motion .

Coordinate system

There are usually two coordinate systems , One is the world coordinate system for reference ( Cartesian coordinate system ), One is the rigid body coordinate system with the center of mass of the rigid body as the origin .

The robot coordinate system follows the right-hand rule , As shown in the figure below
 Insert picture description here

Postures

Posture is position and posture , Corresponding displacement and rotation . The position and posture of the robot must be referred to the world coordinate system .

Posture represents the relationship between reference systems .

Location

The position of the rigid body is represented by a vector .
 Insert picture description here
There is a point in the figure above P P P, In a coordinate system { A } \{A\} { A} For reference , You can put the vector O P OP OP To express A P ^AP AP The location of , Its left superscript indicates the reference system . A P ^AP AP The coordinates of are expressed as :
A P = [ p x , p y , p z ] T ^AP = [p_x,p_y,p_z]^T AP=[px,py,pz]T

Posture

The attitude of the rigid body is represented by the unit vector of the three principal axes of the rigid body coordinate system in the reference system .

 Insert picture description here
Above picture , X ^ B , Y ^ B , Z ^ B \hat X_B,\hat Y_B, \hat Z_B X^B,Y^B,Z^B Represents the unit vector of the three principal axes of the rigid body in the upper right corner , They are in the frame of reference { A } \{A\} { A} The expression of in is A X ^ B , A Y ^ B , A Z ^ B ^A\hat X_B, ^A\hat Y_B, ^A\hat Z_B AX^B,AY^B,AZ^B. These three unit vectors form the rotation matrix :
B A R = ( A X ^ B A Y ^ B A Z ^ B ) ^A_BR=(^A\hat X_B \quad ^A\hat Y_B \quad ^A\hat Z_B) BAR=(AX^BAY^BAZ^B)

So how to calculate the coordinates of the principal axis unit vector of the rigid body in the reference system ?

With A X ^ B ^A\hat X_B AX^B For example , Its x The value of the coordinate is actually A X ^ B ^A\hat X_B AX^B In the frame of reference X The projection on the axis ,y, z The coordinates are in the reference system Y, Z The projection on the axis :
B A R = ( A X ^ B A Y ^ B A Z ^ B ) = [ X ^ B ⋅ X ^ A Y ^ B ⋅ X ^ A Z ^ B ⋅ X ^ A X ^ B ⋅ Y ^ A Y ^ B ⋅ Y ^ A Z ^ B ⋅ Y ^ A X ^ B ⋅ Z ^ A Y ^ B ⋅ Y ^ A Z ^ B ⋅ X ^ A ] ^A_BR=(^A\hat X_B \quad ^A\hat Y_B \quad ^A\hat Z_B) = \begin{bmatrix} \hat X_B \cdot \hat X_A & \hat Y_B \cdot \hat X_A & \hat Z_B \cdot \hat X_A\\ \hat X_B \cdot \hat Y_A & \hat Y_B \cdot \hat Y_A & \hat Z_B \cdot \hat Y_A\\ \hat X_B \cdot \hat Z_A & \hat Y_B \cdot \hat Y_A & \hat Z_B \cdot \hat X_A\\ \end{bmatrix} BAR=(AX^BAY^BAZ^B)=X^BX^AX^BY^AX^BZ^AY^BX^AY^BY^AY^BY^AZ^BX^AZ^BY^AZ^BX^A

The rotation matrix is an orthogonal matrix , The proof is simple :
B A R T   B A R = [ A X ^ B T A Y ^ B T A Z ^ B T ] ( A X ^ B A Y ^ B A Z ^ B ) = I 3 ^A_BR^T\ ^A_B R= \begin{bmatrix} ^A\hat X^T_B \\ ^A\hat Y^T_B \\ ^A\hat Z^T_B \end{bmatrix} (^A\hat X_B \quad ^A\hat Y_B \quad ^A\hat Z_B) = I_3 BART BAR=AX^BTAY^BTAZ^BT(AX^BAY^BAZ^B)=I3
The inner product of the unit vector in the same direction is 1, The inner product of mutually perpendicular unit vectors is 0, therefore A X ^ B T   A X ^ B = 1 , A X ^ B T   A Y ^ B = 0 ^A\hat X^T_B \ ^A\hat X_B=1, ^A\hat X^T_B \ ^A\hat Y_B=0 AX^BT AX^B=1,AX^BT AY^B=0, So we can get the identity matrix above .

Pose transformation

Pose transformation refers to the change of the position and pose of the rigid body coordinate system , Translation and rotation , Get the relative pose between the rigid system and the reference system

Still in order to 2-2 For example , The pose transformation of rigid body coordinate system relative to reference system can be expressed as :
{ B A R ,   A P B O R G } \{^A_B R, \ ^AP_{BORG} \} { BAR, APBORG}
That is to say SLAM In the fourteenth lecture R , t R,t R,t

mapping

Mapping represents the coordinate transformation of the same point between different coordinate systems .

Mapping includes translation and rotation .

translation

Translation is related to the position of the origin of the rigid body coordinate system .
 Insert picture description here
Above picture , It is known that B P ^BP BP Indication point P In the coordinate system { B } \{B\} { B} Position in , A P B O R G ^AP_{BORG} APBORG Expressed in the reference system { A } \{A\} { A} Next { B } \{B\} { B} The position of the origin . be A P ^AP AP Can be expressed as :
A P =   B P +   A P B O R G ^AP= \ ^BP + \ ^AP_{BORG} AP= BP+ APBORG

Only when the attitude of the two coordinate systems is the same , To perform the above translation .

rotate

Rotation is related to the attitude of the rigid body coordinate system .

 Insert picture description here
Above picture , It is known that B P ^BP BP Indication point P In the coordinate system { B } \{B\} { B} Position in . A P ^AP AP Expressed in the reference system { A } \{A\} { A} The next position , Vector A P ^AP AP In the direction of the principal axis of the reference system X ^ A , Y ^ A , Z ^ A \hat X_A, \hat Y_A, \hat Z_A X^A,Y^A,Z^A The projection of ( Unit vector inner product ). Besides , We know , The inner product of a vector needs to be expressed in the same coordinate system to be meaningful . be A P ^AP AP Can be expressed as :
A P = [ B X ^ A ⋅   B P B Y ^ A ⋅   B P B Z ^ A ⋅   B P ] =   B A R   B P ^AP= \begin{bmatrix} ^B \hat X_A \cdot\ ^BP & ^B \hat Y_A \cdot\ ^BP & ^B \hat Z_A \cdot\ ^BP \end{bmatrix} = \ ^A_BR \ ^BP AP=[BX^A BPBY^A BPBZ^A BP]= BAR BP

Transformation

Transformation = Spin first , Back translation .

 Insert picture description here
Above picture , Need to use B P ^BP BP Express A P ^AP AP. First of all, will B P ^BP BP Map to an intermediate coordinate system { B ′ } \{B'\} { B}, The attitude of this coordinate system is consistent with { A } \{A\} { A} identical , Origin and { B } \{B\} { B} identical . And then use B ′ P ^{B'}P BP Express A P ^AP AP
A P =   B ′ P +   A P B ′ O R G =   B B ′ R   B P +   A P B ′ O R G =   B A R   B P +   A P B O R G ^AP = \ ^{B'}P + \ ^AP_{B'ORG} = \ ^{B'}_BR \ ^BP + \ ^AP_{B'ORG} = \ ^{A}_BR \ ^BP + \ ^AP_{BORG} AP= BP+ APBORG= BBR BP+ APBORG= BAR BP+ APBORG
It corresponds to SLAM In the fourteenth lecture P ′ = R P + t P'=RP+t P=RP+t

Introduce homogeneous matrix , There is the concept of transformation matrix :
[ A P 1 ] = [   B A R A P B O R G 0 1 ] [   B P 1 ] A P =   B A T   B P \begin{bmatrix} ^AP \\ 1 \\ \end{bmatrix} = \begin{bmatrix} \ ^A_BR & ^AP_{BORG} \\ {\bf 0} & 1 \\ \end{bmatrix} \begin{bmatrix} \ ^BP \\ 1 \\ \end{bmatrix} \\ \quad \\ \\ \quad \\ ^AP = \ ^A_BT \ ^BP [AP1]=[ BAR0APBORG1][ BP1]AP= BAT BP

Composite transformation

If known B A T ,   C B T ^A_B T, \ ^B_CT BAT, CBT, You can use the C P ^CP CP Express A P ^AP AP
A P = B A T   C B T   C P ^AP = ^A_BT \ ^B_CT \ ^CP AP=BAT CBT CP

inverse transformation

Inverse of rotation matrix :
B A R =   A B R T ^A_B R = \ ^B_AR^T BAR= ABRT

Inverse of transformation matrix :
[   B A R T − B A R T   A P B O R G 0 1 ] \begin{bmatrix} \ ^A_BR^T & -^A_BR^T\ ^AP_{BORG} \\ {\bf 0} & 1 \\ \end{bmatrix} [ BART0BART APBORG1]
There are two ways to find the inverse of a transformation matrix , One is to find the inverse of the matrix directly ; The other is to find the inverse through the transformation property . Introduce the latter .

 Insert picture description here
If known A P ^AP AP seek B P ^BP BP, Yes :
B P =   A B R   A P +   B P A O R G ^BP = \ ^B_AR \ ^AP + \ ^BP_{AORG} BP= ABR AP+ BPAORG
If A P ^AP AP yes { B } \{B\} { B} The origin of , namely :
0 = B P B O R G = A B R   A P B O R G +   B P A O R G   B P A O R G = − A B R   A P B O R G = − B A R T   A P B O R G   B P =   B A R T   A P −   B A R T   A P B O R G {\bf 0} = ^BP_{BORG} = ^B_AR \ ^AP_{BORG} + \ ^BP_{AORG} \\ \quad \\ \ ^BP_{AORG} = - ^B_AR \ ^AP_{BORG} = -^A_BR^T \ ^AP_{BORG} \\ \quad \\ \ ^BP = \ ^A_BR^T \ ^AP - \ ^A_BR^T \ ^AP_{BORG} 0=BPBORG=ABR APBORG+ BPAORG BPAORG=ABR APBORG=BART APBORG BP= BART AP BART APBORG

Postscript

This article is actually SLAM The clearer expression method of posture transformation in Lecture 14 , The reference system is placed on the left superscript .

原网站

版权声明
本文为[RuiH. AI]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140206416501.html