F1/10 th Racing Rigid Body Transformations (Or How Different sensors see the same world) By, Paritosh Kelkar
Mapping the surroundings Specify destination and generate path to goal The colored cells represent a potential that is used to plan paths Rviz is used to specify different goals to the robot
Why should you watch these lectures Following the wall here blindly is going to be really hard You will need a very complicated Route definition file
Why should you watch these lectures Simultaneous Localization and Planning Planning
Lets begin
Scope of the Lecture PART 1 • The concept of frames and transforms (different views of the same world) – Why is this important to us • The Homogenous Transformation Matrix PART 2 • How ROS deals with these frames, conventions in ROS
Frames of Reference
Part 1
Transformations and Frames: Heads up 1. w.r.t = with respect to 2. Map frame – where are you w.r.t the map – co-oridnates from origin
Transformations and Frames: Heads up • The – how does the world look w.r.t the sensor Sensor frame Does this tell you anything about where obstacles are in the map? Does this tell you anything about where we are in the map? We must link frames together Transformations
Transformations and Frames • The frame of reference in which the measurement is taken Z X 𝛦𝑨 Distance measurements returned by LIDAR
Transformations and Frames • The frame of reference in which the measurement is taken The scan Values from the LIDAR will not tell us how far Z away are the obstacles. We must take care of the offsets X Y 𝛦𝑨 𝛦𝑦
Transformations and Frames Note: Z Axes X,Y,Z of Frames of Reference are orthogonal(90 o ) to each other. X X,Y,Z represent the axes along the 3 dimensions. Y 𝛦𝑨
Transformations and Frames Z Between frames there will exist Y laser frame transformations that convert measurements from one frame to another X Y Car frame Y Map frame Important Point: Note what the transformation means w.r.t frames
Transformations and Frames Between frames there will exist transformations that convert measurements from one frame to another There should exist a relationship Z Y Y Between these frames laser frame Transform from car to laser X Y Y Car frame Y Y Map frame Transform from map to car
A world without frames and transformations
The actual motion of the car
Rigid Body Transforms: An Aside • What’s with it being Rigid? The distance between any two given points of a rigid body remains constant in time regardless of external forces exerted on it. Play-Doh: Obviously not a rigid body
Rigid Body Transforms Y A Z A X A
Rigid Body Transforms Y A Z A X A
Rigid Body Transforms 𝜄 Y A Z A X A
Rigid Body Transforms 𝜄 Y A A d B Z A X A
Rigid Body Transforms B p 𝜄 Y A A d B Z A X A
Rigid Body Transforms B p A p 𝜄 Y A A d B Z A X A
Rigid Body Transforms • What we need is Point p with respect to Frame A, given its pose in Frame B B p A p 𝜄 Y A A d B Z A X A
Rigid Body Transforms • Special type of matrices called Rotation matrices Y A 𝑌 𝐶 = 𝑆 11 𝑌 𝐵 + 𝑆 21 𝐵 + 𝑆 31 𝑍 𝑎 𝐵 𝐶 = 𝑆 12 𝑌 𝐵 + 𝑆 22 𝐵 + 𝑆 32 𝑍 𝑍 𝑎 𝐵 𝑎 𝐶 = 𝑆 13 𝑌 𝐵 + 𝑆 23 𝐵 + 𝑆 33 𝑍 𝑎 𝐵 Z A X A 𝜄
Rigid Body Transforms • Special type of matrices called Rotation matrices Y A 𝑌 𝐶 = 𝑆 11 𝑌 𝐵 + 𝑆 21 𝐵 + 𝑆 31 𝑍 𝑎 𝐵 𝐶 = 𝑆 12 𝑌 𝐵 + 𝑆 22 𝐵 + 𝑆 32 𝑍 𝑍 𝑎 𝐵 𝑎 𝐶 = 𝑆 13 𝑌 𝐵 + 𝑆 23 𝐵 + 𝑆 33 𝑍 𝑎 𝐵 Z A X A Takes points in 𝑆 11 𝑆 12 𝑆 13 frame B and A R 𝑆 21 𝑆 22 𝑆 23 = represents their B orientation in 𝑆 31 𝑆 32 𝑆 33 𝜄 frame A
Rigid Body Transforms: Rotation Matrices 𝑌 𝐶 = 𝑆 11 𝑌 𝐵 + 𝑆 21 𝐵 + 𝑆 31 𝑍 𝑎 𝐵 (0,5,0) A p = ? Y A 𝐶 = 𝑆 12 𝑌 𝐵 + 𝑆 22 𝐵 + 𝑆 32 Sine 𝑍 𝑍 𝑎 𝐵 B p component 𝑎 𝐶 = 𝑆 13 𝑌 𝐵 + 𝑆 23 𝐵 + 𝑆 33 𝑍 𝑎 𝐵 Cosine component 𝜄 Z A X A = cos(𝜄) × 𝑌 𝐵 +sin(𝜄) × 𝐵 +0 × 𝑌 𝐶 𝑍 𝑎 𝐵 𝑆 11 𝑆 21 𝑆 31
Rigid Body Transforms: Rotation Matrices ) Cos(𝜄 𝑆 12 𝑆 13 C S 0 𝑌 𝐵 A ) R = Sin(𝜄 𝑆 22 𝑆 23 𝑍 A R S C 0 𝐵 B B 𝑎 𝐵 0 𝑆 32 𝑆 33 0 0 1 ) 𝐷 𝜄 = Cos(𝜄 𝑌 𝐶 𝑍 𝑎 𝐶 ) 𝑇 𝜄 = Sin(𝜄 𝐶
We have the Rotation Matrix, so now what? 0.86 −0.5 0 𝑆 = 0.5 0.86 0 A A B p R p 0 0 1 B Known Known We now (-2.5,4.3,0) have the point P as Y A Y A referenced A p in frame A For example A p Τ = 𝜌 6 𝜄 ⇒ = (-2.5,4.3,0) Z A Z A X A X A
Important point to remember • The rotation matrix will take care of perspectives of orientation, what about displacement? Y A Y A Z A Z A X A X A Origins of both the frames are at the same location A d B
Rigid Body Transforms: And We are back to the Future A A B A p R p d Y B Y B B B Z B Z B X B X B Y A Z A X A
Rigid Body Transforms • What we need is Point p with respect to Frame A, given its pose in Frame B 𝑞 A A B p H p B p B A p 𝜄 Y A C S 0 A R S C 0 B 0 0 1 A d B Z A A A R d A H = Homogenous transformations that transforms A B B X A H B B measurements in Frame B to those in Frame A 0 1
Part 2
Map frame Map Frame
Map frame: Importance • Position with respect to map MAP FRAME
Map Frame: Properties • Used as a long term reference • Dependence on localization engine (Adaptive Monte Carlo Localization AMCL – used in our system – more about this in later lectures) • Localization engine - responsible for providing pose w.r.t map – Frame Authority
Map Frame: ROS • The tf package – tracks multiple 3D coordinate frames - maintains a tree structure b/w frames – access relationship b/w any 2 frames at any point of time • ROS REP(ROS Enhancement Proposals) 105 describes the various frames involved A tf tree is a structure that • Normal hierarchy maintains relations between Has no parent world_frame the linked frames. map Child of world frame Note: Tf = transformer class
Odom Frame
Odom frame: Calculation • Frame in which odometry is measured • Odometry is used by some robots, whether they be legged or wheeled, to estimate (not determine) their position relative to a starting location -Wikipedia Source: eg: Wheel encoders. Count wheel ticks
Odom Frame: Calculation • Difference in count of ticks of wheels – orientation • Integrating the commanded velocities/accelarations • Integrating values from IMU
Odom Frame: Uncertainty Initial Position • Error can accumulate – leading to a drift in values • Incorrect diameter used? • Slippage? • Dead Reckoning Notice how the uncertainty increases
Odom Frame: Properties • Continuous – actual data from actuators/motors • Evolves in a smooth manner, without discrete jumps • Short term ; accurate local reference
Odom Frame: ROS • General ROS frame hierarchy world_frame Note that if the frame is connected in the tf tree, we can obtain a representation of that frame with any other frame in the tree map odom Tf tree
Base_link and fixed frames attached to the robot
Base link: What is it • Attached to the robot itself – base_footprint; base_link; base_stabilized
Base link: Properties • Odom -> base link transform provided by Odometry source • Map -> base_link transform provided by localization component
Fixed Frames: Source – Where do we get the relationships between the fixed frame on the car • Frame for various hardware components(sensors) • Robot description – provides the transformations • Urdf file – Look up the tutorial related to this lecture
Base_link Frame: ROS • General ROS frame world_frame hierarchy map odom base_link Tf tree
ROS.W.T.F • Its actually a tool – just very cleverly named • Host of tf debugging tools provided by ROS • Look at tutorial for further details $ rosrun tf view_monitor $ rosrun tf view_frames $ roswtf
In Conclusion • Rigid Body Transformations – the concept and the importance in robotic systems • We now know how to correlate measurements from different sensors • The upcoming lecture – SLAM – Simultaneous Localization and Mapping
Why do you have to remember all of this stuff • Again, you are developing the platform in this framework • Don’t you want to know how you could get maps of your surroundings ? what we just covered are building blocks of the upcoming topics
Recommend
More recommend