Go to Post I'm basically only posting this so that future Shaker Robotics kids will see it and tell themselves "never again"... - Chris is me [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-03-2009, 19:50
psychomonkey psychomonkey is offline
Mr. February
AKA: Seth Rhodes
FRC #1592 (Bionic Tigers)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Fairbanks, Alaska
Posts: 23
psychomonkey is an unknown quantity at this point
Question Autonomous selection from dashboard

Hello everybody,
I would like to be able to have an enumerated constant on the dashboard to switch between the different autonomous codes that I have. I am using a case structure to flip between codes. I can hook an enumerated constant directly to the case structure, but I would like to make it a global variable so as to reference it from the dashboard. Is it even possible to reference autonomous independent vi to the dashboard in the basic framework?
__________________
In a time... When the greatest comeback occured... There was... MR. FEBRUARY!!!
  #2   Spotlight this post!  
Unread 01-03-2009, 20:07
Chexposito's Avatar
Chexposito Chexposito is offline
Registered User
AKA: Expo
FRC #1730
Team Role: Alumni
 
Join Date: Feb 2009
Rookie Year: 2007
Location: Missouri
Posts: 272
Chexposito is a glorious beacon of lightChexposito is a glorious beacon of lightChexposito is a glorious beacon of lightChexposito is a glorious beacon of lightChexposito is a glorious beacon of lightChexposito is a glorious beacon of light
Re: Autonomous selection from dashboard

Through the basics I learned through our programers, the only effect the control box has on autonomous is the disable. We just use switches on the robot because they work and there's a lot less hassle for the robot to identify the code you want it to use and it is faster to install on the robot and the code writing seems to be easier. If you really want to try keep people updated because our team had a mentor that tried to but couldn't figure it out and just reverted back to the switches on the robot.
  #3   Spotlight this post!  
Unread 01-03-2009, 20:18
Booksy Booksy is offline
Registered User
FRC #1244 (Viking Robotics)
Team Role: Programmer
 
Join Date: Apr 2008
Rookie Year: 2007
Location: Great White North
Posts: 97
Booksy will become famous soon enoughBooksy will become famous soon enough
Re: Autonomous selection from dashboard

I may be wrong, but I thought that you couldn't use a computer for input during competition? Wouldn't a control on the dashboard be useless if you can't use it? Am I missing something?

Why not use a switch wired to the DIO pins of the DS? That's what I plan on doing for autonomous mode selection. I would rather have switches on the control board than on the robot. That way I can check right before the match and be absolutely sure, plus I plan on putting a bunch of other stuff with it, LEDS and the like. Maybe a 7seg if I get really bored between now an Mar 26.
__________________
My favorite CD quote ever(taken out of context of course):
Quote:
Originally Posted by ttldomination
water would be hard to build
  #4   Spotlight this post!  
Unread 01-03-2009, 21:34
BigJ BigJ is offline
Registered User
AKA: Josh P.
FRC #1675 (Ultimate Protection Squad)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Milwaukee, WI
Posts: 947
BigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond repute
Re: Autonomous selection from dashboard

While 1675 was messing around with more autonomous routines at Midwest this weekend, we found out that (at least the way we were doing it) when you try to read the digital IO pins in autonomous, it takes them from the state they were at driver station boot.

If you go this route, make sure you thoroughly test your system and that drivers know of any special procedures they need to follow to choose the mode they want.

(We ended up not putting it in yet because we only used one autonomous routine.)
  #5   Spotlight this post!  
Unread 01-03-2009, 21:49
psychomonkey psychomonkey is offline
Mr. February
AKA: Seth Rhodes
FRC #1592 (Bionic Tigers)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Fairbanks, Alaska
Posts: 23
psychomonkey is an unknown quantity at this point
Re: Autonomous selection from dashboard

Well, if input isn't allowed, that does make it slightly easier. Now I just need to find out how to wire a boolean to an actual switch or potentiometer on the DIO of the DS. btw, I am not only the programmer this year, but I am also the electrician and driver. Keeping myself up to date should be easy.
__________________
In a time... When the greatest comeback occured... There was... MR. FEBRUARY!!!
  #6   Spotlight this post!  
Unread 01-03-2009, 22:00
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,047
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
Re: Autonomous selection from dashboard

Quote:
Originally Posted by BigJ View Post
While 1675 was messing around with more autonomous routines at Midwest this weekend, we found out that (at least the way we were doing it) when you try to read the digital IO pins in autonomous, it takes them from the state they were at driver station boot.

If you go this route, make sure you thoroughly test your system and that drivers know of any special procedures they need to follow to choose the mode they want.

(We ended up not putting it in yet because we only used one autonomous routine.)

We implemented a similar select auto program from OI method as we've used in past years, except we didn't use the Driver Station's digital IO - instead, we used the left and right stick push buttons on our Logitech gamepad to select start position and program number, respectively:

(This is obviously Wind River code. The code resides in the "Disabled Periodic" routine.)

Code:
/* * Determine the autonomous start position and program number. 1 = NEAR, 2 = CENTER, 3 = FAR Use left stick push for start pos cycle; right stick push for program cycle. */
#define MAXPOS 3
#define MAXPROG 8
//starting position if (not autopos_sw) autostartlock = 0; if ( (autopos_sw) && (autostartlock == 0) ) { if (autostartpos < MAXPOS) { autostartpos++; } else { autostartpos = 1; }
autostartlock = 1; }
//autonomous program number if (not autoprog_sw) autoproglock = 0;
if ( (autoprog_sw) && (autoproglock == 0) ) {
if (autoprognum < MAXPROG) { autoprognum++; } else { autoprognum = 1; }
autoproglock = 1;
}
//Update the LCD Display
Write2LCD();



Write2LCD contains code which updates the nifty new user-writeable DS LCD display screen with robot info, including text descriptions of each auto program we run. Who needs a PC dashboard, anyway?
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner
  #7   Spotlight this post!  
Unread 01-03-2009, 22:14
psychomonkey psychomonkey is offline
Mr. February
AKA: Seth Rhodes
FRC #1592 (Bionic Tigers)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Fairbanks, Alaska
Posts: 23
psychomonkey is an unknown quantity at this point
Re: Autonomous selection from dashboard

Now THAT is really cool! If I could assign a button on the left most joystick to toggle between autonomous codes, that would be !@#$ hot! How would you go about using the LCD of the DS in LabView?
__________________
In a time... When the greatest comeback occured... There was... MR. FEBRUARY!!!
  #8   Spotlight this post!  
Unread 01-03-2009, 22:19
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,047
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
Re: Autonomous selection from dashboard

Quote:
Originally Posted by psychomonkey View Post
Now THAT is really cool! If I could assign a button on the left most joystick to toggle between autonomous codes, that would be !@#$ hot! How would you go about using the LCD of the DS in LabView?
http://thinktank.wpi.edu/article/144
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner
  #9   Spotlight this post!  
Unread 01-03-2009, 22:23
psychomonkey psychomonkey is offline
Mr. February
AKA: Seth Rhodes
FRC #1592 (Bionic Tigers)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Fairbanks, Alaska
Posts: 23
psychomonkey is an unknown quantity at this point
Re: Autonomous selection from dashboard

Wow, that is really useful! Thank you so much!
__________________
In a time... When the greatest comeback occured... There was... MR. FEBRUARY!!!
  #10   Spotlight this post!  
Unread 01-03-2009, 23:45
intellec7's Avatar
intellec7 intellec7 is offline
108 programmer
AKA: Gustavo
FRC #0108 (SigmaC@ts)
Team Role: Programmer
 
Join Date: Sep 2005
Rookie Year: 2006
Location: Hollywood, Florida
Posts: 65
intellec7 is on a distinguished road
Send a message via AIM to intellec7 Send a message via MSN to intellec7
Re: Autonomous selection from dashboard

The protocol for the dashboard allows only communication from the cRIO to the DS.
  #11   Spotlight this post!  
Unread 02-03-2009, 06:59
mgurgol mgurgol is offline
Registered User
FRC #1094
 
Join Date: Jan 2006
Location: St Louis MO
Posts: 76
mgurgol is just really nicemgurgol is just really nicemgurgol is just really nicemgurgol is just really nicemgurgol is just really nice
Re: Autonomous selection from dashboard

We attached to switches to the digital input on the DS. These are read in disabled mode and set a global variable in Labview. We use 2 switches to select driver mode (2 switches, 4 choices, switched between Arcade, Tank, Tank Drive on a Gamepad and two stick arcade). We have three switches for auto mode selection which gives us 8 possible auto modes. The selected switches are displayed on the driver station, driver selection is on the front page, and auto mode is on the second page of display.
Closed Thread


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
Switching to/from autonomous mode RDD Programming 6 12-02-2007 16:14
Setting Autonomous Settings from OI Tom Saxton Programming 15 27-03-2005 11:45
Setting Autonomous Settings from OI Tom Saxton Control System 4 14-03-2005 22:33
Weird Output from Dashboard Port Ian W. Programming 9 06-03-2004 21:33
Autonomous Code From Experience EbonySeraphim Programming 7 14-03-2003 21:56


All times are GMT -5. The time now is 01:56.

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