1. 程式人生 > >Robotics, Vision and Control - 2

Robotics, Vision and Control - 2

2 Representing Position and Orientation

A fundamental requirement in robotics and computer vision is to represent
the position and orientation of objects in an environment. Such objects include robots, cameras, workpieces, obstacles and paths.

Instead of describing the individual points we describe the position and orientation of the object by the position and orientation of its coordinate frame.

The position and orientation of a coordinate frame is known as its pose and is shown graphically as a set of coordinate axes. The relative pose of a frame with respect to a reference coordinate frame is denoted by the symbol ξ.
在這裡插入圖片描述
The point P in Fig. 2.2 can be described with respect to either coordinate frame. Formally we express this as

A p = A ξ B
B
p {}^Ap = {}^Aξ_{B} · {}^Bp
在這裡插入圖片描述
An important characteristic of relative poses is that they can be composed or compounded. Consider the case shown in Fig. 2.3. If one frame can be described in terms of another by a relative pose then they can be applied sequentially
A ξ C = A ξ B B ξ C {}^Aξ_{C} = {}^Aξ_{B} · {}^Bξ_{C}
在這裡插入圖片描述
So what is ξ? It can be any mathematical object that supports the algebra described above and is suited to the problem at hand. It will depend on whether we are considering a 2- or 3-dimensional problem. Some of the objects that we will discuss in the rest of this chapter include vectors as well as more exotic mathematical objects such as homogeneous transformations, orthonormal rotation matrices and quaternions.

To recap:

  1. A point is described by a coordinate vector that represents its displacement from a
    reference coordinate system;
  2. A set of points that represent a rigid object can be described by a single coordinate
    frame, and its constituent points are described by displacements from that coordinate
    frame;
  3. The position and orientation of an object’s coordinate frame is referred to as its
    pose;
  4. A relative pose describes the pose of one coordinate frame with respect to another
    and is denoted by an algebraic variable ξ;
  5. A coordinate vector describing a point can be represented with respect to a different
    coordinate frame by applying the relative pose to the vector using the · operator;
  6. We can perform algebraic manipulation of expressions written in terms of relative
    poses.

2.1 lRepresenting Pose in 2-Dimensions

A 2-dimensional world, or plane, is familiar to us from high-school Euclidean geometry. We use a Cartesian coordinate system or coordinate frame with orthogonal axes denoted x and y and typically drawn with the x-axis horizontal and the y-axis vertical. The point of intersection is called the origin. Unit-vectors parallel to the axes are denoted ’ and (. A point is represented by its x- and y-coordinates (x, y) or as a bound vector
p = x x ^ + y y ^ p = x \hat{x} + y \hat{y}
Figure 2.6 shows a coordinate frame {B} that we wish to describe with respect to the reference frame {A}. We can see clearly that the origin of {B} has been displaced by the vector t = (x, y) and then rotated counter-clockwise by an angle θ. A concrete representation of pose is therefore the 3-vector AξB∼ (x, y, θ), and we use the symbol ∼ to denote that the two representations are equivalent. Unfortunately this representation is not convenient for compounding since
( x 1 , y 1 , θ 1 ) ( x 1 , y 1 , θ 1 ) (x_1, y_1, \theta_1) \oplus (x_1, y_1, \theta_1)
is a complex trigonometric function of both poses. Instead we will use a different way of representing rotation.
在這裡插入圖片描述
The matrix has a very specific structure and belongs to the special Euclidean group of dimension 2 or T S E ( 2 ) R 3 × 3 T ∈ SE(2) ⊂ R^{3×3} .
A T B = [ c o s θ s i n θ x s i n θ c o s θ y 0 0 1 ] {}^AT_{B} = \begin{bmatrix} cos\theta & sin\theta & x \\ -sin\theta & cos\theta & y \\ 0 & 0 & 1 \end{bmatrix}
在這裡插入圖片描述

2.2 Representing Pose in 3-Dimensions

A point P is represented by its x-, y- and z-coordinates (x, y, z) or as a bound vector
P = x x ^ + y y ^ + z z ^ P = x\hat{x} + y\hat{y} + z\hat{z}

2.2.1 Representing Orientation in 3-Dimensions

Any two independent orthonormal coordinate frames can be related by a sequence of rotations (not more than three) about coordinate axes, where no two successive rotations may be about the same axis. Euler’s rotation theorem (Kuipers 1999).

The implication for the pose algebra we have used in this chapter is that the ⊕ operator is not commutative – the order in which rotations are applied is very important.

Mathematicians have developed many ways to represent rotation and we will discuss several of them in the remainder of this section: orthonormal rotation matrices, Euler and Cardan angles, rotation axis and angle, and unit quaternions.

2.2.1.1 Orthonormal Rotation Matrix

The matrix R belongs to the special orthogonal group of dimension 3 or R S O ( 3 ) R 3 × 3 R ∈ SO(3) ⊂ R^{3×3} . It has the properties of an orthonormal matrix that were mentioned on page 16 such as R T = R 1 R^T= R^{−1} and d e t ( R ) = 1 det(R) = 1 .

The orthonormal rotation matrices for rotation of θ about the x-, y- and z-axes are
在這裡插入圖片描述
The orthonormal matrix has nine elements but they are not independent. The columns have unit magnitude which provides three constraints. The columns are orthogonal to each other which provides another three constraints. Nine elements and six constraints is effectively three independent values.
在這裡插入圖片描述

2.2.1.2 Three-Angle Representations

Euler’s rotation theorem requires successive rotation about three axes such that no two successive rotations are about the same axis. There are two classes of rotation sequence: Eulerian and Cardanian, named after Euler and Cardano respectively.

The Eulerian type involves repetition, but not successive, of rotations about one particular axis: XYX, XZX, YXY, YZY, ZXZ, or ZYZ. The Cardanian type is characterized by rotations about all three axes: XYZ, XZY, YZX, YXZ, ZXY, or ZYX. In common usage all these sequences are called Euler angles and there are a total of twelve to choose from.
在這裡插入圖片描述
The ZYZ sequence
R = R z ( ϕ ) R y ( θ ) R z ( ψ ) R = R_z(\phi)R_y(\theta)R_z(\psi)
is commonly used in aeronautics and mechanical dynamics, and is used in the Toolbox.
The Euler angles are the 3-vector Γ = ( φ , θ , ψ ) \Gamma = (φ,θ, ψ) .

The two different sets of Euler angles correspond to the one rotation matrix. The mapping from rotation matrix to Euler angles is not unique and always returns a positive angle for θ.

Another widely used convention is the roll-pitch-yaw angle sequence angle
R = R x ( θ r ) R y ( θ p ) R z ( θ y ) R = R_x(\theta_r)R_y(\theta_p)R_z(\theta_y)
which are intuitive when describing the attitude of vehicles such as ships, aircraft and cars. Roll, pitch and yaw (also called bank, attitude and heading) refer to rotations about the x-,y-,z-axes, respectively. This XYZ angle sequence, technically Cardan angles, are also known as Tait-Bryan angles or nautical angles. For aerospace and ground vehicles the x-axis is commonly defined in the forward direction, z-axis downward and the y-axis to the right-hand side.

The roll-pitch-yaw sequence allows all angles to have arbitrary sign and it has a singularity when θ p = ± π 2 θ_p= ±\frac{\pi}{2} which is fortunately outside the range of feasible attitudes for most vehicles.

2.2.1.3 Singularities and Gimbal Lock

A fundamental problem with the three-angle representations just described is singularity. This occurs when the rotational axis of the middle term in the sequence becomes parallel to the rotation axis of the first or third term. This is the same problem as gimbal lock, a term made famous in the movie Apollo 13.

In mathematical, rather than mechanical, terms this problem can be seen using the definition of the Lunar module’s coordinate system where the rotation of the spacecraft’s body-fixed frame {B} with respect to the stable platform frame {S} is
S R B = R y ( θ p ) R z ( θ r ) R x ( θ y ) {}^SR_B = R_y(\theta_p)R_z(\theta_r)R_x(\theta_y)

相關推薦

Robotics, Vision and Control - 2

2 Representing Position and Orientation A fundamental requirement in robotics and computer vision is to represent the position and orientation

Robotics, Vision and Control, Second Edition讀書筆記

Reading Note 摘錄 Robots are data-driven machines. They acquire data, process it and take action based on it. instant gratificati

Robotics, Vision and Control - 1

1 Introduction The term robot means different things to different people. Sadly the practice of robotics is far behind this popular conception

CodeForces 785D Anton and School - 2

tdi continue article map ces java code detail ans 枚舉,容斥原理,範德蒙恒等式。 先預處理每個位置之前有多少個左括號,記為$L[i]$。 每個位置之後有多少個右括號,記為$R[i]$。 然後枚舉子序列中第一個右括號的位

codeforces 785D D. Anton and School - 2

style ems its com -1 return 他能 har pow 題目鏈接:http://codeforces.com/problemset/problem/785/D 題意:給你一個只包含‘(‘和‘)‘的字符串,然後問他的子序列中有多少滿足前一半是左括號,後一

CodeForces 785D Anton and School - 2 組合數學

school log cer sin 位置 mem cin typedef pair 題意: 給你一串括號 問你有多少種匹配的子串 就是前半部分都是‘(‘ 後半部分都是‘)‘的子串 思路: 首先我們預處理 當前位置之前有多少左括號 和 當前位置之後有多少右括

nRF52832支持Bluetooth Smart (Low Energy), ANT/ANT+ and proprietary 2.4GHz多種協議,這樣就可以連接 nRF51, nRF24AP and nRF24L之類的產品

標準 經驗 開放 至少 高性能 芯片 and 無線 一支 新一代的nRF52832加入了很多新的功能。比如Cortex-M4F的內核,它能夠更強大的運算能力以及浮點運算的技術。現在很多的穿戴設備或者工業化設備需要內置非常復雜的算法,所以需要MCU有更快的運行速度。這顆Cor

[TypeScript] Type check JavaScript files using JSDoc and Typescript 2.5

tro wrong check this sta clas sudo ons assertion Typescript 2.5 adds JSDoc type assertion support for javascript file via ts-check servic

ignitius and princess 2(全排列)

pac row scan 代碼 ring stdio.h color clas rip A - Ignatius and the Princess II STL中的algorithm 的全排列應用 #include<stdio.h> #incl

Iterator and Generator-2

字典 function c4c can art signature number dict expr lambda表達式 匿名函數 # lambda params:expression # params : 可選參數,都好分割變量名 # expression:表達式,可以

TCP Timeout and Retransmission(2)

was def iss window whether ability dia addition his Retransmission Ambiguity and Karn’s Algorithm A problem measuring an RTT sampl

Text Mining and Analytics(2)

IDF stands for inverse document frequency TF:it’ll convert the raw count of a word in the document into some weig

C. Ehab and a 2-operation task

連結 [https://codeforces.com/contest/1088/problem/C] 題意 n個數,最多n+1操作,要麼前i個數加x,要麼前i個數對x取餘,最後使得嚴格遞增 分析 直接進行n+1次,開始所有數都加上5e5+10; 後面n次,從1開始到n對a[i]-i+1取餘,就能保證

C. Ehab and a 2-operation tasktime

C. Ehab and a 2-operation tasktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou’re given an

Codeforces Round #525 (Div. 2) C. Ehab and a 2-operation task(數論構造)

思路來源 http://www.cnblogs.com/Dup4/p/10068891.html 題解 注意%可以起到等同於減的作用。 Solution1: 先給區間[1,n]加上一個較大的數D,比如500W, 這樣ai就變為D+ai, 由於ai-i<1

Codeforces Round #525 (Div. 2)C. Ehab and a 2-operation task

一個數 n-1 i++ 我們 text ++ target sin const C. Ehab and a 2-operation task 題目鏈接:https://codeforc.es/contest/1088/problem/C 題意: 給出n個數,然後最多可

Codeforces Round #525 (Div. 2) C. Ehab and a 2-operation task

題意:   給定一個長度為 n 的陣列a[ ],並且有兩種操作: ①將前 i 個數全都加上 x; ②將前 i 個數全都 mod x 要求用不超過 n+1 次操作,使得陣列 a[ ] 嚴格單調遞增。 思路: 對於每個數a[ i ],實施操作 a[ i ]%( a[ i ]-i

Codeforces Round #525 (Div. 2)C - Ehab and a 2-operation task

  題目   題意:   給你長度為n的陣列a[i],最多操作n+1次,每次都可以將前 i 個數  (操作1)都加上x,或者(操作2)都%x ,(x為1e6以內的任意數,且每次操作可以不同), 使得陣列a嚴格單調遞增(一定後一項大於前一項)。  要你輸出一個總的

SAP Vision for Integration - 2 - 關鍵整合場景

關鍵的整合場景 1 A2A 整合 2 B2B,B2G整合 3 主資料同步 4 Data Virtualization 5 Data Integration 6 複雜的landscape A2A整合主要涵蓋了業務應用之間的流程的銜接。對於這類整合,保證流程的完整度