![]() |
Multiple Autonomous Programs
Hello all,
I am currently trying to think of a way for my drivers to pick what autonomous code to use before a match, preferably queuing. I was wondering what would be a good way to do this. I was thinking that while the robot is disabled, I display what autonomous to pick in the SmartDashboard. What do you guys think? |
Re: Multiple Autonomous Programs
Yup, the SendableChooser object in C++/Java/Python works great for this sort of thing.
|
Re: Multiple Autonomous Programs
Quote:
|
Re: Multiple Autonomous Programs
One of the most important factor in this game is the PROGRAMMER. According to the Alliance the programmer must be able to redo their autonomous game to suit the alliance.
What do you think?:cool: |
Re: Multiple Autonomous Programs
Quote:
For that reason, I'd like to utilize my experimental auto scripting language, as I think it will be important to quickly modify auto modes during an event. I was even considering some kind of graphical interface to quickly build and modify auto modes. Like maybe have a diagram of the field, and simply plot points that the robot should go to, and add actions at each point. It's certainly something I'll experiment with. |
Re: Multiple Autonomous Programs
We will be using some kind of scripting this year, most likely Lua, for auton. The drive team will need some kind of UI to select what to do, but it needs to be quick and easy for them. The programmers will have more time to write and debug complex interactions then the drive team will have just before a match. It is my hope that the programming team will get it down to just a handful (<=5) of SendableChooser objects.
|
Re: Multiple Autonomous Programs
In past years, our team has put 2 mechanical switches on the robot, and for every configuration of the switch (ON ON, ON OFF, OFF ON, OFF OFF), you could have a different autonomous code. All you had to do was put the code in an if statement and write a notecard out to the drivers explaining what flipping the switches would do for the autonomous. You could have as many as you wanted, but 4 seemed to be the magic number for us. This method worked the best when we didn't have any programmers, but a team full of mechanical kinds of people.
However, we've been experimenting in recent years with the SmartDashboard, and if you want a more updated method, picking straight from there is the way to go. :) |
Re: Multiple Autonomous Programs
Just today our team put together a way of selecting autonomous programs through the SmartDashboard. We're not using a command-based framework, so we made it work using pointers to functions. You just make a function for each possible autonomous mode, use a SendableChooser to pick a function, and have the actual AutonPeriodic function just run the chosen function. Anyone who's curious can check it out on github here.
Function pointers are unholy magic though, so stick to Commands if you're not lazy and old-fashioned like us. |
Re: Multiple Autonomous Programs
So much work!
We just used A and Y to swap between modes. https://github.com/1684Chimeras/2014...utonomous.java |
Re: Multiple Autonomous Programs
Quote:
|
Re: Multiple Autonomous Programs
Quote:
|
Re: Multiple Autonomous Programs
Quote:
jeez, have fun friend. LUA is a major pain, speaking from personal experience. |
Re: Multiple Autonomous Programs
We used the driver station digital inputs to select our autonomous mode last year. We originally had a physical 3-stage switch on our driver station which was wired into the Cypress which was connected to our driver station laptop, however, our Cypress stopped working so we literally just clicked an individual digital Input on the driver station, under "D I/O" and referenced each digital input in our autonomous code, so different digital inputs would correspond to a different auton mode. I mean....it worked...
|
Re: Multiple Autonomous Programs
Sparkfun has a great 10 position switch and a breakout board for it that would make it quite simple to add up to 10 different Auto modes to you drive's station.
You can use the TI LaunchPad from the KOP as another HID device and connect all 10 inputs to it if you needed that many. |
Re: Multiple Autonomous Programs
Sorry to revive this thread after a couple weeks, haven't checked this thread in while :(
Anyway, i have made a system in java where it loads a autonomous mode inheriting a base class, makes it pretty simple to create. It also loads depending on the robot, since our team uses multiple robots ;) https://github.com/SCOTS-Bots/FRC-20...peration/auton |
| All times are GMT -5. The time now is 02:43. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi