View Full Version : Hibner: Flexible, Scripted Autonomous Control
Chris Hibner
20-04-2011, 09:39
At the FIRST Robotics Conference I will be presenting a strategy for autonomous software design. The presentation will be Wednesday 6:00 p.m.
Here's the abstract:
Creating a new autonomous routine can take less than one minute. This presentation describes a strategy for autonomous programming which allows ultimate flexibility. Robot control is broken down into simple pieces that can be strung together with simple scripts that can be stored on the cRIO. Making an entirely new autonomous routine is as simple as creating a new script, saving it on the cRIO, then selecting it before the start of the match. Variations of this method have been used successfully since 2003.
The presentation is not about what to do during the autonomous period. It's about how to architect your software to make it do what YOU want it to do with extreme flexibility. Tired of re-building and delpoying software between matches to change your autonomous? With this strategy, there is no need to re-build software.
The presentation will be highly interactive and audience participation will be highly encouraged (Pavlov would be proud). Throughout the presentation, working autonomous software will be developed with audience input. This means there will be a live example, which is a little scary for me, but it should be fun. If nothing else, you can come and witness the potential train wreck.
If there is anything you would like to see addressed, feel free to post it in this thread.
This sounds excellent. Unfortunately I'll be packing in on Wednesday night.
Hopefully you plan to capture your presentation in some sort of whitepaper. :)
Good luck.
marccenter
20-04-2011, 11:37
Chris,
I would encourage you to post your presentation to the white paper section of Chief Delphi even before the FIRST presentation in order to gather possible feedback for your material. If you have a lot of pictures you will most likely exceed Chief Delphi's size limit. In that case, you need to email to an admin (brandon martus) in order for him to post it for you.
Congrats on being a speaker! There are a lot of students hanging around Nationals with time on their hands (pits are small) that can benefit from
your experience!
Jon Stratis
20-04-2011, 11:54
A semi-related question... This is going to be our first trip to Championships, so exactly how does this work Wednesday evening? The pits are open to 5 people. To send someone to this presentation, do they have to be part of that pit crew, or can they be separate? I'm not sure we can spare spots in our Wed. night pit crew for this.
I know something like this would be very well received by my team - we even played around with something similar in the off-season a few years ago!
spacepenguine
20-04-2011, 12:33
This sounds like a great presentation! I'm actually working on developing something like this right now for our team. Unfortunately, we wont be at nationals this year. Is there any chance you are recording/streaming this/posting a corresponding white paper?
Chris Hibner
20-04-2011, 13:02
Here are some answers to the questions so far:
Is there any chance you are recording/streaming this/posting a corresponding white paper?
I believe WPI has recorded presentations in the past and have them available online. Coleen would have to answer that.
As for a whitepaper, all of the presentation materials and example source code to help get you started will be available here on chiefdelphi.com after the championship. I doubt I'll have time to get it refined to the point where I can post it before the championship in enough time for people to review it. I'll try, but I'm not counting on it.
A semi-related question... This is going to be our first trip to Championships, so exactly how does this work Wednesday evening? The pits are open to 5 people. To send someone to this presentation, do they have to be part of that pit crew, or can they be separate? I'm not sure we can spare spots in our Wed. night pit crew for this.
The conference is not held in the pit area, so you do not have to lose one of your pit spots to attend the conference. However, since this presentation will be during the Wednesday pit window you won't be able to be in two places at the same time.
There is an admission fee to the conference. Details are available at: http://www.usfirst.org/roboticsprograms/firstplace/content.aspx?id=19359
wireties
20-04-2011, 14:28
This is exactly how our (FIRST Team 1296) autonomous mode works. Our major functions are isolated in separate tasks, each monitoring a message queue. In teleop mode, we translate the DS inputs to messages and send them to each function/task. In auto mode, a dedicated task reads a text file and sends the same sets of messages. The script is modal, executing different blocks depending on the alliance and starting position. But we also download new text files w/o changing the robot firmware.
We look forward to your white paper.
Interesting.
I run a system where I write auto code in script files, which are read by an interpreter and executed line by line, by calling the appropriate function with arguments (by looking up the command by name and calling it by ref).
CoachPoore
20-04-2011, 16:03
This is also very similar to the way we do autonomous. We build an autonomous virtual machine with a robot/game specific instruction set. The virtual machine can execute one of any number of different programs which can be specified independently. Being able to tune autonomous and write new autonomous programs without really changing your robot code is invaluable. I'd recommend this kind of approach to anyone, and also look forward to seeing the presentation/white paper.
Noel
Chris Hibner
20-04-2011, 21:19
I also forgot to mention:
The presentation and examples will be developed in LabVIEW, BUT examples will also be given for text-based languages.
wireties
21-04-2011, 07:03
I also forgot to mention:
The presentation and examples will be developed in LabVIEW, BUT examples will also be given for text-based languages.
A lexer and parser in LabVIEW? This might get ugly... ;o)
siggy2xc
21-04-2011, 07:09
We actually have ours set up where u can record what you do then play that back for autonomous.
We actually have ours set up where u can record what you do then play that back for autonomous.
I assume what you are recording (and playing back) is just a time-based profile of the the driver inputs?
The advantage to what Chris is describing is that -- assuming you have the necessary sensors installed and control loops coded -- you can quickly type up a script that says for example "go forward exactly 15 feet; slide to the left exactly 39 inches; raise the elevator to the 55 inch position; position the arm at 63 degrees" etc etc.
A lexer and parser in LabVIEW? This might get ugly... ;o)
I wrote a script interpreter in LabVIEW, it's not ugly at all. It looks very nice, actually.
It reads the text file, splits it into lines, then parses it line by line.
Foreach line, it determines if it is a comment or contains less than 3 characters (and skips it if it does), then splits up the line's text by spaces, taking the first block of text and finding a command with that name, and calling it byref and feeding it the arguments (the rest of the text) as an array of strings. Generally, the functions either take those strings and turn them into doubles, or compare them to constants (to determine an enumerated type).
I spent a little while debugging it on Windows before running it on a robot, and most of my errors were from not initializing shift registers.
Chris Hibner
25-04-2011, 19:15
A lexer and parser in LabVIEW? This might get ugly... ;o)
Who says you need a parser? :)
The method I'm presenting is actually incredibly simple. I think most people will be very surprised at how simple it is and how little code it will take.
Chris Hibner
25-04-2011, 19:19
I just finished doing a dry run of the presentation and I hit the "Questions?" slide at the 48 minute mark. That means I have a lot to cover and it's running a few minutes long.
If you would like to come to this presentation, please try and show up a little early. I have 15 minutes worth of setup time, and I hope to only use about 5 minutes of that. Therefore, if the crowd is good I can at least get through the introductions and stuff a few minutes early and get rolling with the heavy stuff right at the top of the hour.
wireties
25-04-2011, 20:09
Who says you need a parser? :)
The method I'm presenting is actually incredibly simple. I think most people will be very surprised at how simple it is and how little code it will take.
So you have a text file that tells the robot what to do in autonomous mode - and you don't have to break it down into tokens/words/lines nor compare the tokens to known/expected words/numbers? And this is something that will not blow up if it sees something unexpected in the script? This does sound unusual - I look forward to the presentation.
Chris Hibner
13-05-2011, 12:25
Sorry for taking so long to post the presentation material and code samples. I tried posting them this morning from work, but after I posted the CD media paper did not have any of my files in it. I'm not sure if it is a problem with CD Media, or if the problem is on my side. I'll try posting again once I get home tonight.
Tom Line
13-05-2011, 12:42
Sorry for taking so long to post the presentation material and code samples. I tried posting them this morning from work, but after I posted the CD media paper did not have any of my files in it. I'm not sure if it is a problem with CD Media, or if the problem is on my side. I'll try posting again once I get home tonight.
It appears that it is not just you - the four or five papers posted today are all file-less and title-less.
Chris Hibner
19-05-2011, 08:17
The presentation material and code samples are now posted in the CD Media "papers" area. Sorry it took so long. Big thanks to Brandon for getting them uploaded.
As I said in the CD Media discussion thread: please let me know if you are having any issues getting it to run. It will most likely be a very simple fix. I want this to be useful to everyone so if you uncover a problem, please let me know so that I can fix it for everyone.
The material can be found here: http://www.chiefdelphi.com/media/papers/2553?
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.