|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
Controlling Autonomous GamePlan
I know there are alot of methods to choose which autonomous you want to run before a match, can you please give some examples?
Thanks, |
|
#2
|
||||
|
||||
|
Re: Controlling Autonomous GamePlan
I think this depends whether or not you have time to do a quick switch in your programming and re-download the code before a match, or you have to quickly switch tactics right away and it would be better to flip a physical switch. Which one are you talking about?
If you're talking about the first, here's how I would do it: Make a case structure and put the code for the different strategies of autonomous in the different cases. Wire up a constant or a dashboard control to the case structure to decide which strategy you want to use. Then before you download your preferred code, switch this constant or control to the case that you want. If you want something more immediate, there's a whole bunch of different ways for taking the value of a physical switch and using that to determine which case to do. Basically you read from that switch and change the case structure I was talking about depending on its value. Here's some ideas: -Throttle on the joysticks: On the new 2009 joysticks there is a throttle that can be used like a switch if you aren't using it already. This is handy because you don't have to wire anything else extra up to the robot. It is the up-down dial that's front and center. You can read it's value in the code and see if it's greater than or less than 0.5/the middle. This effectively means if it's up or down. Before the match, you can switch this throttle to the desired position. -Switch on the robot Go to Radio Shack, buy a switch. Mount said switch on robot. Wire said switch to the digital sidecar. Switch said switch before match. Test said switch in code and switch the case structure depending on its value -Switch on driver station Pretty much the same as above, but hook it up to a driver station digital input. Actually, I don't know if this will work because the driver station might not be able to send data to the robot during autonomous during an official match. Keep in mind it might be nice to put the different code in individual subVIs so that it's cleaner and the case structure isn't huge. Hope that helps! Please ask if you need something more specific concerning one of these options! |
|
#3
|
||||
|
||||
|
Re: Controlling Autonomous GamePlan
Quote:
-Chris Last edited by Chris is me : 26-11-2009 at 01:05. |
|
#4
|
|||
|
|||
|
Re: Controlling Autonomous GamePlan
The competition sequence goes:
watchdog override->disabled->autonomous->disabled(?)->teleop->disabled The robot has no problems doing IO to the DS when it's in disabled mode, which is what you see when teams are loading and the field is being set up. Our biggest challenge with using this time period was that that period can be a little hectic for the drivers, since they have to do robot loading, last-minute tactics, and the pre-match checklist. |
|
#5
|
|||
|
|||
|
Re: Controlling Autonomous GamePlan
Last year, the DS allowed switch settings through until the mode was enabled. This meant that the right way to use it was to latch the data during disable, and ignore what was sent in enable. I believe that this will now be done for you, and you can simply read the value and during enable, it will give the value from the last disable packet.
Greg McKaskle |
|
#6
|
||||
|
||||
|
Re: Controlling Autonomous GamePlan
Attached is a PDF of what TEAM 708 used this year. It is a binary switch, allowing many autonomous modes to be pre-programmed into the robot and switched depending on competition variables i.e. starting position, game strategy.
The last slide is a list of items needed to put this "Switch Box" |
|
#7
|
|||||
|
|||||
|
Re: Controlling Autonomous GamePlan
Quote:
There was enough field-control frustration that day for us to just shrug and do whatever worked. |
|
#8
|
||||
|
||||
|
Re: Controlling Autonomous GamePlan
We've used 3 methods.
In '07, we used the user-byte feature to display the autonomous mode in disabled, and indexed the number up or down using buttons hooked to i/o. In '08, we used the remote control. In '09, we used the two throttles on our tankdrive joysticks. One was distance, the other angle (fed back through the driver station LCD). Right now, we've also prorammed a simple count-up / count-down on driver joystick button press so we can use the '07 method on the new control system with feedback through the 2010 driverstation user messages screen. It updates using the same LCD library the '09 one did. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Controlling | team 803 | Programming | 10 | 21-02-2006 13:56 |
| Controlling motors | railerobotics | Programming | 6 | 17-01-2006 17:17 |
| Problem controlling a servo | Entropia | Programming | 2 | 18-06-2005 18:36 |