Go to Post If something on your robot isn't working, then why don't you take the responsibility to fix it? Isn't that what being a TEAM is all about? - dlavery [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 15-01-2003, 16:11
jluvera jluvera is offline
Registered User
#0637
 
Join Date: Jan 2003
Location: Montville, NJ
Posts: 1
jluvera is an unknown quantity at this point
Test Autonomous Mode

We have fitted last year's robot with the new RC and are using the new OI so we can test while others build.

In reading the default code, I see that there is a value read in for PB_mode. Basically, I am not sure how we can test the robot in autonomous mode since we don't know how the PB_mode variable is changed. The reference guide says to set the Team number on the RC to zero. That doesn't make sense to me because I thought that number needs to be set to our team number for the competition.

I would appreciate any help.

John Luvera
Team 637
__________________
John Luvera
Team 637
  #2   Spotlight this post!  
Unread 15-01-2003, 16:35
Unsung FIRST Hero
Nate Smith Nate Smith is offline
FRC Key Volunteer Trainer
AKA: CrazyNate
no team
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Old Town, Maine
Posts: 1,029
Nate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to behold
Send a message via AIM to Nate Smith Send a message via Yahoo to Nate Smith
Take a look on IFI's web site under the Documentation section...there's instructions there as to how to create a new dongle which will let you switch autonomous mode on/off...
__________________
Nate Smith
nsmith@smythsoft.com
12 seasons, 4 teams, and more time logged behind the scorekeeper's table than I care to remember...
returning for 2011? only time will tell...
  #3   Spotlight this post!  
Unread 15-01-2003, 16:42
Jeremy_Mc's Avatar
Jeremy_Mc Jeremy_Mc is offline
GitHubber
no team
Team Role: Mentor
 
Join Date: Feb 2002
Rookie Year: 2002
Location: Orlando, FL
Posts: 496
Jeremy_Mc will become famous soon enoughJeremy_Mc will become famous soon enough
autonomous mode is aliased as auton_mode in the code...

here's some code to try:

if auton_mode = 1 then do_auto_stuff
'driver code here
goto end_of_auto

do_auto_stuff:
'auto code here
end_of_auto:

put that in the main loop...

it's really basic and has no real value unless you have code to put in there...but it should help out a little


*jeremy
__________________
GitHub - Collaborate on code, documentation, etc. - http://github.com
  #4   Spotlight this post!  
Unread 15-01-2003, 17:31
Lloyd Burns Lloyd Burns is offline
Registered User
FRC #1246 (Agincourt Robotics)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Toronto
Posts: 292
Lloyd Burns is an unknown quantity at this point
You can still test your auton_mode code.... even with no Dongle.

Just set auton_mode equals 1 at the start of each loop, right after the serin. In your auton_mode service area, set the variables which are digital to zero, and the analogs to 127.

Jump from the auton_mode servicing part to the Serout or to the tank drive in the USER program, so that the rest of the program won't process the auton_mode values, and let things go. If your robot resembles a hairy rabbit, pull the plug.

Make a dongle soon, though. It's fun to watch the auton_mode switch from 1 to zero when the comp_mode (Kill switch) switches from 0 to 1.
  #5   Spotlight this post!  
Unread 16-01-2003, 17:22
rosebud rosebud is offline
Registered User
#0115 (MVRT)
 
Join Date: Sep 2002
Location: California
Posts: 24
rosebud is on a distinguished road
one idea is to utilize the new code. use #if and #endif to only compile and download the autonomous code or the usercode. u can make the condition a #define statement or constant that u change whenever u want to test code. of course, this wont allow u to download auto and user code and switch without dowloading again, but at least u can test code. anyone know how to download programs into slots on the rc and then run different programs in different slots? or how to free up memory that is needed in auto mode but not in user mode?
  #6   Spotlight this post!  
Unread 18-01-2003, 14:09
roninmedia roninmedia is offline
The Ronin
AKA: Brian Nguyen
#1068
Team Role: Leadership
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Orlando
Posts: 43
roninmedia is on a distinguished road
Send a message via ICQ to roninmedia Send a message via AIM to roninmedia Send a message via Yahoo to roninmedia
Autonomous Mode can be turned ON by setting the RC to Team 0 (zero).
  #7   Spotlight this post!  
Unread 19-01-2003, 15:03
Neal Turett Neal Turett is offline
Registered User
#0201
 
Join Date: Nov 2002
Location: Rochester Hills
Posts: 34
Neal Turett is on a distinguished road
Work-around

Before we built a dongle, I just took an extra var (size = 1bit) and initialized it to 1. Then i'd have:

autom = 1

MainLoop:

if autom (my var) = 0 then endauto
if p1_sw_top = 1 then endauto

goto endmainloop:

autonomous code....

endauto:

autom = 0

normal code....

endmainloop:
serout(...)

goto mainloop:

That worked well enough, especially since it gave you a easily reachable kill-switch. Only thing to note is that if you use dead-reackoning, you need to tie the beginning of your autonomous code to another button, lest it run while the robot is disabled while the RC is not plugged in and your timer-count increase.
  #8   Spotlight this post!  
Unread 19-01-2003, 15:12
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Re: Work-around

Quote:
Originally posted by Neal Turett
Only thing to note is that if you use dead-reackoning, you need to tie the beginning of your autonomous code to another button, lest it run while the robot is disabled while the RC is not plugged in and your timer-count increase.
The only problem with that is that button presses don't get sent to the RC, so it would never know about it. You are definately correct that you need a way to "start" your autonomous code, but this is best done by looking at the comp_mode bit, as its state will tell you whether you are disabled or active.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #9   Spotlight this post!  
Unread 19-01-2003, 15:29
Neal Turett Neal Turett is offline
Registered User
#0201
 
Join Date: Nov 2002
Location: Rochester Hills
Posts: 34
Neal Turett is on a distinguished road
I was using this code before I had a dongle. The RC was always running in normal mode.

I would just flip on the bot, flip on the OI, and then hit the start button. It would still be sent. Otherwise, the robot would be counting pointlessly until the OI was flipped on, and you;'d get unpredictable results (like the robot running into a glass pane.)

Since the bot never technically entered autonomous mode, it still recieves data from the OI.
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
Programming Autonomous mode Jared Stofflett Programming 3 11-11-2003 09:32
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11
Autonomous mode AntmanIV General Forum 1 17-02-2003 13:30
autonomous mode timer Don Programming 6 09-02-2003 22:16
autonomous mode? bigwalt Technical Discussion 1 21-01-2003 01:14


All times are GMT -5. The time now is 23:58.

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