View Single Post
  #5   Spotlight this post!  
Unread 30-01-2014, 10:09
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,034
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: How to grdually speed up the robot?

Quote:
Originally Posted by Mubtasim View Post
We are trying to make it so that when the joystick signals to seed up, there has to be several milliseconds delays in order to gradually increase the speed. Is there any simple way to do this?
Yes.

Code:
change = joystick - limitedJoystick;
if (change>limit) change = limit;
else (if change<-limit) change = -limit;
limitedJoystick += change;
limit is the amount of change you will allow every iteration (e.g. every 20 milliseconds for TeleOp)

limitedJoystick is the rate-limited joystick value you use to control your motors.



Here's an article which might be of interest:
http://thinktank.wpi.edu/article/140



Last edited by Ether : 30-01-2014 at 10:15.
Reply With Quote