当前位置:网站首页>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】
Introduction to Robotics One 、 Spatial transformation (1) Postures
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
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 .
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 .
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^B⋅X^AX^B⋅Y^AX^B⋅Z^AY^B⋅X^AY^B⋅Y^AY^B⋅Y^AZ^B⋅X^AZ^B⋅Y^AZ^B⋅X^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 .
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 .
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 .
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 B′P 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= B′P+ APB′ORG= BB′R BP+ APB′ORG= 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} [ BART0−BART 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 .
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 .
边栏推荐
- curlpost-php
- The third season of ape table school is about to launch, opening a new vision for developers under the wave of going to sea
- Intranet Security Learning (V) -- domain horizontal: SPN & RDP & Cobalt strike
- 猿桌派第三季开播在即,打开出海浪潮下的开发者新视野
- Ffmpeg captures RTSP images for image analysis
- Power Query数据格式的转换、拆分合并提取、删除重复项、删除错误、转置与反转、透视和逆透视
- Starting from 1.5, build a micro Service Framework - call chain tracking traceid
- Spark SQL null value, Nan judgment and processing
- 95后CV工程师晒出工资单,狠补了这个,真香...
- Model analysis of establishment time and holding time
猜你喜欢
Cve-2017-11882 reappearance
可恢复保险丝特性测试
Convert binary search tree into cumulative tree (reverse middle order traversal)
[groovy] XML serialization (use markupbuilder to generate XML data | set XML tag content | set XML tag attributes)
Data analysis thinking analysis methods and business knowledge -- analysis methods (II)
Illustrated network: the principle behind TCP three-time handshake, why can't two-time handshake?
Analysis of the combination of small program technology advantages and industrial Internet
MCU realizes OTA online upgrade process through UART
After 95, the CV engineer posted the payroll and made up this. It's really fragrant
The growth path of test / development programmers, the problem of thinking about the overall situation
随机推荐
DD's command
NLP generation model 2017: Why are those in transformer
Keepalive component cache does not take effect
Problems and solutions of converting date into specified string in date class
How to make your own robot
MobileNet系列(5):使用pytorch搭建MobileNetV3并基于迁移学习训练
Zhuhai laboratory ventilation system construction and installation instructions
Leetcode:20220213 week race (less bugs, top 10% 555)
Recoverable fuse characteristic test
Spark SQL空值Null,NaN判断和处理
毕设-基于SSM高校学生社团管理系统
Building core knowledge points
Cve-2017-11882 reappearance
面试必刷算法TOP101之回溯篇 TOP34
Convert binary search tree into cumulative tree (reverse middle order traversal)
如何制作自己的機器人
Anconda download + add Tsinghua +tensorflow installation +no module named 'tensorflow' +kernelrestart: restart failed, kernel restart failed
KDD 2022 | EEG AI helps diagnose epilepsy
Questions about database: (5) query the barcode, location and reader number of each book in the inventory table
《强化学习周刊》第52期:Depth-CUPRL、DistSPECTRL & Double Deep Q-Network