Go to Post STEM blushes, and asks if Art would like to go out for a date. - Cothron Theiss [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 17-04-2005, 23:13
Mr. Steve's Avatar
Mr. Steve Mr. Steve is offline
No relation to Mrs. Steve
#1626 (Falcon Robotics)
 
Join Date: Nov 2004
Rookie Year: 2005
Location: NJ
Posts: 34
Mr. Steve is an unknown quantity at this point
Cross Mode Variables?

Do Variables carry over from autonomous to controlled and vice versa? I know they remain intact when disabled is on/off so it would stand to reason that they would carry over here as well.

Thanks
__________________
Falcon Robotics
  #2   Spotlight this post!  
Unread 17-04-2005, 23:16
AIBob's Avatar
AIBob AIBob is offline
AI Programmer
AKA: Bob Frank DOT org
FRC #0358 (Hauppauge Robotic Eagles)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Long Island, NY (in Binghamton now)
Posts: 297
AIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to beholdAIBob is a splendid one to behold
Send a message via ICQ to AIBob Send a message via AIM to AIBob Send a message via MSN to AIBob Send a message via Yahoo to AIBob
Re: Cross Mode Variables?

It should, because between autonomous and user controlled mode, they just allow input from the OI to be read, and unset the Autonomous Mode bit, but other than that, it should be the same.
__________________
- from B B frank

  #3   Spotlight this post!  
Unread 17-04-2005, 23:57
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,113
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: Cross Mode Variables?

Global variables will work just as you expect. Local static variables, by design, are accessible only from within the functions they are defined in. Since the default code calls one function in teleoperated mode and a different function in autonomous mode, only global variables will be useful.
  #4   Spotlight this post!  
Unread 21-04-2005, 07:49
dm0ney's Avatar
dm0ney dm0ney is offline
Will Code For Food (Food Optional)
AKA: Deepak Mishra
None #0217 (The ThunderChickens)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Shelby Twp., MI
Posts: 48
dm0ney will become famous soon enough
Send a message via AIM to dm0ney
Re: Cross Mode Variables?

I believe that the question is 'If I update a variable, will that value be available to me in both modes?'

If you have defined a user variable, the values are NOT rewritten when modes are changed. OI related variables are cleared in the switch from user mdoe to autonomous.
__________________

Alumni
Team #217, The ThunderChickens



Student, Class of 2009
California Institute of Technology


  #5   Spotlight this post!  
Unread 25-01-2006, 11:14
dcbrown dcbrown is offline
Registered User
AKA: Bud
no team
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Hollis,NH
Posts: 236
dcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud of
Re: Cross Mode Variables?

Rather than start another thread, and this one seemed pretty close.

Could folks comment on the following state diagram? We're trying to understand the flow of the game from the robot controller state perspective?

Is this correct? Are there other states to be concerned with? Missing or incorrect state transitions?

Thanks,
DCBrown
Attached Thumbnails
Click image for larger version

Name:	RobotStateTransitions.JPG
Views:	74
Size:	99.6 KB
ID:	3898  
  #6   Spotlight this post!  
Unread 25-01-2006, 11:56
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: Cross Mode Variables?

I know this sounds ignorant, but that's because it is. I got lost in that diagram about five seconds after I opened it. It could be perfectly fine, I just don't really know how to read it.

JBotAlan
__________________
Aren't signatures a bit outdated?
  #7   Spotlight this post!  
Unread 25-01-2006, 16:06
Mr. Steve's Avatar
Mr. Steve Mr. Steve is offline
No relation to Mrs. Steve
#1626 (Falcon Robotics)
 
Join Date: Nov 2004
Rookie Year: 2005
Location: NJ
Posts: 34
Mr. Steve is an unknown quantity at this point
Re: Cross Mode Variables?

Hey this is my thread

It took me a second to understand that diagram, but for the most part it makes sense. I don't really think there's a disabled/autonomous mode but rather just 3 options..

-Disabled
-Enabled - Autonomous
-Enabled - User Control
__________________
Falcon Robotics
  #8   Spotlight this post!  
Unread 25-01-2006, 16:14
Andrew Blair's Avatar
Andrew Blair Andrew Blair is offline
SAE Formula is FIRST with Gasoline.
FRC #0306 (CRT)
Team Role: Alumni
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Corry
Posts: 1,193
Andrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond repute
Send a message via AIM to Andrew Blair Send a message via Yahoo to Andrew Blair
Re: Cross Mode Variables?

Quote:
Originally Posted by Mr. Steve
Hey this is my thread

It took me a second to understand that diagram, but for the most part it makes sense. I don't really think there's a disabled/autonomous mode but rather just 3 options..

-Disabled
-Enabled - Autonomous
-Enabled - User Control
Yes, and one odd one, autonomous and disabled. Don't know when that one happens...
__________________
Reading makes a full man, conference a ready man, and writing an exact man.
-Sir Francis Bacon

"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
-Albert Einstein
  #9   Spotlight this post!  
Unread 25-01-2006, 16:19
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Cross Mode Variables?

Technically speaking, you can set it to "disabled autonomous," which as far as I know runs autonomous, but doesn't send the output out... just like in regular disabled.
__________________

  #10   Spotlight this post!  
Unread 25-01-2006, 16:26
Eldarion's Avatar
Eldarion Eldarion is offline
Electrical Engineer / Computer Geek
AKA: Eldarion Telcontar
no team (Teamless Orphan)
Team Role: Alumni
 
Join Date: Nov 2005
Rookie Year: 2005
Location: Númenor
Posts: 558
Eldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond repute
Send a message via AIM to Eldarion Send a message via Yahoo to Eldarion
Re: Cross Mode Variables?

Quote:
Originally Posted by Ryan M.
Technically speaking, you can set it to "disabled autonomous," which as far as I know runs autonomous, but doesn't send the output out... just like in regular disabled.
Disabled overrides autonomous, I.E. when both are set, the robot acts as if only the Disabled bit was set.

As soon as the Disabled bit is cleared, the robot runs the autonomous initialization and then runs the autonomous loop.
__________________
CMUCam not working? Tracks sporadically? Try this instead: http://www.falconir.com!
PM me for more information if you are interested (it's open source!).

Want the FIRST Email blasts? See here: http://www.chiefdelphi.com/forums/sh...ad.php?t=50809

"The harder the conflict, the more glorious the triumph. What we obtain too cheaply, we esteem too lightly; it is dearness only that gives everything its value."
-- Thomas Paine

If it's falling apart it's a mechanical problem. If it's spewing smoke it's a electrical problem.
If it's rampaging around destroying things it's a programming problem.

"All technology is run on 'Magic Smoke' contained within the device. As everyone knows, whenever the magic smoke is released, the device ceases to function."
-- Anonymous

I currently speak: English, some German, Verilog, x86 and 8051 Assembler, C, C++, VB, VB.NET, ASP, PHP, HTML, UNIX and SQL
  #11   Spotlight this post!  
Unread 25-01-2006, 16:32
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: Cross Mode Variables?

Quote:
Originally Posted by Ryan M.
Technically speaking, you can set it to "disabled autonomous," which as far as I know runs autonomous, but doesn't send the output out... just like in regular disabled.
Hmm...I'd better code that case into my code...

I'm hijacking this thread from the thread hijacker!

I realized that in the default code, when autonomous starts, the User_Autonomous_Code (I think) enters into an infinite loop, where the Process_Data_From_Master_uP and Process_Data_From_Local_IO functions are not called. Now, I realize that I don't want to process I/O that isn't valid during auton, but all the camera initialization and tracking code is there in the functions that aren't called during auton. Do you forsee any problems with removing this loop and just processing auton every 26 ms? That's all I really need. It seemed to run fine on our system, but I don't know if there would be any issues with competition.

Thanks,
JBotAlan
__________________
Aren't signatures a bit outdated?
  #12   Spotlight this post!  
Unread 25-01-2006, 17:43
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Cross Mode Variables?

Quote:
Originally Posted by JBotAlan
Hmm...I'd better code that case into my code...
Verify which way it works before putting work into doing code...
Eldarion (above) says that autonomous holds until disable is removed. I don't know which way it is for sure.
__________________

  #13   Spotlight this post!  
Unread 26-01-2006, 01:45
duane's Avatar
duane duane is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Vacaville
Posts: 98
duane is an unknown quantity at this point
Send a message via AIM to duane
Re: Cross Mode Variables?

Quote:
Originally Posted by Mr. Steve
I don't really think there's a disabled/autonomous mode but rather just 3 options..

-Disabled
-Enabled - Autonomous
-Enabled - User Control
The state of two inputs can't change at (exactly) the same time. I expect that autonomous mode is on before disabled is off:
->Disabled/not Autonomous
->Disabled/Autonomous
->Enabled/Autonomous
->Enabled/Not Autonomous
  #14   Spotlight this post!  
Unread 26-01-2006, 07:19
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,113
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: Cross Mode Variables?

Whether or not the two inputs can change simultaneously doesn't really matter here. The flags in the data packets can, and do. Regardless of the state of the autonomous input, if the disable input on the competition port is active, the robot is executing the teleoperated code, not the autonomous code.

This is true with a 2005 OI and RC, anyway. I'll discover if it's still true with the 2006 system as soon as we start scripting our autonomous routines.
  #15   Spotlight this post!  
Unread 26-01-2006, 12:09
dcbrown dcbrown is offline
Registered User
AKA: Bud
no team
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Hollis,NH
Posts: 236
dcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud of
Re: Cross Mode Variables?

Quote:
It took me a second to understand that diagram, but for the most part it makes sense. I don't really think there's a disabled/autonomous mode but rather just 3 options..
My guess is that autonomous is applied to all 'bots on the field, and robot disables are both individual along with a global field disable. So if you are disabled for rules infraction while in autonomous mode, then I'd expect autonomous would be still active but your individual robot would have disabled applied. The robot state would then be !Enabled/Autonomous state.

It might seem esoteric, but what if you wanted to do something in the last 4 seconds of autonomous period... like gain a certain field position... to set up for manual play. Yeah, I know you might not have won the autonomous period so might be putting the robot in the WRONG position but that is part of the fun of selecting autonomous strategy. So, you'd like to know in the code how much time you have left. If you start counting when autonomous is enabled but disabled is still applied then you'd be counting time wrong. I suspect these two input changes happen very close together, but still I'd rather understand the risks associated with states we're ignoring vs get surprises during competition events.

Regards,
DCBrown
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 simple autonomous mode question chippermonky Programming 3 18-02-2005 01:54
Why did the chicken cross the road? Billfred Chit-Chat 10 29-05-2004 16:11
Future of Autonomous Mode FadyS. Programming 41 24-05-2004 19:45
Help On Coding 2K1 Controller GregTheGreat Programming 9 05-12-2003 18:35
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11


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

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