View Single Post
  #2   Spotlight this post!  
Unread 21-02-2011, 15:53
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Rookie team with Jag trouble

If it is due to quick changes of direction, as you suspect, then the way to fix it is to use software to limit the rate of change of direction.

Here's one possibility: Whenever you're going forward, keep a "reverse limiting" value reset to zero. Whenever you're not going forward, let that limiting value decrease at a constant rate toward -1. If your current joystick value is less than the limiting value, send the limiting value to the motor instead. Do the same thing but upside down for "forward limiting".