View Single Post
  #11   Spotlight this post!  
Unread 05-02-2014, 19:57
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: How to grdually speed up the robot?

Another way to do this is:

Code:
motor_value = k*joystick_reading + (1-k)*motor_value
k is between 0 and 1.

Large k values make the motor very responsive, and a value of 1 means no filtering is actually happening. Small values make the output move slowly from the old value to the joystick value.

This is an Infinite Impulse Response (IIR) low pass filter, whereas the moving average is a Finite Impulse Response (FIR) filter. Which of these to choose (or using a rate limiter like Ether suggested) depends on what exactly you are trying to accomplish.

My experience with using any sort of filtering in the drive train (other than traction control in 2009) is that drivers usually hate it because if the effect is significant it feels "sluggish".
Reply With Quote