Go to Post Sleep... what is this sleep you speak of? - Choi9111 [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 17-02-2009, 18:00
Xavier Brandall's Avatar
Xavier Brandall Xavier Brandall is offline
Registered User
FRC #1245
 
Join Date: Dec 2007
Location: Louisville, Colorado
Posts: 19
Xavier Brandall is an unknown quantity at this point
Teleop Lag

We have our teleop code programmed, and it works independently perfectly. However, when we use it with the Basic Robot Main.lvproj project we get a half second delay from when the driver moves a joystick to when the robot responds. We have thusfar been unable to remove this. Here's some info that might help:

We are using LabView
Our Teleop Code is hardcoded directly into the "TeleOp Execute" case in Basic Robot Main.vi

We have to use this vi and project because at the competitions they will switch autonomous and teleoperated for us utilizing this code. Also, if you are not going to post a suggestion to solve this problem please do not post.
  #2   Spotlight this post!  
Unread 17-02-2009, 18:05
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Teleop Lag

A very early version of the framework/firmware had this issue. Have you updated to the most recent version yet?
  #3   Spotlight this post!  
Unread 17-02-2009, 21:07
lynca's Avatar
lynca lynca is offline
Andrew Lynch
FRC #2587 (DiscoBots)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Houston, TX
Posts: 1,612
lynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond repute
Send a message via AIM to lynca
Re: Teleop Lag

We had a similar teleop delay issue when we run in Deploy Mode.
We are using DS (1-22-09) and cRio (v11).

We found that right-clicking the Deploy setting and selecting "Build" then "Run as Startup" fixes the issue.
__________________
History: 624 - Cryptonite --> 118 - Robonauts --> 2158 - AusTIN CANS --> 2587 DiscoBots
Bio: Andrew Lynch "How I Work" ---- LinkedIn , Facebook, Twitter
  #4   Spotlight this post!  
Unread 18-02-2009, 19:51
Xavier Brandall's Avatar
Xavier Brandall Xavier Brandall is offline
Registered User
FRC #1245
 
Join Date: Dec 2007
Location: Louisville, Colorado
Posts: 19
Xavier Brandall is an unknown quantity at this point
Re: Teleop Lag

We have the three updates and the Rio has been imaged correctly, but we are still having these problems.
  #5   Spotlight this post!  
Unread 18-02-2009, 21:19
keehun's Avatar
keehun keehun is offline
Team Captain
AKA: Keehun Nam
FRC #2502 (EP Robotics)
Team Role: Leadership
 
Join Date: May 2008
Rookie Year: 2008
Location: Eden Priaire
Posts: 474
keehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond repute
Send a message via AIM to keehun
Re: Teleop Lag

Well, what I found out was that even when your LabView was updated for FRC update #3, your old project still retains links to older updates. I remember nearly at the end before shipping that we were still using dependencies as old as before kickoff (early control system recipient) and so I had to create the whole 20~30 file LabView project from scratch. Granted, most of it was copy and pasting, but you may need to start from a new & fresh project and then re-image the cRio one more time.

Not sure if that's it, but it doesn't hurt to try
__________________
For by grace you have been saved through faith, and that not of yourselves; it is the gift of God, not of works, lest anyone should boast. -- Ephesians 2:8-9
2010: Quarter Finalist (MN 10,000 Lakes)
2010: Website Award (MN 10,000 Lakes)
2009: Quarter Finalist (MN 10,000 Lakes)
2009: GM Industrial Award (MN 10,000 Lakes)
  #6   Spotlight this post!  
Unread 18-02-2009, 21:32
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Teleop Lag

Can you characterize the delay any more?

The most likely thing that is causing this is having code in the teleop loop that causes it to finish late. A new teleop message arrives every 20ms, so you can't really do much in there. Go ahead and time the amount of time spent in the loop or the time between subsequent iterations.

And if you plug in the serial cable, are there messages on the terminal that give an indication as to what is going on? The earlier issue with the lag, by the way had to do with too many print statements being sent out the serial port, so even a message that doesn't sound bad may give info towards the lag.

Greg McKaskle
  #7   Spotlight this post!  
Unread 10-03-2009, 17:47
Xavier Brandall's Avatar
Xavier Brandall Xavier Brandall is offline
Registered User
FRC #1245
 
Join Date: Dec 2007
Location: Louisville, Colorado
Posts: 19
Xavier Brandall is an unknown quantity at this point
Re: Teleop Lag

We have done more with meticulous probing and have isolated the source of the lag to JoystickCache.vi. You can reach it by going through the following VIs:
JoystickGetAxis.vi
JoystickGet.vi
JoystickCache.vi is there in JoystickGet.vi. We've tried to localize the source more within the program, but have been unable to figure out a way to make it work faster. Thanks for all your help so far.
  #8   Spotlight this post!  
Unread 10-03-2009, 23:33
Alex698's Avatar
Alex698 Alex698 is offline
Sparky
FRC #2449 (Out of Orbit Robotics)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Arizona
Posts: 114
Alex698 is a jewel in the roughAlex698 is a jewel in the roughAlex698 is a jewel in the rough
Send a message via AIM to Alex698
Re: Teleop Lag

we've had similar issues and it seems that the more open .vi's slows the program down more and more. When you run as startup the computer is no longer linked and the delay issue usually goes away. Try just running the robot main.vi front panel and say vision processing.vi front panel.

-Alex
__________________
Eat, Sleep, Build Robots
  #9   Spotlight this post!  
Unread 11-03-2009, 14:16
Mike Bortfeldt Mike Bortfeldt is offline
Registered User
FRC #1126 (& 1511)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Rochester, NY
Posts: 119
Mike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud of
Re: Teleop Lag

We ran into a similar problem during the build season, all our DS controls were delayed by around 1/2 second. If I remember correctly, we traced it the vision code. Our solution was to lower the priority on the vision processing to allow the robot code to have priority. I'll have to check to be sure. One quick check would be to disable the vision processing and see if your problem goes away.

Mike
  #10   Spotlight this post!  
Unread 11-03-2009, 16:29
Sauce Sauce is offline
Registered User
FRC #1245 (Shazbots)
Team Role: Programmer
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Louisville
Posts: 35
Sauce is an unknown quantity at this point
Re: Teleop Lag

@Alex698:
Maybe you should have read the whole post.... someone already said that and we have already tested that theory to no avail
@Mike Bortfeldt:
Same as above, we already traced it to a specific VI (JoystickCache.vi) located in between the while loop and the "Get,Set,Init" case structure
But thanks for trying

P.S. I am another programmer on Xavier's team
  #11   Spotlight this post!  
Unread 11-03-2009, 16:58
Sauce Sauce is offline
Registered User
FRC #1245 (Shazbots)
Team Role: Programmer
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Louisville
Posts: 35
Sauce is an unknown quantity at this point
Re: Teleop Lag

We have fixed this problem, copy-paste works wonders
  #12   Spotlight this post!  
Unread 11-03-2009, 22:13
Foster Foster is offline
Engineering Program Management
VRC #8081 (STEMRobotics)
Team Role: Mentor
 
Join Date: Jul 2007
Rookie Year: 2005
Location: Delaware
Posts: 1,393
Foster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond repute
Re: Teleop Lag

Quote:
Originally Posted by Sauce View Post
We have fixed this problem, copy-paste works wonders
As in you started a new environment and cut and pasted all of your old code into the new?
  #13   Spotlight this post!  
Unread 12-03-2009, 00:14
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Teleop Lag

I looked at the subVI in question, and I how the subVI you mentioned would cause a problem. Can you be more specific about copy/paste fixing the problem?

Greg McKaskle
  #14   Spotlight this post!  
Unread 16-03-2009, 16:39
Xavier Brandall's Avatar
Xavier Brandall Xavier Brandall is offline
Registered User
FRC #1245
 
Join Date: Dec 2007
Location: Louisville, Colorado
Posts: 19
Xavier Brandall is an unknown quantity at this point
Re: Teleop Lag

To clarify what Sauce said, we opened a new environment on a new computer and rebuilt the code there, mostly using copy and paste from the old file, to see if that would work. It did.
  #15   Spotlight this post!  
Unread 17-03-2009, 18:21
cooldude8181's Avatar
cooldude8181 cooldude8181 is offline
Registered User
AKA: Charlie Davies
FRC #1245 (Shazbots)
Team Role: Programmer
 
Join Date: Oct 2008
Rookie Year: 2009
Location: Colorado
Posts: 39
cooldude8181 is an unknown quantity at this point
Re: Teleop Lag

My team had this problem too, and we fixed it by just copying and pasting the code... surprisingly, it worked!
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
adding a second joystick to TeleOp Init smcmahon NI LabVIEW 14 17-02-2009 20:43
Labview Autonomous AND Teleop Two-Face Programming 1 14-02-2009 18:33
Auto and Teleop Modes Hate Eachother!!! HELP!!! furiousgeorge Programming 13 13-02-2009 01:57
Detecting Start of TeleOp Mode Danny Diaz Programming 4 26-02-2008 01:37
Lag Issue bizarospooky Programming 7 08-02-2008 17:31


All times are GMT -5. The time now is 12:35.

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