David's line following code from the LVBots competition, 2015.

Dependencies:   GeneralDebouncer Pacer PololuEncoder mbed

Fork of DeadReckoning by David Grayson

Changes

RevisionDateWhoCommit message
57:99bec7fab454 2015-04-16 DavidEGrayson Doubled the encoder counts for indicating the end of the course because we might have to start a little bit back from the finish line. default tip
56:55b1473f9e3b 2015-04-16 DavidEGrayson Made the y tolerance in foundStart less strict because sometimes the wobble from the robot makes it hard to hit that target exactly.
55:05c8f439497d 2015-04-16 DavidEGrayson This commit works!! I recorded its logs in reckon_course_12.ods
54:1ca4e748e098 2015-04-16 DavidEGrayson tinkering with the lookaheadamount parameter;
53:73565a3ef5c5 2015-04-16 DavidEGrayson just committing to be safe because the robot is working pretty well now
52:05a8e919ddb0 2015-04-15 DavidEGrayson It learned the course, holy shit!
51:b9f7243609d4 2015-04-15 DavidEGrayson got it to detect the starting point better;
50:517c0f0e621f 2015-04-15 DavidEGrayson got it to detect roughly when it gets back to the center, but then I tried to make it fancier and it stopped working
49:eaa6fd514f4f 2015-04-15 DavidEGrayson something?;
48:c84b7b3ab0e8 2015-04-15 DavidEGrayson made it record entries every 200 encoder counts, instead of every 200 ms;
47:cb5c1504c24d 2015-04-15 DavidEGrayson fixed something in logger;
46:f11cb4f93aac 2015-04-15 DavidEGrayson got dead reckoning working nicely with the gyro;
45:e16e74bbbf8c 2015-04-15 DavidEGrayson got turn sensor working;
44:edcacba44760 2015-04-15 DavidEGrayson Got the L3GD20H working, but I'm having trouble with TurnSensor.
43:6cb32548c1b4 2015-04-14 DavidEGrayson at speed 1100, and voltage 4.9, it manages to follow
42:ead542746cd2 2015-04-14 DavidEGrayson pushed speed from 800 to 1000. It goes off the course in a few places but then it gets back on.
41:4a4be80ff38c 2015-04-14 DavidEGrayson pushed speed up from 600 to 800, no problems
40:e79cefc241f8 2015-04-14 DavidEGrayson added that derivative term;
39:a5e25fd52ff8 2015-04-14 DavidEGrayson Made it follow the line a little faster (600 out of 1200). Need a derivative term though, because it oscillates back and forth on the straight part.
38:5e93a479c244 2014-03-13 DavidEGrayson The final version of the code that was used for the competition.;
37:23000a47ed2b 2014-03-06 DavidEGrayson With a boost 0.2% to handleRight in the Reckoner, this code did very well on the course twice!! Then I ran it the other way and it was more than a foot off :(
36:ccb03b734737 2014-03-06 DavidEGrayson Reckoner: The order of changing cos and sign matters! I fixed it.
35:d365d755c686 2014-03-05 DavidEGrayson Stuff.
34:6c84680d823a 2014-03-05 DavidEGrayson Not sure.;
33:58a0ab6e9ad2 2014-03-05 DavidEGrayson Bunch of stuff. Then reduced drivingSpeed to 400.
32:83a13b06093c 2014-03-04 DavidEGrayson getting line sensors to work again;
31:739b91331f31 2014-03-04 DavidEGrayson testLineSensors seems to work fine with QTR-3RC.
30:84be2d602dc0 2014-03-04 DavidEGrayson Seems like the QTR-3RC could work, based on my tests on P10.
29:cfcf08d8ac79 2014-03-04 DavidEGrayson trying to figure out the analog problem;
28:4374035df5e0 2014-03-01 DavidEGrayson Discovered that 4 out of the 6 analog inputs on the mbed are severely messed up. Might need to get a new mbed or do digital filtering (a median of three readings out to work).
27:2456f68be679 2014-03-01 DavidEGrayson Fixed a major bug in the line following (reduceSpeed return value was not used). Made finalSettleIn better by adding an integral term and increasing the settleSpeed from 200 to 300.
26:7e7c376a7446 2014-02-28 DavidEGrayson This is my attempt to make it hang on to the line better after finding it. I found a really bad bug in followLineToEnd that might explain all the problems, but I also changed the loadCalibrationAndFindLine function so it doesn't overshoot.
25:73c2eedb3b91 2014-02-28 DavidEGrayson Some stuff. I am about to take away the foundLineTimer in an attempt to make it better at finding the line.
24:fc01d9125d3b 2014-02-28 DavidEGrayson Fixed the problem with LineTracker always thinking the line was visible.
23:aae5cbe3b924 2014-02-28 DavidEGrayson Stuff;
22:44c032e59ff5 2014-02-28 DavidEGrayson Fixed the code for calibrating. Added testCalibrate.
21:c279c6a83671 2014-02-27 DavidEGrayson Wrote a whole bunch of code that could theoretically allow the robot to compete, but it has not been tested at all yet.
20:dbec34f0e76b 2014-02-27 DavidEGrayson Broke up driveHome into two functions.
19:a11ffc903774 2014-02-25 DavidEGrayson Got the robot to get back to its home position and stop.
18:b65fbb795396 2014-02-24 DavidEGrayson Got the robot to face towards home!
17:2df9861f53ee 2014-02-24 DavidEGrayson Created a stub driveHome routine that we need to fill in.
16:8eaa5bc2bdb1 2014-02-24 DavidEGrayson Got debounced button pressing to work.
15:4df8c50b5e91 2014-02-24 DavidEGrayson Finished experiments and change the value of dA to an experimentally determined value.;
14:c8cca3687e64 2014-02-24 DavidEGrayson Started doing an experiment to see what dA really is.
13:bba5b3abd13f 2014-02-23 DavidEGrayson testReckoner routine works great! I can roll my robot around and it always knows what quadrant it is pointing to and knows what quadrant it is in!
12:835a4d24ae3b 2014-02-23 DavidEGrayson Made the Reckoner class and wrote a routine to help test it.;
11:bd14d512340a 2014-02-22 DavidEGrayson Added a button on p13. This will be helpful in a bit for testing my algorithms when there are two stages involved.
10:e4dd36148539 2014-02-22 DavidEGrayson Successfully tested the encoders, printing out a nice bar graph.
9:9734347b5756 2014-02-22 DavidEGrayson Made verything use CamelCase.;
8:78b1ff957cba 2014-02-22 DavidEGrayson refactored into many files
7:85b8b5acfb22 2014-02-21 DavidEGrayson Setting more PWM registers now, but the call to period_us is still necessary for some reason.
6:89a39870e23d 2014-02-20 DavidEGrayson Got high-resolution 20 kHz PWM.
5:01ad080dc4fa 2014-02-20 DavidEGrayson Succeeded in getting high resolution PWM.
4:1b20a11765c8 2014-02-20 DavidEGrayson Succeeded in generating basic PWM signals with PwmOut.
3:59c80d4b4bf2 2014-02-20 DavidEGrayson Done working on encoder stuff for now.;
2:968338353aef 2014-02-20 DavidEGrayson Moved the code to enable pull-ups into the app.
1:d0d9653a4547 2014-02-20 DavidEGrayson Added pacers.
0:e77a0edb9878 2014-02-20 DavidEGrayson Got basics working. See commit for library.