Rigid Body Transformations (Or How Different sensors see the same - - PowerPoint PPT Presentation

rigid body transformations
SMART_READER_LITE
LIVE PREVIEW

Rigid Body Transformations (Or How Different sensors see the same - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

Rigid Body Transformations

(Or How Different sensors see the same world)

F1/10th Racing

By, Paritosh Kelkar

slide-2
SLIDE 2

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

slide-3
SLIDE 3

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

slide-4
SLIDE 4

Why should you watch these lectures

Simultaneous Localization and Planning Planning

slide-5
SLIDE 5

Lets begin

slide-6
SLIDE 6

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
slide-7
SLIDE 7

Frames of Reference

slide-8
SLIDE 8

Part 1

slide-9
SLIDE 9

Transformations and Frames: Heads up

1. w.r.t = with respect to 2. – where are you w.r.t the map – co-oridnates from origin Map frame

slide-10
SLIDE 10
  • The – how does the world look w.r.t the sensor

Transformations and Frames: Heads up

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

Sensor frame

slide-11
SLIDE 11

Transformations and Frames

  • The frame of reference in which the measurement is taken

𝛦𝑨 X Z Distance measurements returned by LIDAR

slide-12
SLIDE 12

Transformations and Frames

  • The frame of reference in which the measurement is taken

𝛦𝑨 𝛦𝑦 X Y Z The scan Values from the LIDAR will not tell us how far away are the obstacles. We must take care of the

  • ffsets
slide-13
SLIDE 13

𝛦𝑨 X Z Y

Transformations and Frames

Note: Axes X,Y,Z of Frames of Reference are orthogonal(90o) to each other. X,Y,Z represent the axes along the 3 dimensions.

slide-14
SLIDE 14

X Z Y

Transformations and Frames

Y Y Map frame Car frame

Between frames there will exist transformations that convert measurements from one frame to another

laser frame Important Point: Note what the transformation means w.r.t frames

slide-15
SLIDE 15

X Z Y Y Y Y Y Y Map frame Car frame laser frame

Transformations and Frames

Between frames there will exist transformations that convert measurements from one frame to another There should exist a relationship Between these frames Transform from map to car Transform from car to laser

slide-16
SLIDE 16

A world without frames and transformations

slide-17
SLIDE 17

The actual motion of the car

slide-18
SLIDE 18
  • What’s with it being Rigid?

Rigid Body Transforms: An Aside

Play-Doh: Obviously not a rigid body

The distance between any two given points of a rigid body remains constant in time regardless of external forces exerted on it.

slide-19
SLIDE 19

XA YA ZA

Rigid Body Transforms

slide-20
SLIDE 20

Rigid Body Transforms

XA YA ZA

slide-21
SLIDE 21

Rigid Body Transforms

XA YA ZA 𝜄

slide-22
SLIDE 22

Rigid Body Transforms

XA YA ZA 𝜄

A B

d

slide-23
SLIDE 23

Rigid Body Transforms

XA YA ZA 𝜄

A B

d

B p

slide-24
SLIDE 24

Rigid Body Transforms

XA YA ZA 𝜄

A B

d

B p

A p

slide-25
SLIDE 25

Rigid Body Transforms

XA YA ZA 𝜄

A B

d

B p

A p

  • What we need is Point p with respect to

Frame A, given its pose in Frame B

slide-26
SLIDE 26
  • Special type of matrices called Rotation matrices

Rigid Body Transforms

෢ 𝑌𝐶 = 𝑆11෢ 𝑌𝐵 + 𝑆21 ෡ 𝑍

𝐵 + 𝑆31෢

𝑎𝐵 ෢ 𝑍

𝐶 = 𝑆12෢

𝑌𝐵 + 𝑆22 ෡ 𝑍

𝐵 + 𝑆32෢

𝑎𝐵 ෢ 𝑎𝐶 = 𝑆13෢ 𝑌𝐵 + 𝑆23 ෡ 𝑍

𝐵 + 𝑆33෢

𝑎𝐵

XA YA ZA 𝜄

slide-27
SLIDE 27
  • Special type of matrices called Rotation matrices

Rigid Body Transforms

෢ 𝑌𝐶 = 𝑆11෢ 𝑌𝐵 + 𝑆21 ෡ 𝑍

𝐵 + 𝑆31෢

𝑎𝐵 ෢ 𝑍

𝐶 = 𝑆12෢

𝑌𝐵 + 𝑆22 ෡ 𝑍

𝐵 + 𝑆32෢

𝑎𝐵 ෢ 𝑎𝐶 = 𝑆13෢ 𝑌𝐵 + 𝑆23 ෡ 𝑍

𝐵 + 𝑆33෢

𝑎𝐵

XA YA ZA 𝜄

= 𝑆11 𝑆12 𝑆13 𝑆21 𝑆22 𝑆23 𝑆31 𝑆32 𝑆33

A B

R

Takes points in frame B and represents their

  • rientation in

frame A

slide-28
SLIDE 28

Rigid Body Transforms: Rotation Matrices

෢ 𝑌𝐶 = 𝑆11෢ 𝑌𝐵 + 𝑆21 ෡ 𝑍

𝐵 + 𝑆31෢

𝑎𝐵 ෢ 𝑍

𝐶 = 𝑆12෢

𝑌𝐵 + 𝑆22 ෡ 𝑍

𝐵 + 𝑆32෢

𝑎𝐵 ෢ 𝑎𝐶 = 𝑆13෢ 𝑌𝐵 + 𝑆23 ෡ 𝑍

𝐵 + 𝑆33෢

𝑎𝐵

XA YA ZA 𝜄

෢ 𝑌𝐶

Cosine component Sine component

= cos(𝜄) × ෢ 𝑌𝐵 +sin(𝜄) × ෡ 𝑍

𝐵+0 × ෢

𝑎𝐵

B p

(0,5,0)

𝑆11 𝑆21 𝑆31

A p = ?

slide-29
SLIDE 29

Rigid Body Transforms: Rotation Matrices

A B

R

෢ 𝑌𝐶

෢ 𝑌𝐵 ෡ 𝑍

𝐵

෢ 𝑎𝐵

෢ 𝑍

𝐶

෢ 𝑎𝐶 = ) Cos(𝜄 𝑆12 𝑆13 ) Sin(𝜄 𝑆22 𝑆23 𝑆32 𝑆33

1

A B

C S R S C

   

           

) 𝐷𝜄 = Cos(𝜄 ) 𝑇𝜄 = Sin(𝜄

slide-30
SLIDE 30

We have the Rotation Matrix, so now what?

We now have the point P as referenced in frame A Known Known

𝜄 Τ = 𝜌 6

For example

= (-2.5,4.3,0)

A p

XA YA ZA (-2.5,4.3,0)

A p

XA YA ZA

A A B B

p R p  

⇒ 𝑆 = 0.86 −0.5 0.5 0.86 1

slide-31
SLIDE 31
  • The rotation matrix will take care of perspectives of orientation, what

about displacement?

Important point to remember

XA YA ZA XA YA ZA Origins of both the frames are at the same location

A B

d

slide-32
SLIDE 32

Rigid Body Transforms: And We are back to the Future

A A B A B B

p R p d   

XA YA ZA XB YB ZB XB YB ZB

slide-33
SLIDE 33

Rigid Body Transforms

  • What we need is Point p with respect to

Frame A, given its pose in Frame B

XA YA ZA 𝜄

A B

d

1

A A A B B B

R d H       

𝑞

A p

A A B B

p H p  

B p

1

A B

C S R S C

   

           

A B

H = Homogenous transformations that transforms

measurements in Frame B to those in Frame A

slide-34
SLIDE 34

Part 2

slide-35
SLIDE 35

Map frame

Map Frame

slide-36
SLIDE 36
  • Position with respect to map

Map frame: Importance

MAP FRAME

slide-37
SLIDE 37

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

slide-38
SLIDE 38

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

  • Normal hierarchy

Has no parent Child of world frame world_frame map Note: Tf = transformer class

A tf tree is a structure that maintains relations between the linked frames.

slide-39
SLIDE 39

Odom Frame

slide-40
SLIDE 40

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

slide-41
SLIDE 41

Odom Frame: Calculation

  • Difference in count of ticks of wheels – orientation
  • Integrating the commanded velocities/accelarations
  • Integrating values from IMU
slide-42
SLIDE 42

Odom Frame: Uncertainty

  • Error can accumulate – leading to a drift in values
  • Incorrect diameter used?
  • Slippage?
  • Dead Reckoning

Notice how the uncertainty increases Initial Position

slide-43
SLIDE 43
  • Continuous – actual data from actuators/motors
  • Evolves in a smooth manner, without discrete jumps
  • Short term ; accurate local reference

Odom Frame: Properties

slide-44
SLIDE 44

Odom Frame: ROS

  • General ROS frame

hierarchy

world_frame map

  • dom

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 Tf tree

slide-45
SLIDE 45

Base_link and fixed frames attached to the robot

slide-46
SLIDE 46

Base link: What is it

  • Attached to the robot itself – base_footprint; base_link;

base_stabilized

slide-47
SLIDE 47
  • Odom -> base link transform provided by Odometry source
  • Map -> base_link transform provided by localization component

Base link: Properties

slide-48
SLIDE 48

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

slide-49
SLIDE 49

Base_link Frame: ROS

  • General ROS frame

hierarchy

world_frame map

  • dom

base_link Tf tree

slide-50
SLIDE 50

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

slide-51
SLIDE 51
  • 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

In Conclusion

slide-52
SLIDE 52
  • 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

Why do you have to remember all of this stuff

slide-53
SLIDE 53

Upcoming Lectures

We will go into detail about the packages that we use for mapping and localizing

slide-54
SLIDE 54

Map frame: Properties

Discontinuity

Map frame (0,0,0) X Y Z

slide-55
SLIDE 55

Map frame: Properties

Discontinuity

(2,0,0) New sensor reading gives us new information Jump in position, i.e, not continuous Map frame (0,0,0) X Y Z

slide-56
SLIDE 56

Map Frame: Properties

slide-57
SLIDE 57

Map Frame: Why Discontinuity is a Problem

  • What pose coordinates will the controller act on?
slide-58
SLIDE 58

Transformations and Frames

  • The frame of reference in which the measurement is taken

𝛦𝑨 𝛦𝑦 X Y Z

slide-59
SLIDE 59

Odom Frame: Uncertainty

Final placement of odom and map frames – after robot has moved some distance Initial placement of odom and map frames