Guidance Controller. Real-Time Vehicle Guidance Project TA: Mark Gilbertson 2015

Size: px
Start display at page:

Download "Guidance Controller. Real-Time Vehicle Guidance Project TA: Mark Gilbertson 2015"

Transcription

1 Guidance Controller Real-Time Vehicle Guidance Project TA: Mark Gilbertson 2015

2 Assignment Feedback Guidance Controller Looking Ahead Table of Contents

3 Assignment Feedback Steering controller report is mostly for feedback Performance of steering controller will affect truck performance Shortcomings in steering controller will need to be handled in guidance controller Reports Proof read / use proper format Code needs to be thoroughly commented Include axes labels with units, and legends

4 Guidance Controller

5 Goals Drive the truck around the track Evaluation Parameters Oscillatory Swerving Lateral Error Speed Management Travel Time

6 SAFETRUCK Axle to Axle Length 5.49m Lane Width 3.66 m GPS Vehicle Width 2.44 m

7 System Overview

8 Input Guidance Controller Map (map information) Position, heading, speed Output Desired speed Desired steered wheels angle

9 UserGuidanceController void UserGuidanceController ( Inputs double in_time, double in_gpsx, double in_gpsy, // current time stamp, in seconds // State-plane projected Easterling coordinate from GPS (meters, X MN So. state-plane) // State-plane projected Northing coordinate from GPS (meters, Y MN so. state-plane) double in_gpsheading, // PS sensor based Heading angle estimate, Northing major axis (=0 radians) double in_gpstime, double in_gpsspeed, // GPS sensor UTC time, in seconds // GPS sensor based estimate of speed Outputs double *out_speedcmd, // desired speed of vehicle (Meters/sec) double *out_steercmd // desired steer angle, to steering controller

10 Determine where you are Basic Principles Simulated GPS Receiver, Inputs of UserGuidanceController function Determine where you want to go (Look ahead) Desired location Desired heading Desired speed Determine desired steered wheels angle and velocity Outputs of UserGuidanceController function

11 Guidance Controller Algorithms Different strategies exist Do literature review of existing algorithms Develop your own algorithms Examples Steered wheels angle is determined based on the lateral error and desired heading Use of waypoints and looking ahead

12 Heading vs. Steered Wheels Angle There is a difference between heading and steered wheels angle Based on the heading, Guidance Controller determines the desired steered wheels angle to be set by UserSteerController Guidance controller says you are 10 degrees off What signal do you send to wheels?

13 Use of Waypoints Points that model the desired course Steer to the next waypoint Map points are a good starting point Interpolate for better performance Dynamic waypoints Change in real time Dependant on current status Desired Heading Change GPS Next Waypoint

14 Lateral Error Next Waypoint Distance from road centerline Calculated based on database s map points Scalar value Must calculate this value yourself Required for evaluating truck performance Can be used as a parameter in guidance controller GPS Receiver GPS Lateral Error Road Segment Lateral Point Last Waypoint

15 Conceptual Look-ahead Distance How far ahead can you see? How much data are you considering at once? How sharp are upcoming curves? Implementation-level Waypoint placement Important on straight sections

16 Local vs. Global Information Local information Current status Nearby track points Current speed limit Global track information Know every track point and speed limit Look-ahead distance How far ahead can you see? How much data are you considering at once?

17 Speed Speed controller is already written Must determine desired speed Stay under the speed limit, but not too much! Minimize travel time

18 General Comments Need to store map data in memory (Navigation System Interim Report) Be aware of and document your assumptions Implement your initialization algorithm Should work for any track Be careful about the assumptions you make Goal is to get to the road as quickly as possible The road isn t just the x,y points, need to get to the road with right heading too.

19 Ambition Management Implement your controller in logical chunks Test frequently Lots of print statements Easier to debug Do hand calculations Better understand the math Test functions Build frequently to detect errors sooner

20 Guidance Controller Assignment Assigned Wednesday, March 4

21 Assignment Design and implement guidance controller Able to drive around both Brainerd and MnRoad Create a memo documenting Algorithm Methodology/Development process Performance By this point: Finished steering controller Map successfully read by the program (Starting position determined)

22 Initialization Algorithm Lateral Error Calculation Guidance Control Algorithm How it works How you developed it How well it works Required Discussion What needs to be improved before final submission? What are the limitations of your method? If the truck is not performing as you desire, what are the possible reasons? What is your plan for fixing them? Brainerd and MnRoad track performance Discuss each required plot

23 Required Plots Track and truck course (complete lap) Speed and speed limit vs. distance along track Lateral error vs. distance along track Performance with different initial positions Add other figures as needed Lateral error and angle calculations Data flow Repeat for Brainerd track

24 Deliverable Memo documenting guidance controller Include all required plots and discussion Due March 25 Wednesday after Spring Break Plan ahead for TA help Turn in hard copy at the beginning of class (11:15)

25 Looking Ahead

26 Quiz Friday, March 13 th 11:15 1:10 Open book, open notes hardcopies only No devices capable of communication Computers Phones Bring calculator capable of trig functions (matrix multiplication) 2 questions, multiple parts Look over old quizzes Review of previous quizzes, Friday March 6 th

27 Project Schedule Steering Controller Interim Report Due March 4 th (Today) Guidance Controller Interim Report Due Wednesday after Spring Break, March 25 th Code Freeze April 1 st (midnight after that day) All code must be submitted No further changes permitted Final report due April 8 th

28 No office hours Reduced Spring Break Appointment times By Skype or in person to schedule help time