Go to Post Ive been chewing on my yellow food wristband every night since the team party on friday at UTC. Every day it tastes better and better...almost as good as the food. Anyone else think so? - Sscamatt [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
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 11-11-2011, 00:14
Dkt01's Avatar
Dkt01 Dkt01 is offline
Programming Mentor
AKA: David
FRC #1756 (Argos)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Peoria, Il
Posts: 145
Dkt01 will become famous soon enough
Exclamation [FTC]: NXT control delay

Throughout the season, we've been having issues with a significant delay between gamepad commands and actual robot movements. This varies from ~.25s to ~.5s. We were going to just deal with it, but I realized the emergency stop is useless because of this. The NXT seems to be executing code with little to no delay (we've tested screen output of commands received and it is very responsive). The NXT will enter and exit programs like it should, but the motors and servos do not respond quickly (if we e-stop the bot, the program will end, but the motors will hold their previous state for up to 3 seconds).

I'll gladly provide more information on our setup if it will help solve the lag issue.
Reply With Quote
  #2   Spotlight this post!  
Unread 12-11-2011, 10:13
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: [FTC]: NXT control delay

This is a hugely open-eneded question.

Yes... please provide more information.

eg:
Programming Language,
Connection method (usb/samantha/bluetooth),
Teleop code sample, (could be any number of bugs)
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #3   Spotlight this post!  
Unread 12-11-2011, 20:32
Dkt01's Avatar
Dkt01 Dkt01 is offline
Programming Mentor
AKA: David
FRC #1756 (Argos)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Peoria, Il
Posts: 145
Dkt01 will become famous soon enough
Re: [FTC]: NXT control delay

Quote:
Originally Posted by PhilBot View Post
This is a hugely open-eneded question.

Yes... please provide more information.

eg:
Programming Language,
Connection method (usb/samantha/bluetooth),
Teleop code sample, (could be any number of bugs)
Sorry about that, I was hoping it was some common issue.
We're using LabView.
We're downloading code via bluetooth, but running everything via the Samantha and the FCS.

A correction on the error stuff: there is still a half-second delay, but I was able to fix the E-Stop delay (now the motors don't run for several seconds after the E-Stop command). I did this by making the teleop a loop that continues while the robot is in teleop and there hasn't been a communication error (used the block that checks time between packets). I then used a sequence to force all motors to brake when teleop is ended or a connection error occurs. This seems to fix the danger issue, but if there is a connection pause in competition, this code would effectively disable the robot for the remainder of the match. If you have any suggestions, they'd be appreciated.

Like I said, our teleop code is basically just a loop that checks for new packets, then we made a VI to output a cluster of named axes and buttons. We then unbundle the cluster and use different buttons and axes to control the two drive motors (we made our own tank drive vi for programming practice, should we use the supplied vi instead?), a conveyor motor, a scissor lift motor, and a few servos.

Again, if I left out some important information, please let me know.
Reply With Quote
  #4   Spotlight this post!  
Unread 13-11-2011, 00:34
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: [FTC]: NXT control delay

It doesn't sound like you are using the teleop template from this year.

The standard template does all the things that you say you coded.

The Template also shuts down all motors and servos when the robot is disabled, or loses coms.

I haven't been able to test whether the E-STOP sends a disable before shutting down the program... I will do that tomorrow, but without your code listing it's impossible to pinpoint a specific problem.

My question regarding the delay is: Does the delay occur all the time, or just when shutting down.

As for the tank drive... unless you have a specific reason for NOT using the one that's built in, it's probably a good staring point.

Sounds like you code is doing several tasks, any of which could be causing a problem. I can speculate about lots of different causes, but you probably don't want a generic answer. Attach the VI to your next post.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #5   Spotlight this post!  
Unread 13-11-2011, 13:45
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: [FTC]: NXT control delay

Quote:
Originally Posted by PhilBot View Post
It doesn't sound like you are using the teleop template from this year.
I agree with Phil (always a safe choice).

Try using the Joystick Editor to create, generate and download a default teleop program. This will tell you if the issue is in your code or it is more systemic.
Reply With Quote
  #6   Spotlight this post!  
Unread 13-11-2011, 20:22
Dkt01's Avatar
Dkt01 Dkt01 is offline
Programming Mentor
AKA: David
FRC #1756 (Argos)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Peoria, Il
Posts: 145
Dkt01 will become famous soon enough
Re: [FTC]: NXT control delay

Yeah, the template fixed it. Silly me. I didn't realize there even was a template.

Thanks for your help.
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 13:25.

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