Go to Post "We'll fix that in programming" - EStokely [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 25-11-2009, 21:16
jmanela's Avatar
jmanela jmanela is offline
+1 is BIGGER than -1
AKA: Joshua Manela
FRC #2586 (Fondy Fire)
Team Role: College Student
 
Join Date: Aug 2008
Rookie Year: 2009
Location: Michigan
Posts: 314
jmanela is a splendid one to beholdjmanela is a splendid one to beholdjmanela is a splendid one to beholdjmanela is a splendid one to beholdjmanela is a splendid one to beholdjmanela is a splendid one to beholdjmanela is a splendid one to behold
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,
__________________
||2009|| Entrepeneurship Award, QF - Traverse City | Rookie All Star, QF - Detroit | Highest Rookie Seed, Rookie All Star, QF - Michigan State Championship | Finalist - MARC ||2010|| Engineering Inspiration, Website Award, SF- Kettering | Judges Award, Website Award, SF - Detroit | Website Award, Winner, Michigan State Champ //Thank you 469 and 1918!! | Finalist - MARC ||2011|| Engineering Inspiration, Website - Kettering | Entrepreneurship, Website, Finalist - Waterford | Website - MSC
Reply With Quote
  #2   Spotlight this post!  
Unread 26-11-2009, 00:48
RoboMaster's Avatar
RoboMaster RoboMaster is offline
Alum, former programmer&co-captain
FRC #2472 (The Centurions)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Minnesota, Twin Cities
Posts: 268
RoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant future
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!
__________________
My engineering blog: noeticbrainwaves.blogspot.com

I'm not slacking, my code's compiling
...and I'm using LabVIEW
Reply With Quote
  #3   Spotlight this post!  
Unread 26-11-2009, 00:55
Chris is me's Avatar
Chris is me Chris is me is offline
no bag, vex only, final destination
AKA: Pinecone
FRC #0228 (GUS Robotics); FRC #2170 (Titanium Tomahawks)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Glastonbury, CT
Posts: 7,621
Chris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond repute
Send a message via AIM to Chris is me
Re: Controlling Autonomous GamePlan

Quote:
Originally Posted by RoboMaster View Post
-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.
1714 did it this way for our first two events. The robot reads the switch data before the match begins if I understand correctly so it's not communicating with the DS during auto (much like the joystick solution you posted above). I didn't code it so I can't tell you any more than that.
-Chris
__________________
Mentor / Drive Coach: 228 (2016-?)
...2016 Waterbury SFs (with 3314, 3719), RIDE #2 Seed / Winners (with 1058, 6153), Carver QFs (with 503, 359, 4607)
Mentor / Consultant Person: 2170 (2017-?)
---
College Mentor: 2791 (2010-2015)
...2015 TVR Motorola Quality, FLR GM Industrial Design
...2014 FLR Motorola Quality / SFs (with 341, 4930)
...2013 BAE Motorola Quality, WPI Regional #1 Seed / Delphi Excellence in Engineering / Finalists (with 20, 3182)
...2012 BAE Imagery / Finalists (with 1519, 885), CT Xerox Creativity / SFs (with 2168, 118)
Student: 1714 (2009) - 2009 Minnesota 10,000 Lakes Regional Winners (with 2826, 2470)
2791 Build Season Photo Gallery - Look here for mechanism photos My Robotics Blog (Updated April 11 2014)

Last edited by Chris is me : 26-11-2009 at 01:05.
Reply With Quote
  #4   Spotlight this post!  
Unread 26-11-2009, 02:41
nathanww nathanww is offline
Hacker
FRC #1678 (Citrus Circuits)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2007
Location: Davis, CA
Posts: 224
nathanww is just really nicenathanww is just really nicenathanww is just really nicenathanww is just really nice
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.
__________________
Get yer robot source code here!
Reply With Quote
  #5   Spotlight this post!  
Unread 26-11-2009, 15:59
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #6   Spotlight this post!  
Unread 27-11-2009, 00:20
ezygmont708's Avatar
ezygmont708 ezygmont708 is offline
FAIL = First Attempt In Learning
AKA: Zygmont
FRC #0708 (Hatters Robotics)
Team Role: Mentor
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Horsham, PA
Posts: 91
ezygmont708 has a brilliant futureezygmont708 has a brilliant futureezygmont708 has a brilliant futureezygmont708 has a brilliant futureezygmont708 has a brilliant futureezygmont708 has a brilliant futureezygmont708 has a brilliant futureezygmont708 has a brilliant futureezygmont708 has a brilliant futureezygmont708 has a brilliant futureezygmont708 has a brilliant future
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"
Attached Files
File Type: pdf Autonomous Mode Switch.pdf (289.6 KB, 66 views)
__________________
E. Zygmont
Team Lead - Team 708 Hatters Robotics
Hatboro- Horsham Senior High School - Horsham, PA
Reply With Quote
  #7   Spotlight this post!  
Unread 27-11-2009, 11:47
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Controlling Autonomous GamePlan

Quote:
Originally Posted by nathanww View Post
The competition sequence goes:
watchdog override->disabled->autonomous->disabled(?)->teleop->disabled
The first part of that apparently isn't always the case when using FMS-lite. We didn't spend any time trying to figure out exactly what was going on at CAGE, but our 2009 robot's autonomous didn't run consistently. Its autonomous selection defaults at bootup to "none", reads an analog input from the Driver Station a half second into disabled mode to set the desired routine, and uses that setting as soon as it gets enabled. It also allows the operator to step through the routines using a pair of joystick buttons at any time before autonomous mode is commanded. The currently selected mode is displayed on the bottom line of the DS display. Even though we only had one routine programmed, and the pot on the analog input was locked in place, we discovered that we sometimes had to use the alternate method to force the autonomous program to run at all.

There was enough field-control frustration that day for us to just shrug and do whatever worked.
Reply With Quote
  #8   Spotlight this post!  
Unread 28-11-2009, 13:23
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,513
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
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.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 04:39.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi