Go to Post IRI: where egos go to die...uhm..I mean fly! - Koko Ed [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 30-03-2004, 17:26
TedP TedP is offline
Registered User
#1014
 
Join Date: Mar 2004
Location: Dublin, OH
Posts: 19
TedP will become famous soon enough
Re: Despite what IFI says, you can configure autonomous from OI...

Quote:
Originally Posted by KenWittlief
one important thing - if you are going to use the competition_mode flag to determine when you are disabled, the documentation from IFI is WRONG!!
I actually didn't realize there was such a flag... However, it might be a good idea for those who are using things like PID controllers to stop integrating while not in competition or autonomous mode. That might make a cleaner transition from disabled to the competition/autonomous...

Additionally, we also have a spot in our code where we wait for the user to hit a particular button the OI during competition mode BEFORE the robot starts responding. We don't like the robot suddenly becoming live at the end of autonomous mode. This forces the operator to make sure all the OI settings are correct before enabling the robot during the match.
  #2   Spotlight this post!  
Unread 30-03-2004, 17:30
ryan_f ryan_f is offline
Registered User
#1053
 
Join Date: Jan 2003
Location: ottawa
Posts: 71
ryan_f is an unknown quantity at this point
Re: Despite what IFI says, you can configure autonomous from OI...

last year our team just shorted 2 pins on the competition port. Im not sure if it works on this years controller though
  #3   Spotlight this post!  
Unread 30-03-2004, 17:31
Joel J's Avatar
Joel J Joel J is offline
do you..
no team
 
Join Date: May 2001
Rookie Year: 2000
Location: San Jose, CA
Posts: 1,445
Joel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond repute
Re: Despite what IFI says, you can configure autonomous from OI...

I've heard talk of doing this both last year and this year; however, didn't IFI release a firmware update that did away with our ability to retain the last value sent from the OI? There was something mentioned about it in one of the team updates. They may have changed some other aspect of the control system, but maybe we should check first, eh?

If IFI's firmware update did make this method impossible, then the only option left would be to not perform the upgrade on the controller, if you have yet to do so.
__________________
Joel Johnson

Division By Zero (229) Alumni, 2003-2007
RAGE (173) Alumni, 1999-2003
  #4   Spotlight this post!  
Unread 30-03-2004, 17:40
Phil_Lutz's Avatar
Phil_Lutz Phil_Lutz is offline
Phil Lutz
#0851 (Froggers)
Team Role: Mentor
 
Join Date: Jan 2004
Location: El Segundo, CA
Posts: 67
Phil_Lutz is on a distinguished road
Send a message via Yahoo to Phil_Lutz
Re: Despite what IFI says, you can configure autonomous from OI...

Quote:
Originally Posted by TedP
During this disabled time, simply sample the state from your OI and store that somewhere where it won't be touched. When it moves into autonomous mode, read from that the proper state of the autonomous mode. You've now configured your RC from the OI.
Can you provide a sample of your code that displays this?
I am curious, but don't quite "see" it.

We mounted 2 switches on the robot to indicate which auton mode we wanted and which side of the field we were on.

If I'm hearing you right, what you are saying is I can have these switches on my OI (say port3) and read them in Disabled mode and act on then when not disabled.

Thanks,

Phil
  #5   Spotlight this post!  
Unread 30-03-2004, 17:48
TedP TedP is offline
Registered User
#1014
 
Join Date: Mar 2004
Location: Dublin, OH
Posts: 19
TedP will become famous soon enough
Re: Despite what IFI says, you can configure autonomous from OI...

Quote:
Originally Posted by Phil_Lutz
If I'm hearing you right, what you are saying is I can have these switches on my OI (say port3) and read them in Disabled mode and act on then when not disabled.
You ARE hearing me right. It's important that you need to SAVE the state before going into autonomous mode. Autonomous mode DOES NOT MAINTAIN the state of the OI inputs. It clears them. That's why it's important to save.

There's a working example here:

http://www.osufirst.org/twiki/bin/vi...04RegionalCode

More specifically, in main.c, when **NOT** in autonomous mode:

Quote:
int autonomous_on = 1;

void main()
{
...
autonomous_on = ( winchPneuSwitch == 1 ) ? 0 : autonomous_on;
}
That is, in the main.c the autonomous_on is set to 1 as a default. winchPneuSwitch is set to 0 while in autonomous mode -- Getdata() does that.

So our main.c just sits and churns while disabled and waits for winchPneuSwitch to get set to 1. If it gets set to 1 even for an instant, it LATCHES that data in. The autonomous code can then basically say:

Quote:
if( autonomous_on )
{
do autonomous code
}
else
{
do something else (just sit?)
}
Additionally, we never were planning on doing anything in autonomous until competition. So we never had any switches anywhere. We show in this example we use a switch designed for a "winch pneumatic" to set our autonomous mode bit. We don't even need special hardware on the OI to set this -- we can just use switches already have.

Additionally, we don't enable immediately after autonomous mode -- we wait for the user to hit a button. So it's okay to leave these switches in a bad state because the driver can set them back before "enabling" the robot.

I hope that helps.
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
A better autonomous method.. randomperson Programming 4 24-02-2004 18:02
IFI Loader Problems BrendaB Programming 3 24-01-2004 22:45
variable? manodrum Programming 11 01-04-2003 17:20
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11
Autonomous Kill Switch UCGL_Guy Programming 8 15-01-2003 17:39


All times are GMT -5. The time now is 00:11.

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