|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Revolutionizing autonomous
Last year, my team decided that creating our autonomous mode was taking too long. We had to change code, download, restart the CRio, etc. EVERY TIME. So, my mentors encouraged me to find a way to speed up the process, and I believe the result is quite helpful. It's a set of classes that can be extended to automatically set up a way to edit autonomous code on the fly so you don't have to re-download and restart the CRio just to change a simple variable. This makes having multiple autonomous sequences easy to manage, and brings extreme flexibility to that section of the game. The only downside that it only works for teams using the command base, and it is a little tricky to set up.
Here's how it works: Using the SmartDashboard and RobotPreferences, the robot is provided by a real-time stream of data which the user can change. The user can enter a string of numbers and letters symbolizing a sequence of commands, and the robot will automatically parse the string and create an autonomous command, and it can be changed at a moments notice. For example, you could input D 1,5,5; B 2; And it could mean drive for 1 second at speed 5 left and right, then use the bucket for 2 seconds. D and B would be linked to certain commands, so the parser knows what they mean; And, if you change it to D 1,4,4; B 2 The parser will recognize the change and create a new autonomous command which is ready to be used immediately. To get the code and more thorough documentation of how to use it, see my git repo. https://github.com/Ipiano/Parsable_Autonomous Let me know your thoughts. I personally find this to be quite useful, and I hope you do too. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|