Go to Post You won't find anything in school that says you have to share ideas or strategy with your football rivals. - Al Skierkiewicz [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 06-02-2003, 17:52
Ryan Collings Ryan Collings is offline
Registered User
None #0313 (Bionic Zebras)
Team Role: College Student
 
Join Date: Feb 2003
Rookie Year: 2000
Location: Wayne-Westland MI
Posts: 18
Ryan Collings is an unknown quantity at this point
Question How do you do the autonomous programming?

Can someone help me with the autonomous programming? I am a rookie programmer.
  #2   Spotlight this post!  
Unread 06-02-2003, 19:22
rust710's Avatar
rust710 rust710 is offline
Registered User
#0862 (Lightning Robotics)
 
Join Date: Dec 2002
Location: Canton, MI
Posts: 103
rust710 is an unknown quantity at this point
Send a message via AIM to rust710
Could you please be more specific. Programing in autonomous mode is exactly the same as programing normally, except you have to tell the robot to move instead of waiting on sensor input for operator.

If you need any more help post a reply here or PM me or email me @ info@lightningrobotics.com .
__________________
Andrew Radamis
Programmer on 862
info@lightingrobotics.com
  #3   Spotlight this post!  
Unread 06-02-2003, 19:34
Jeff_Rice's Avatar
Jeff_Rice Jeff_Rice is offline
ElementisRegamusProelium
#1359
Team Role: Programmer
 
Join Date: Dec 2002
Location: Linn County
Posts: 283
Jeff_Rice will become famous soon enoughJeff_Rice will become famous soon enough
I'm guessing you want to know how to start. Well, granted, I am a rookie, but I have learned a lot.

1.Make a main subroutine and an autonomous subroutine

If auton_mode = 0 then Skip_Autonomous
Gosub AUTONOMOUS ' Jumps to subroutine for autonomous movement '
Goto NEXT_SCAN
Skip_Autonomous:
Gosub Normal_operation ' Jumps to subroutine for normal operation '
NEXT_SCAN:
Or something like that in between Serin and Serout
2. Write pseudocode for how you want the robot to behave

If sensor1 is lit, turn left
If sensor 2 is lit, go straight
if sensor 3 is lit, turn right

3. Be sure not to mess up any of your other code
__________________
"He said my name is Private Andrew Malone
If you're reading this then I didn't make it home
But for every dream that's shattered another one comes true
This car was once a dream of mine now it belongs to you
And though you may take her and make her your own
You'll always be riding with Private Malone" David Ball, "Private Malone"
  #4   Spotlight this post!  
Unread 06-02-2003, 19:40
rust710's Avatar
rust710 rust710 is offline
Registered User
#0862 (Lightning Robotics)
 
Join Date: Dec 2002
Location: Canton, MI
Posts: 103
rust710 is an unknown quantity at this point
Send a message via AIM to rust710
Or the PBasic 2.5 version

If auton_mode = then
gosub AUTONOMOUS ' Jumps to subroutine for autonomous movement '
else
Gosub Normal_operation ' Jumps to subroutine for normal operation '
endif

Basicly the same as 2.0 but looks nicer and is easier to code.
__________________
Andrew Radamis
Programmer on 862
info@lightingrobotics.com
  #5   Spotlight this post!  
Unread 06-02-2003, 20:35
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
Quote:
Originally posted by rust710
Or the PBasic 2.5 version

If auton_mode = then
gosub AUTONOMOUS ' Jumps to subroutine for autonomous movement '
else
Gosub Normal_operation ' Jumps to subroutine for normal operation '
endif

Basicly the same as 2.0 but looks nicer and is easier to code.
If you're doing 2.5, you can also do it all in one line:
Code:
IF auton_mode=1 THEN GOSUB autonomous ELSE GOSUB normal_operation
I just posted a rather lengthy reply to a similar question in this thread that you may want to look at.

--Rob
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #6   Spotlight this post!  
Unread 07-02-2003, 12:06
Ryan Collings Ryan Collings is offline
Registered User
None #0313 (Bionic Zebras)
Team Role: College Student
 
Join Date: Feb 2003
Rookie Year: 2000
Location: Wayne-Westland MI
Posts: 18
Ryan Collings is an unknown quantity at this point
Thank you for the information on the autonomous mode. Now, can anyone help me out with delta_t? How do I get a reading from it so I can time our robot?

Hey Rob, Have you gotten those rpms yet? As always, no rush.
  #7   Spotlight this post!  
Unread 07-02-2003, 12:39
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
For delta_t stuff, check out http://www.chiefdelphi.com/forums/sh...threadid=16994.

As for the rpms, I just sent you some stuff. Let me know whether or not it works.

--Rob
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #8   Spotlight this post!  
Unread 07-02-2003, 13:31
Carl Owenby Carl Owenby is offline
Registered User
#0654 (Maclay Robotics)
 
Join Date: Jan 2003
Location: Tallahassee, FL
Posts: 24
Carl Owenby is an unknown quantity at this point
Example of Autonomous Code

Here is an example of some autonomous code that works. You are welcome to use it as you see fit. Hope this helps.

If comp_mode = 0 then Relay_Control
'Competition Control is disabled
Out7 = 0 'Basic Run LED off when Competition Control disabled
Goto End_Control

Relay_Control:
'Competition Control is enabled
relay3_fwd = rc_sw3 'Air compressor on when pressure switch closed - Green
relay3_rev = 0 'Disable Relay 3 reverse function

relay8_fwd = 1 'Rotating light on when Competition Control not disabled - Green
relay8_rev = 0 'Disable Relay 8 reverse function

If auton_mode = 0 then Oper_Control
'Game is in Autonomous Robot Control Period
Out7 = 1 'Basic Run LED on during Autonomous Robot Control Period

'ADD OTHER AUTONOMOUS CODE HERE

Goto End_Control

Oper_Control:
'Game is in Operator Control Period
Toggle 7 'Basic Run LED flashes during Operator Control Period
relay1_fwd = p1_sw_trig 'Left Index - Lower Left Arm - Green
relay1_rev = p1_sw_top 'Left Thumb - Raise Left Arm - Red
relay2_fwd = p2_sw_trig 'Right Index - Lower Right Arm - Green
relay2_rev = p2_sw_top 'Right Thumb - Raise Right Arm - Red

End_Control:
__________________
There are 10 kinds of people in this world; those who understand binary and those who don't.
  #9   Spotlight this post!  
Unread 07-02-2003, 15:11
BigJohn BigJohn is offline
Registered User
#1166
 
Join Date: Feb 2003
Location: Garden City GA
Posts: 12
BigJohn is an unknown quantity at this point
What is the autonomous code, and where do we connect the sensors up at?
  #10   Spotlight this post!  
Unread 07-02-2003, 15:56
Skabana159's Avatar
Skabana159 Skabana159 is offline
Robotics and Field Hockey
AKA: Jesse C. Owens
#0159 (Alpine Robotics)
Team Role: Mentor
 
Join Date: Mar 2002
Rookie Year: 2000
Location: Ft. Collins, CO
Posts: 92
Skabana159 is on a distinguished road
Send a message via AIM to Skabana159
Quote:
Were do the autonomous sensors hook up to the robot.
Quote:
how do you hook the autonomous mode up to robot.(to work)
All sensors are hooked up through the digital/analog 25 pin ports on the RC.
I'm assuming that by "hook the autonomous mode up to robot.(to work)" you mean how does one simulate autonomous mode. You should go to this schematic to build a dongle for autonomous mode.
__________________
"What most people do not understand is that the Buddha, the Godhead, resides just as comfortably in gears and circuits as in hills and trees. To believe otherwise is to dilute the Godhead."
-Robert Pirsig, Zen and the Art of Motorcycle Maintenance
  #11   Spotlight this post!  
Unread 07-02-2003, 18:23
Ryan Collings Ryan Collings is offline
Registered User
None #0313 (Bionic Zebras)
Team Role: College Student
 
Join Date: Feb 2003
Rookie Year: 2000
Location: Wayne-Westland MI
Posts: 18
Ryan Collings is an unknown quantity at this point
Now, can anyone help me with programming SPIKEs for the pneumatics?
  #12   Spotlight this post!  
Unread 07-02-2003, 19:38
rust710's Avatar
rust710 rust710 is offline
Registered User
#0862 (Lightning Robotics)
 
Join Date: Dec 2002
Location: Canton, MI
Posts: 103
rust710 is an unknown quantity at this point
Send a message via AIM to rust710
Programming spikes is extremely simple. First find out what port the spike is on and go to your code.

To make a spike go forward relay1_fwd = 1. To make it go backward relay1_rev = 1 . Always remember to set the opposite direction you are using to zero. If you want to stop the relay all together set both variables to zero. Change the number after relay to the port you are using.
__________________
Andrew Radamis
Programmer on 862
info@lightingrobotics.com
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 programming Dush Programming 4 20-02-2003 09:54
autonomous sensor programming ? Laura_d Programming 1 10-02-2003 17:46
How far is everyone in their autonomous programming AlphaOmega870 Programming 33 21-01-2003 21:03


All times are GMT -5. The time now is 08:44.

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