当前位置:网站首页>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 .
边栏推荐
- Promise
- The inconsistency between the versions of dynamic library and static library will lead to bugs
- [EI conference sharing] the Third International Conference on intelligent manufacturing and automation frontier in 2022 (cfima 2022)
- NLP generation model 2017: Why are those in transformer
- MySQL storage engine
- Spark AQE
- curlpost-php
- Arduino hexapod robot
- MIT博士论文 | 使用神经符号学习的鲁棒可靠智能系统
- Curlpost PHP
猜你喜欢
Spark SQL null value, Nan judgment and processing
Spark AQE
MIT doctoral thesis | robust and reliable intelligent system using neural symbol learning
Data analysis thinking analysis methods and business knowledge - analysis methods (III)
Cf:d. insert a progression [about the insert in the array + the nature of absolute value + greedy top-down]
Keepalive component cache does not take effect
Finding the nearest common ancestor of binary tree by recursion
KDD 2022 | 脑电AI助力癫痫疾病诊断
[groovy] XML serialization (use markupbuilder to generate XML data | set XML tag content | set XML tag attributes)
Ubantu check cudnn and CUDA versions
随机推荐
BiShe - College Student Association Management System Based on SSM
MCU通过UART实现OTA在线升级流程
logstash清除sincedb_path上传记录,重传日志数据
如何制作自己的机器人
The third season of ape table school is about to launch, opening a new vision for developers under the wave of going to sea
Synchronized and reentrantlock
【EI会议分享】2022年第三届智能制造与自动化前沿国际会议(CFIMA 2022)
Novice entry depth learning | 3-6: optimizer optimizers
ubantu 查看cudnn和cuda的版本
Data analysis thinking analysis methods and business knowledge - analysis methods (III)
C language programming (Chapter 6 functions)
从 1.5 开始搭建一个微服务框架——调用链追踪 traceId
Finding the nearest common ancestor of binary tree by recursion
测试/开发程序员的成长路线,全局思考问题的问题......
[groovy] compile time metaprogramming (compile time method injection | method injection using buildfromspec, buildfromstring, buildfromcode)
VSphere implements virtual machine migration
Free chat robot API
The growth path of test / development programmers, the problem of thinking about the overall situation
新手入门深度学习 | 3-6:优化器optimizers
[groovy] JSON string deserialization (use jsonslurper to deserialize JSON strings | construct related classes according to the map set)