perception planning and control
play

Perception, Planning and Control F1/10 th Racing Perception, - PowerPoint PPT Presentation

Perception, Planning and Control F1/10 th Racing Perception, planning and control Localization IMU and PID Control LIDAR 2 Perception Sensors: specifications, placement and data Inertial Measurement Unit An I nertial M


  1. Perception, Planning and Control F1/10 th Racing

  2. Perception, planning and control Localization IMU and PID Control LIDAR 2

  3. Perception Sensors: specifications, placement and data

  4. ሶ ሶ Inertial Measurement Unit An I nertial M easurement U nit (IMU) provides acceleration, velocity and attitude measurements. 41 𝑦 = 𝑤 mm 𝑤 = 𝑏 28 mm Razor IMU from Sparkfun 4

  5. Inertial Measurement Unit: Attitude Z YAW Y PITCH ROLL X 5

  6. Inertial Measurement Unit • Three gyroscopes measure the roll, pitch and yaw of the car. • Three accelerometers measure the linear and rotational acceleration of the car. • Three magnetometers Razor IMU from Sparkfun 6

  7. Inertial Measurement Unit: Placement 7

  8. IMU: ROS message # File: sensor_msgs/Imu.msg # This is a message to hold data from an IMU (Inertial Measurement Unit) # # Accelerations should be in m/s^2 (not in g's), and rotational velocity should be in rad/se c # Header header geometry_msgs/Quaternion orientation float64[9] orientation_covariance # Row major about x, y, z axes geometry_msgs/Vector3 angular_velocity float64[9] angular_velocity_covariance # Row major about x, y, z axes geometry_msgs/Vector3 linear_acceleration float64[9] linear_acceleration_covariance # Row major x, y z 8

  9. LIDAR Depth information (how far are objects and obstacles around me) 70mm 9

  10. LIDAR 10

  11. Distance to obstacle = (speed of light * time traveled)/2 11

  12. Step k Step k+1 Angular resolution 0.25 degrees Hokuyo UST-10LX 270 degrees horizontal field of view Step 1 Step 1079 Step 0 12

  13. LIDAR: a simple scan sequence TOP VIEW Whiteboard Moving What LIDAR person “sees” LIDAR 13

  14. LIDAR: ROS message structure # File: sensor_msgs/LaserScan.msg Header header # timestamp in the header is the acquisition time of # the first ray in the scan. float32 angle_min # start angle of the scan [rad] float32 angle_max # end angle of the scan [rad] float32 angle_increment # angular distance between measurements [rad] float32 time_increment # time between measurements [seconds] float32 scan_time # time between scans [seconds] float32 range_min # minimum range value [m] float32 range_max # maximum range value [m] float32[] ranges # range data [m] (Note: values < range_min or > range_max # should be discarded) float32[] intensities # intensity data [device-specific units]. 14

  15. LIDAR: range data Array ranges[1080]: ranges[i] is distance measurement of (i+1) st step. Measurements beyond the min and max range (like inf) should be discarded. 15

  16. Localization Know (where is) thyself: Localization by LIDAR

  17. Odometry with LIDAR • Odometry = Estimation of position 𝑦, 𝑧, 𝑨 and attitude 𝜄, 𝜒, 𝜔 • In what follows, will use “position” as short for “position and attitude” 17

  18. LIDAR for odometry: Scan matching Left Wall Right Wall 18

  19. LIDAR for odometry: Scan matching Left Wall Right Wall Scan 1 19

  20. LIDAR for odometry: Scan 1 A 1 Car reference x x frame y y World reference frame 20

  21. LIDAR for odometry: Scan 1 A 1 Car reference x x frame y y World reference frame 21

  22. A 1 Car reference x x frame y y World reference frame 22

  23. A 1 Car reference x frame x y y World reference frame 23

  24. Premise: most likely car position at Scan 2 is the position that gives best overlap between the A 1 two scenes Car reference x x frame y y World reference frame 24

  25. Matching A 1 Car reference x x frame y y World reference frame 25

  26. x y World reference frame 26

  27. Scan matching: optimization Impact coordinates of i th step in world frame Total of n steps (n = 1084) S 1 S 2 Measure of match x y 27

  28. Scan matching: requirements Left Wall Right Wall • Sufficiently fast scan rate • A slow scan rate can lead to few matches between scans. • Not really a risk for today’s LIDARs 28

  29. Scan matching : requirements • Non-smooth, or heterogeneous, surfaces. • Smooth surfaces all look the same to the matching algorithm. 29

  30. 30

  31. Scan matching : requirements • Non-smooth, or heterogeneous, surfaces. • Best match between scans is if car did not move. 31

  32. Control P roportional, I ntegral, D erivative control

  33. PID control: objectives Left Wall Right Wall Control objective: 1) keep the car driving along the centerline, 2) parallel to the walls. 33

  34. PID control: objectives Control objective: 1) keep the car driving along the centerline, 2) parallel to the walls. 34

  35. PID control: objectives Control objective: 1) keep the car driving (roughly) along the centerline, 2) parallel to the walls. 35

  36. PID control: control objectives Control objective: 1) keep the car driving along the Θ centerline, y = 0 2) parallel to the walls. Θ = 0 x y 36

  37. PID control: control objectives Control objective: Lsin( Θ ) 1) keep the car driving along the B A centerline, Θ y = 0 L 2) After driving L meters, it is still on the centerline: Horizontal distance after driving L meters x Lsin( Θ ) = 0 y 37

  38. PID control: control inputs Control input: Lsin( Θ ) Steering angle Θ Θ We will hold the velocity constant . How do we control the steering L angle to keep x = 0, Lsin( Θ ) = 0 as much as possible? x y 38

  39. PID control: error term Want both y and Lsin( Θ ) to be zero Lsin( Θ )  Error term e(t) = -(y + Lsin( Θ )) Θ We’ll see why we added a minus sign L x y 39

  40. PID control: computing input When y > 0, car is to the left of Lsin( Θ ) centerline  Want to steer right: Θ < 0 Θ When Lsin( Θ ) > 0 , we will be to the left of centerline in L meters L  so want to steer right: Θ < 0 Set desired angle to be Θ d = K p (-y – Lsin( Θ )) x y 40

  41. PID control: computing input When y < 0, car is to the right of Lsin( Θ ) centerline  Want to steer left Θ  Want Θ > 0 When Lsin( Θ ) < 0, we will be to the L right of centerline in L meters, so want to steer left  Want Θ > 0 x Consistent with previous requirement: Θ d = Kp (-y – Lsin( Θ )) y 41

  42. PID control: Proportional control Θ d = C K p (-y – Lsin( Θ )) = C K p e(t) Lsin( Θ ) This is P roportional control. Θ The extra C constant is for scaling distances to angles. L x y 42

  43. PID control: Derivative control If error term is increasing quickly, Lsin( Θ ) we might want the controller to react quickly Θ  Apply a derivative gain : Θ = K p e (t) L + K d de(t)/dt x y 43

  44. PID control: Derivative control In shown scenario, controller tries Lsin( Θ ) to nullify y term. Θ  Steer right, Θ < 0 and y decreases  y’ < 0 L  Error derivative –y’ – Lcos( Θ )>0  Trajectory correction takes longer (smoothing out) x y 44

  45. PID control: Integral control Integral control is proportional to Lsin( Θ ) the cumulative error Θ = K p e (t) Θ + K I E (t) + K d de (t)/dt L Where E(t) is the integral of the error up to time t (from a chosen reference time) x y 45

  46. PID control: tuning the gains • Default set of gains, determined empirically to work well for this car. – K p = 14 – K i = 0 – K d = 0.09 46

  47. PID control: tuning the gains • Reduce K p  less responsive to error magnitude – K p = 5 – K i = 0 – K d = 0.09 47

  48. PID control: tuning the gains • Include K i  overly sensitive to accumulating error  over-correction – K p = 14 – K i = 2 – K d = 0.09 48

  49. Perception, Planning and Control • At the end of this week, your car will be driving in a straight line. • Next week, we see how to extend these algorithms to close a loop on a track. 49

Recommend


More recommend