Preview only show first 10 pages with watermark. For full document please download

Navigation Subsystem

   EMBED


Share

Transcript

Navigation Subsystem Real-Time Vehicle Guidance Project TA: Mark Gilbertson 2016 Table of Contents • Logistic Considerations • Navigation Overview • Track Map • Navigation Subsystem Assignment • Programming Help 2 Logistic Considerations • “Hello Word” interim report. • Use paragraphs, not bullet points. • Color indicators require color printers… • Don’t copy the assignment text. • Label figures. • Don’t print double sided. 3 Logistic Considerations • Include “ME5286” in the subject of all your emails to the TA. • Send emails with your questions to the TA. • Grades can be discussed at office hours or other nonclass times. 4 Navigation Overview 5 What is Navigation? • Determination of vehicle’s state vector – Position – Speed – Heading • Used with knowledge about the track • Relationship between vehicle and track 6 Why do we need it? 7 continued 8 Location Methods • Global Navigation Satellite Systems (GNSS) – Example: DGPS (Differential Global Positioning System, most common for vehicle navigation) – Provides latitude and longitude • Inertial Sensors – Laser ring gyros – Mechanical gyros – Mechanical linear sensors • Imaging – Captures ground speed – Identifies landmarks – Identifies obstacles • Compass • LIDAR and SONAR 9 SAFETRUCK Sensors • GPS – Location in “State Plane Coordinate System” – In meters • Speed – Straight-line speed – Meters per second • Heading – In radians – You need to characterize sensor orientation 10 State Plane Coordinate System • A set of 124 geographic zones or coordinate systems designed for specific regions of the United States • Ignores the curvature of the Earth – Each zone is assumed to be flat • Cartesian coordinates • Measured in meters – Arbitrary zero position – Northing (y) – Easting (x) • Our coordinate system: Minnesota Central 11 Track Map 12 Map Structure • Map is made up of road centerline data – Linear segments connecting (x,y) location pairs • Map is split in to sections each with: – Section ID – Speed limit (m/s) – Number of data points (in that section) – Center line data (x,y) – Next and previous section info id previous next_ 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 0 5 1 0 1 0 1 0 POINT_X POINT_Y speed 1 823338 350990.7 1 823347.1 350986.1 1 823356.7 350982.5 1 823366.6 350980.2 1 823376.7 350979 1 823387 350979.1 1 823397.1 350980.4 1 823407 350982.9 1 823416.5 350986.6 1 823425.5 350991.4 1 823433.9 350997.2 1 823442.3 351003.3 1 823449.6 351009.6 2 823449.6 351009.6 2 823457.8 351015.1 2 823466.5 351019.5 13 30 30 30 30 30 30 30 30 30 30 30 30 30 35 35 35 Using the Map • Test track data is stored in a file • Accessible through CLData class – Defined in LoadCenterLine.cpp and .h – Pre-written, don’t edit • Map data must be read in and stored locally – Takes too long to make map queries in real time 14 Programmatic Map Access • Lots of info on course website – http://me.umn.edu/courses/me5286/vehicle/Simulation/map.shtml • Basic Steps – Find the number of sections – For each section, find: • Number of points • Speed limit • Next section to find 15 Initialization Algorithm • Truck can start anywhere • An algorithm should be proposed and implemented to bring the truck back to the track – Need to relate starting location to track – Which segment or centerline point are you on? • Algorithm must be robust • Make sure the algorithm is general – Works with different tracks 16 Navigation Subsystem Assignment 17 Requirements • Read map data using the provided functions – Using MNroad track – Print to file (Don’t just copy-paste from .csv) – Create a map of the track – Plot speed limit vs % distance along track • 0 to 1.00 or 0% to 100% • Create an initialization algorithm – Do not implement (yet) 18 Deliverable • Single document – Memo-format – Turn in a hard copy on February 17, at the beginning of class – As an appendix, include your commented code • Document your ability to read in the map • Include the required plots – One showing a map of the track, with the different track sections clearly designated visually (Color) – One showing the speed limit plotted against percent distance down the track • Discuss your initialization algorithm 19 Programming Help 20 Pointers • Very Important • Very Confusing • You will want to (re)-learn this stuff 21 File I-O • Functions used in C: – fopen() – fclose() – fprintf() – fscanf() • Use them to read/write from/to files • Look up functions online for exact syntax 22 File I-O Example • Declare pointer to file as type FILE • Example: FILE *file_id; int ndays = 7; file_id = fopen(“name.txt”,“w”); fprintf(file_id,“There are %d days \ in a week”,ndays); fclose(file_id); 23 Static Variables • Declare in header or outside function • Used to share variables – Between functions – Between function calls – Maintains value through re-initialization. • Declare using static keyword 24 Questions ?