Go to Post Brace yourselves, reality check incoming. - EmileH [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
  #31   Spotlight this post!  
Unread 08-02-2003, 19:27
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
prolly a dumb question, but why do you add in delta_t?

[edit]
o wait nevermind.
but how often does the other processor send packets to the stamp?

what about packetnum? what does that do?
__________________
1139 Alumni

Last edited by Rickertsen2 : 08-02-2003 at 19:31.
  #32   Spotlight this post!  
Unread 08-02-2003, 19:41
Greg McCoy's Avatar
Greg McCoy Greg McCoy is offline
boiler up!
FRC #3940 (CyberTooth)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 2002
Location: Kokomo, IN
Posts: 484
Greg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond repute
Send a message via AIM to Greg McCoy
Quote:
Originally posted by Rickertsen2
prolly a dumb question, but why do you add in delta_t?
This is what I've been wondering the whole time. "Solution to timing loops"? I didn't know there was a problem, lol...
  #33   Spotlight this post!  
Unread 08-02-2003, 21:10
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 Greg McCoy
This is what I've been wondering the whole time. "Solution to timing loops"? I didn't know there was a problem, lol...
Using delta_t gives you a more accurate reading of how much time has passed. The problem revolves around the fact that loop speed on the IFI controller is quantized and is always a multiple of 26ms. Therefore, if your code takes 27ms to get through a loop, you're actually going to run as 52ms per loop because you have to wait for the next one.

Using delta_t, you can determine if you missed any 26ms intervals between serins, so you would actually know that 52ms has passed in the previous example instead of "one loop" which could be either 26 or 52ms.

--Rob
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #34   Spotlight this post!  
Unread 08-02-2003, 21:15
Greg McCoy's Avatar
Greg McCoy Greg McCoy is offline
boiler up!
FRC #3940 (CyberTooth)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 2002
Location: Kokomo, IN
Posts: 484
Greg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond repute
Send a message via AIM to Greg McCoy
Ok, that makes sense, but does 26 some milliseconds in drive time really affect the robot as it drives? I ran automated code without this and had almost perfect position accuracy. It seems like an awfully tiny difference to me.

Last edited by Greg McCoy : 08-02-2003 at 21:26.
  #35   Spotlight this post!  
Unread 09-02-2003, 06:05
Steven Carmain Steven Carmain is offline
Bit Twiddler
FRC #2832
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Westland, MI
Posts: 93
Steven Carmain will become famous soon enough
Greg, quit screwing up my posts and work on wiring our second drive base, our anti-gravity one. I need the electrical done so I can do the program.
__________________
2017 - Team 2832 Mentor
2016 - Team 6013 Mentor
2002-05 - Team 45 Software/Electrical

A robot is like a campfire: it takes a while to bulid it, and then everyone surounds it!
A world without standards is chaos. A world with standards is chaos.
  #36   Spotlight this post!  
Unread 09-02-2003, 10:17
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 Greg McCoy
Ok, that makes sense, but does 26 some milliseconds in drive time really affect the robot as it drives? I ran automated code without this and had almost perfect position accuracy. It seems like an awfully tiny difference to me.
It will make no absolutely no difference if the time through the longest set of branches in your code is less then 26 ms. It will make a slight difference if the the occasional loop is more then 26 ms. If each loop takes 120ms, and you assume 26ms per loop and don't use delta_t, you are in big trouble.
  #37   Spotlight this post!  
Unread 09-02-2003, 12:39
Greg McCoy's Avatar
Greg McCoy Greg McCoy is offline
boiler up!
FRC #3940 (CyberTooth)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 2002
Location: Kokomo, IN
Posts: 484
Greg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond repute
Send a message via AIM to Greg McCoy
Quote:
Originally posted by Steven Carmain
Greg, quit screwing up my posts and work on wiring our second drive base, our anti-gravity one. I need the electrical done so I can do the program.
My intention is not to "screw up posts" or anything of the like, but only to help everyone make better code and solve robot problems. We ALL can learn something new. Discussing topics like this is most certainly helpful to countless teams, both those with a lot of programming experience and those that don't quite have so much skill or knowledge. Sorry if I offended anyone or their ideas...
  #38   Spotlight this post!  
Unread 09-02-2003, 17:28
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
adding delta_t won't make any difference in your code unless your loop takes more than 26ms.

does anybody know what packet_num does?
__________________
1139 Alumni
  #39   Spotlight this post!  
Unread 09-02-2003, 23:19
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
Blah...

I keep seeing posts on timer this, timer that.. why use software timers? So inaccurate if you have lots of code.. I mean, the loop isn't always a set period of time if you mod the code a lot (yeah, we aren't really using anything in the default code except the declarations.. and most of those are gone too.. lol). Using a hardware pulse generator (555 anyone?) allows you to have multiple software timers without worrying too much about loop periods and other useless complex crapola. I mean, you only need a resolution of around 1/4 second at most anyways..
__________________
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 : 09-02-2003 at 23:25.
  #40   Spotlight this post!  
Unread 10-02-2003, 13:33
Steven Carmain Steven Carmain is offline
Bit Twiddler
FRC #2832
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Westland, MI
Posts: 93
Steven Carmain will become famous soon enough
Quote:
Originally posted by randomperson
So inaccurate if you have lots of code.. I mean, the loop isn't always a set period of time if you mod the code a lot (yeah, we aren't really using anything in the default code except the declarations.. and most of those are gone too.. lol).
That is the purpose of delta_t. It always runs and sees how many loops you missed, if any. And I found out it can be a nib insted of a byte to save on variables. Now, if D.J. and Greg finish wiring the drive base...
__________________
2017 - Team 2832 Mentor
2016 - Team 6013 Mentor
2002-05 - Team 45 Software/Electrical

A robot is like a campfire: it takes a while to bulid it, and then everyone surounds it!
A world without standards is chaos. A world with standards is chaos.
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
Timing of nats for next year Ian W. Championship Event 13 03-03-2003 18:28
Way back there. Size of Nationals, and a solution archiver 2001 23 24-06-2002 03:28
what is or isn't a timing belt? archiver 2001 6 23-06-2002 23:26
two sided timing belt archiver 2001 3 23-06-2002 22:34
Dual Sided Timing Belts Lachuck894 Technical Discussion 9 14-01-2002 10:10


All times are GMT -5. The time now is 10:34.

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