Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   Startup Twitch (http://www.chiefdelphi.com/forums/showthread.php?t=92445)

Geek 2.0 20-02-2011 14:06

Startup Twitch
 
After a robot reset, our robot doesn't respond for about 5 seconds after enabling, and then twitches (quite violently) and then responds to our control. We're using Java. Can anyone think of a reason for this twitchiness?

Frenchie461 24-02-2011 12:58

Re: Startup Twitch
 
it could twitch from all components powering up and testing, or it could be because of a bad CRiO.

indubitably 24-02-2011 13:04

Re: Startup Twitch
 
Check to make sure your automated processes are not initializing and that your variables are not being set to anything odd initially.

Also, if you are using PID, you may have to tweak your gains so that they do not need to work themselves out.

apalrd 24-02-2011 13:24

Re: Startup Twitch
 
If you have an I term, you have to reset it continuously while disabled. Or else, when you enable it, it has to unwind the I term before (or while) you begin to use it.

Alan Anderson 24-02-2011 14:25

Re: Startup Twitch
 
The five second delay might be a camera or gyro initialization. Make sure you aren't calling for something like that in your Teleop code.

Geek 2.0 20-03-2011 19:13

Re: Startup Twitch
 
Okay I think I finally found the solution. When the robot enables, it doesn't clear out the previous values from the registers of the Jaguars (via CAN). So, upon enabling the robot, the speed controllers start at the same values as the round before, and then stop when they receive a new value. That time between start and stop is the twitch.

Can anyone confirm or deny this?

MamaSpoldi 21-03-2011 10:49

Re: Startup Twitch
 
Quote:

Originally Posted by Geek 2.0 (Post 1042724)
Okay I think I finally found the solution. When the robot enables, it doesn't clear out the previous values from the registers of the Jaguars (via CAN). So, upon enabling the robot, the speed controllers start at the same values as the round before, and then stop when they receive a new value. That time between start and stop is the twitch.

Can anyone confirm or deny this?

Well... I can confirm this is definitely true with PWMs with both Victors and Jaguars but not sure about CAN as we have never used it. I would suggest that you "turn off" everything when leaving both the teleop and autonomous routines in your code (eg. set drive motors to 0.0, and clear any internal states of your control loops, etc). This will ensure that you don't need to be worried when enabling your robot about what it might do. We have definitely experienced this with the gyro initialization as well... but that was more of an issue in the pre-cRIO years.


All times are GMT -5. The time now is 16:50.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi