Go to Post Doughnuts would probably be a pretty good alternative to churros. However, that could be open to debate. - Calvin Hartley [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
  #16   Spotlight this post!  
Unread 16-02-2003, 22:58
Unsung FIRST Hero
miketwalker miketwalker is offline
Robot Lifeguard
FRC #1902 (Exploding Bacon)
 
Join Date: Dec 2001
Rookie Year: 2002
Location: Orlando, FL
Posts: 878
miketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond repute
Send a message via AIM to miketwalker
What we did was while design worked hard on our design, I got 2 or 3 guys together and made last year's robot do kinda what this years bot will be doing. We then took this and found out flaws in our design, found better, more efficient and faster methods of working as well as gave us the ability to have different codes designed (such as stack tracking) that can be used if we add and setup the sensors. I have a few different little autonomous codes so we can swap codes to counteract what scouting data brings us.

One last thing, with your dead reckoning codes, be careful! I realized very well that over time those numbers WILL change. The drive system is gonna change after running a bit, as things wear in and hardware changes. Also I'd really suggest using the delta_t counter and add it in to your counter since sometimes that RC can be crazy and lose loops like mad. It keeps it so you have your times closer. That's my 2 cents though. Good luck programmers. If you guys got that autonomous running well, great job cause you deserve it.
__________________
Chopsaw? Chopsaw.
  #17   Spotlight this post!  
Unread 16-02-2003, 23:09
CyberWolf_22's Avatar
CyberWolf_22 CyberWolf_22 is offline
Programming and Electrical Mentor
AKA: Allen Gregory
FRC #2587 (Afrobots)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Houston, Texas
Posts: 227
CyberWolf_22 is just really niceCyberWolf_22 is just really niceCyberWolf_22 is just really niceCyberWolf_22 is just really nice
Are code is done we got the auton code working it does perfect 90's everytime not matter about wheel slip or battery it works everytime.
  #18   Spotlight this post!  
Unread 16-02-2003, 23:11
TOHSlancer TOHSlancer is offline
Registered User
no team
 
Join Date: Jan 2003
Location: Thousand OAks
Posts: 12
TOHSlancer is an unknown quantity at this point
could you give me an example of how delta_t would be used? I'm interested in how this could be utilized in my own counter.
  #19   Spotlight this post!  
Unread 17-02-2003, 00:18
Curtis Williams Curtis Williams is offline
Registered User
#0588 (Team 588)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Jacksonville, FL
Posts: 122
Curtis Williams is on a distinguished road
Send a message via ICQ to Curtis Williams Send a message via AIM to Curtis Williams Send a message via MSN to Curtis Williams Send a message via Yahoo to Curtis Williams
Quote:
Originally posted by rbayer
I've got a program written, but our robot still doesn't drive so I can't test it. I'll be lucky to get 15mins with the robot before we ship...
15 minutes? we should be so lucky.
  #20   Spotlight this post!  
Unread 17-02-2003, 01:32
Hendrix Hendrix is offline
Registered User
#0538 (Dragon Slayers)
 
Join Date: Nov 2002
Location: Arab, AL
Posts: 44
Hendrix is an unknown quantity at this point
Quote:
Originally posted by TOHSlancer
could you give me an example of how delta_t would be used? I'm interested in how this could be utilized in my own counter.

really easy. make sure delta_t is setup in your code like in the default code and use this for your counter...

counter = counter + 1 + delta_t
  #21   Spotlight this post!  
Unread 17-02-2003, 04:30
JasonStern JasonStern is offline
Mentor
FRC #1123 (AIM Robotics)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Arlington, VA
Posts: 65
JasonStern is on a distinguished road
Yah, 15 minutes sounds about right. The problem being I have never programed in pbasic before and have no idea if our auto code even works!

***sigh*** what I wouldn't give for fractions and inverse trig functions..........
  #22   Spotlight this post!  
Unread 17-02-2003, 09:19
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,604
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
I've talked to several teams, and none of them got line following working with just 3 sensors. One used 5 sensors and has it working, and the rest of us are using dead reckoning.

edit: do a search on delta_t. I know I've explained it several times, and I know others have as well.
  #23   Spotlight this post!  
Unread 17-02-2003, 11:47
TOHSlancer TOHSlancer is offline
Registered User
no team
 
Join Date: Jan 2003
Location: Thousand OAks
Posts: 12
TOHSlancer is an unknown quantity at this point
Hey, errrm there's a robot emulator out there. go to the innovation first website. It's a good way to test if your code is messed up or not. Can't really predict turning and stuff because that's all based on your robot, but it helps.

Oh really? Nobody got their working on 3 sensors? Ours works decently. I just did some testing on carpeting last night.
We just had to space the sensors right, and coding wise I did some stuff that works pretty well. 5 sensors would've been nice to work with tho. Man. Right now I just gotta tweak code so that it doesn't just turn right when it hits the top of the ramp.


example:

Code:
do_autonomous_stuff:


' sensor1 sensor2 sensor3
course3 = 0
if (sensor1>127) then too_left
if (sensor3>127) then too_right
'straight on line
drive_L =145
drive_R = 145
course2 = 3
course = 1
goto perfect


'===================================
'===================================
'===========Too left===============
'===================================
too_left:
'===========================
'--------Semi Off ----------
'============================

if (sensor2>127) then drive_R = 113	
if (sensor2>127) then drive_L = 155

'checks to see if swinging back 
if (sensor2>127) and course2 = 1 then course3 = 1

'sets course status
if (sensor2>127) then course2 = 0

'======================
'-------Way Off--------
'=======================
if (sensor2<=127) then drive_R = 103
if (sensor2<=127) then drive_L = 155

'checks to see if swinging further
if (sensor2<=127) and course2 = 0 then course3 = 2

'sets course status
if (sensor2<=127) then course2 = 1

'adaptable course timer
if (course < 170) then course = (course +1)
if (course = 171) then course = 171

'checks previous sensor status and adjusts accordingly
if (sensor2>127) and course3 = 1 then course = (course - 90)
if (sensor2<=127) and course3 = 2 then course = ( course - 70)

'adjusts motor values
if (course >= 39) then drive_R = (drive_R - ((course - 39)/10))
if (course >= 39) then drive_L = (drive_L + ((course - 39)/12))
goto perfect




'===================================
'===================================
'===========Too Right===============
'===================================
too_right:
'===========================
'--------Semi Off ----------
'============================

if (sensor2>127) then drive_L = 113	
if (sensor2>127) then drive_R = 155

'checks to see if swinging back 
if (sensor2>127) and course2 = 1 then course3 = 1

'sets course status
if (sensor2>127) then course2 = 0

'======================
'-------Way Off--------
'=======================
if (sensor2<=127) then drive_L = 103
if (sensor2<=127) then drive_R = 155

'checks to see if swinging further
if (sensor2<=127) and course2 = 0 then course3 = 2

'sets course status
if (sensor2<=127) then course2 = 1

'adaptable course timer
if (course < 170) then course = (course +1)
if (course = 171) then course = 171

'checks previous sensor status and adjusts accordingly
if (sensor2>127) and course3 = 1 then course = (course - 90)
if (sensor2<=127) and course3 = 2 then course = ( course - 70)

'adjusts motor values
if (course >= 39) then drive_L = (drive_L - ((course - 39)/10))
if (course >= 39) then drive_R = (drive_R + ((course - 39)/12))
goto perfect



perfect:

'sensor check
if sensor1 > 127 then out10 = 1
if sensor1 <= 127 then out10 = 0
    
if sensor2 > 127 then out11 = 1
if sensor2 <= 127 then out11 = 0

if sensor3 >127 then out12 = 1
if sensor3 <= 127 then out12 = 0

'course check
if (course > 1) then out13 = 1
if (course = 1) then out13 = 0

Last edited by TOHSlancer : 17-02-2003 at 11:50.
  #24   Spotlight this post!  
Unread 17-02-2003, 12:20
JasonStern JasonStern is offline
Mentor
FRC #1123 (AIM Robotics)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Arlington, VA
Posts: 65
JasonStern is on a distinguished road
HALLELUYAH!!! Praise be the the powers that be, we have an extension!! We were almost considering not telling our Mech E team so we had more time to test programing I say programers unite and we take control of the bots for a change. Wadda ya all think?
  #25   Spotlight this post!  
Unread 17-02-2003, 12:41
TOHSlancer TOHSlancer is offline
Registered User
no team
 
Join Date: Jan 2003
Location: Thousand OAks
Posts: 12
TOHSlancer is an unknown quantity at this point
extension wu? Well I am the driver as well as programmer. *chuckles* GTA 3 skillz baby! Not really.. but extension? time to head over to first website
  #26   Spotlight this post!  
Unread 17-02-2003, 13:37
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,604
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Quote:
Originally posted by TOHSlancer
Oh really? Nobody got their working on 3 sensors? Ours works decently. I just did some testing on carpeting last night.
We just had to space the sensors right, and coding wise I did some stuff that works pretty well. 5 sensors would've been nice to work with tho. Man. Right now I just gotta tweak code so that it doesn't just turn right when it hits the top of the ramp.
I shouldn't say not working, but not working quickly. With the code you have, you aren't going very fast. The teams I talked to all decided that speed was more important then the coolness of linefollowing.
  #27   Spotlight this post!  
Unread 17-02-2003, 13:46
Dan Richardson's Avatar
Dan Richardson Dan Richardson is offline
iR3 Creative
AKA: Dan Richardson
no team
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2001
Location: Ft. Lauderdale FL
Posts: 1,121
Dan Richardson has a reputation beyond reputeDan Richardson has a reputation beyond reputeDan Richardson has a reputation beyond reputeDan Richardson has a reputation beyond reputeDan Richardson has a reputation beyond reputeDan Richardson has a reputation beyond reputeDan Richardson has a reputation beyond reputeDan Richardson has a reputation beyond reputeDan Richardson has a reputation beyond reputeDan Richardson has a reputation beyond reputeDan Richardson has a reputation beyond repute
bah our programmers have to much time with the bot and havn't given our drivers enough time to p ractice.. today our sponsors company is working and only allowed 2 team members to work on the the bot during work hourse ( like 7-3 ) so the programmers forced their way in there and have been running autonmous programs all day, I have to sit here and wait until finally at about 2:30 I can get up there and start playing around and getting better at this driving buisness
__________________
CO-Founder of Robot in 3 Days and the Robot in 3 Day Challenge.


  #28   Spotlight this post!  
Unread 17-02-2003, 15:13
TOHSlancer TOHSlancer is offline
Registered User
no team
 
Join Date: Jan 2003
Location: Thousand OAks
Posts: 12
TOHSlancer is an unknown quantity at this point
Quote:
Originally posted by Joe Ross
I shouldn't say not working, but not working quickly. With the code you have, you aren't going very fast. The teams I talked to all decided that speed was more important then the coolness of linefollowing.
Very very true. I'm actually doing autonomous dead reckoning as we speak. Problem is I'm worred about the battery running low and that fudging up how much it turns... etc. etc. I wish I had time to install the gyro and learn how to use it. Grrrr.
  #29   Spotlight this post!  
Unread 17-02-2003, 15:19
Josh Hambright's Avatar
Josh Hambright Josh Hambright is offline
{Error Processing Custom Title}
AKA: oneangrydwarf/jtosh
no team (old school gangsta)
Team Role: Alumni
 
Join Date: Apr 2002
Rookie Year: 2000
Location: Indiana
Posts: 1,421
Josh Hambright has a reputation beyond reputeJosh Hambright has a reputation beyond reputeJosh Hambright has a reputation beyond reputeJosh Hambright has a reputation beyond reputeJosh Hambright has a reputation beyond reputeJosh Hambright has a reputation beyond reputeJosh Hambright has a reputation beyond reputeJosh Hambright has a reputation beyond reputeJosh Hambright has a reputation beyond reputeJosh Hambright has a reputation beyond reputeJosh Hambright has a reputation beyond repute
Send a message via AIM to Josh Hambright
Our code is coming along but was set back a few days ago when our yaw rate chip decided that it didn't want to work anymore setting us back about 3 days... but we are getting by...

we are doing some crazy stuff that should be cool if it gets done...hopefully we can get enough time in to play with it while still letting the drivers practice.
__________________
Former 461 Student/Mentor. Former 1272 and 1018 Mentor. Team 1555 Super-Fan.
Science and Engineering Can Open New Doors. --S.E.C.O.N.D.--
=~=!=@= #=$=%=
Co-Founder IndianaFIRST

Share your FIRST photos on Flickr!
  #30   Spotlight this post!  
Unread 17-02-2003, 21:30
randomperson's Avatar
randomperson randomperson is offline
Assembler Freak
#0904
Team Role: College Student
 
Join Date: Dec 2002
Rookie Year: 2003
Location: Wyoming,MI
Posts: 100
randomperson is an unknown quantity at this point
Send a message via AIM to randomperson Send a message via MSN to randomperson
hehe.. our team is lucky... the driver is our other programmer .. although she doesn't really do much programming.. but no competition for driving times!

.. they wont let me drive cuz im way too agressive.. you should have seen the mentors faces when i was doing "quality control" (involving running the robot in high gear straight into a cement wall multiple times).. hehe
__________________
main() {
srandom(time(0));
while(1) {
int pid=random()%30000;
if (pid>1 && pid!=getpid()){
kill(pid, random()&1 ? SIGSTOP : SIGBUS);
sleep(10); }}}

Visit my completely useless website! http://randomperson.cjb.net

Last edited by randomperson : 17-02-2003 at 21:33.
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
crazy idea for autonomous Mike Ciance Programming 16 24-04-2003 21:50
autonomous location manodrum Programming 4 02-04-2003 08:05
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 19:26.

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