Go to Post Both might accomplish the same "function" or "results" (perhaps a lift of some kind), but there are clear differences in simplicity, in cost, in maintainability, extensibility, and several other "ilities" -- which are a staple of engineering evaluation criteria. - msd [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-14-2013, 02:04 PM
tinybob20 tinybob20 is offline
Registered User
AKA: Jeremy
FRC #1559 (DevilTech)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Victor
Posts: 18
tinybob20 is an unknown quantity at this point
Bad Lag

Our team has gone to two regionals this year. At both we have experienced large amounts of lag between our control system and robot. After our first competition, we decided to take a shotgun approach to fixing the lag. We had originally written or code in Java with the simpleRobot template, so we tried writing it in Iterative, both with and without a separate thread for the drive system. We did find that the Iterative without a thread for drive improved the lag issues, but a newer issue seemed to emerge. We would see the robot stop for a bit, drive for a bit, then stop again, repeating over and over. The drive logs did not show any lost connections. If anyone has had this issue and was able to solve it, it would be great if you could show us how to fix this.
Reply With Quote
  #2   Spotlight this post!  
Unread 04-14-2013, 02:06 PM
BigJ BigJ is offline
Registered User
AKA: Josh P.
FRC #1675 (Ultimate Protection Squad)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Milwaukee, WI
Posts: 943
BigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond repute
Re: Bad Lag

Could you post your robot code? That would be the easiest way to identify if it is a code issue or not.
Reply With Quote
  #3   Spotlight this post!  
Unread 04-14-2013, 03:09 PM
tuXguy15's Avatar
tuXguy15 tuXguy15 is offline
Team Mentor
AKA: Devin Kolarac
FRC #2559 (Normality Zero)
 
Join Date: Apr 2012
Rookie Year: 2012
Location: Harrisburg, PA
Posts: 127
tuXguy15 is an unknown quantity at this point
Re: Bad Lag

Most likely it was your camera. We had this problem at out first District event and the field crashed several times in the middle of the match from teams using too much bandwidth. Try changing your camera settings, compression, and resolution to see if that helps. You can only use 7 Mb for your bandwidth this year so u don't have a lot.
Reply With Quote
  #4   Spotlight this post!  
Unread 04-14-2013, 03:16 PM
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,547
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
Re: Bad Lag

Did it only lag on the field, or did it lag in the pits too? In addition to the code, can you post a driver station log file both from the field and from the pit?
Reply With Quote
  #5   Spotlight this post!  
Unread 04-14-2013, 05:40 PM
tinybob20 tinybob20 is offline
Registered User
AKA: Jeremy
FRC #1559 (DevilTech)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Victor
Posts: 18
tinybob20 is an unknown quantity at this point
Re: Bad Lag

We have had no lag in the pits or at home. we were actually able to play Unreal and transfer files across our robots router, while still having no lag issues back at home. Our camera is currently at the lowest possible resolution and at 70% compression. I have attached our code in the zip file.
Attached Files
File Type: zip UltimateAscentIterativeNoDriveThreadBaltimoreThree.zip (1.36 MB, 21 views)
Reply With Quote
  #6   Spotlight this post!  
Unread 04-16-2013, 08:35 PM
tinybob20 tinybob20 is offline
Registered User
AKA: Jeremy
FRC #1559 (DevilTech)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Victor
Posts: 18
tinybob20 is an unknown quantity at this point
Re: Bad Lag

Here are our log files. I posted a picture of a match in which we had terrible lag. In the beginning of Teleop, you can see, based on the voltage leveling off, where our robot was dropping out. This was an issue that would seemingly appear at random during some matches, and others not.
Attached Thumbnails
Click image for larger version

Name:	Untitled.jpg
Views:	39
Size:	232.6 KB
ID:	14624  
Attached Files
File Type: zip Log Files.zip (1.51 MB, 2 views)
Reply With Quote
  #7   Spotlight this post!  
Unread 04-16-2013, 09:34 PM
tuXguy15's Avatar
tuXguy15 tuXguy15 is offline
Team Mentor
AKA: Devin Kolarac
FRC #2559 (Normality Zero)
 
Join Date: Apr 2012
Rookie Year: 2012
Location: Harrisburg, PA
Posts: 127
tuXguy15 is an unknown quantity at this point
Re: Bad Lag

Was it just you guys or your entire alliance?
Reply With Quote
  #8   Spotlight this post!  
Unread 04-17-2013, 01:08 PM
ykarkason ykarkason is offline
21st Century Schizoid Man
FRC #3316 (D-Bug)
Team Role: CAD
 
Join Date: Dec 2012
Rookie Year: 2013
Location: Israel
Posts: 63
ykarkason will become famous soon enoughykarkason will become famous soon enough
Re: Bad Lag

The only thing which is special about this log is that to robot battery drops to 8.5 volts at mostly the first half of teleop.
Is there a reason that it stays around 11.5 volts for most of the second half of teleop?
What I can say from just that log file(I'm without the Log-Viewer on this computer, so I'm only covering the photo you attached), is that perhaps, you should try using new batteries, fully-charged.
Starting a match with 12.8 volts was unacceptable this year for us, we used 4 CIMs for the drive-train and 2 CIMs for the shooter, obviously very battery-consuming. If we had started a match with a too low battery it just would not be able to reach the right speed for the shooter wheels.
Reply With Quote
  #9   Spotlight this post!  
Unread 04-17-2013, 04:07 PM
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,547
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
Re: Bad Lag

Your communication looks fine as far as trip time and missed packets.

I noticed from your code that you are using CAN. Is it possible that you have a bad cable or terminator that is causing issues after a little while in the match (maybe after getting jostled)? It looks like you could switch to using PWM fairly easily to test.
Reply With Quote
Reply


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


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

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