Code for autonomous rover for Sparkfun AVC. DataBus won 3rd in 2012 and the same code was used on Troubled Child, a 1986 Jeep Grand Wagoneer to win 1st in 2014.

Dependencies:   mbed Watchdog SDFileSystem DigoleSerialDisp

Committer:
shimniok
Date:
Thu Nov 29 17:11:34 2018 +0000
Revision:
15:01fb4916a5cd
Parent:
0:a6a169de725f
temp fix for setSteering() compile err in shell.cpp; updated logging class

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shimniok 0:a6a169de725f 1 #ifndef __SCHEDULER_H
shimniok 0:a6a169de725f 2 #define __SCHEDULER_H
shimniok 0:a6a169de725f 3
shimniok 0:a6a169de725f 4 /** Updater is the main real time sensor update, estimation, and control routine that is
shimniok 0:a6a169de725f 5 * called at 100Hz by a timer interrupt
shimniok 0:a6a169de725f 6 */
shimniok 0:a6a169de725f 7
shimniok 15:01fb4916a5cd 8 /** initialize throttle to center position */
shimniok 15:01fb4916a5cd 9 void initThrottle(void);
shimniok 15:01fb4916a5cd 10
shimniok 15:01fb4916a5cd 11 /** initialize steering to center position */
shimniok 15:01fb4916a5cd 12 void initSteering(void);
shimniok 15:01fb4916a5cd 13
shimniok 0:a6a169de725f 14 /** attach the update routine to Ticker interrupt */
shimniok 0:a6a169de725f 15 void startUpdater(void);
shimniok 0:a6a169de725f 16
shimniok 15:01fb4916a5cd 17 /** detach the update routine from Ticker interrupt */
shimniok 15:01fb4916a5cd 18 void stopUpdater(void);
shimniok 15:01fb4916a5cd 19
shimniok 0:a6a169de725f 20 /** Returns the elapsed time taken by the updater routine on its most recent run */
shimniok 0:a6a169de725f 21 int getUpdateTime(void);
shimniok 0:a6a169de725f 22
shimniok 0:a6a169de725f 23 /** Indicates to the updater that the vehicle should begin its run */
shimniok 0:a6a169de725f 24 void beginRun(void);
shimniok 0:a6a169de725f 25
shimniok 0:a6a169de725f 26 /** Indicates to the updater that the vehicle should abort its run */
shimniok 0:a6a169de725f 27 void endRun(void);
shimniok 0:a6a169de725f 28
shimniok 0:a6a169de725f 29 /** Tells the updater to re-initialize the navigation state */
shimniok 0:a6a169de725f 30 void restartNav(void);
shimniok 0:a6a169de725f 31
shimniok 15:01fb4916a5cd 32 /** Sets the desired speed of the rover */
shimniok 15:01fb4916a5cd 33 void setSpeed(float speed);
shimniok 15:01fb4916a5cd 34
shimniok 15:01fb4916a5cd 35 /** Sets the steering angle */
shimniok 15:01fb4916a5cd 36 void setSteering(float steerAngle);
shimniok 15:01fb4916a5cd 37
shimniok 0:a6a169de725f 38 /** The function that is called at 100Hz. It reads sensors, performs estimation, and controls the robot */
shimniok 0:a6a169de725f 39 void update(void);
shimniok 0:a6a169de725f 40
shimniok 0:a6a169de725f 41 #endif