View Single Post
  #5   Spotlight this post!  
Unread 22-02-2011, 12:11
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
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: Correcting Travel Direction

Quote:
Originally Posted by Geek 2.0 View Post
On a mecanum drive base, is there a way to correct for driving direction? For instance, if I want to go 40 degrees to the left of straight, how can I correct any error? I know encoders would be ideal, but is this possible with an accelerometer?

I could use an integrator on an accelerometer to get velocity, but that's not always very accurate. Any other ideas?
Use a gyro.

Take your desired heading angle and subtract the gyro angle from that. Do a little math on the result and run it through a PID.

What you do with the PID output depends on what you mean by "I want to go 40 degrees to the left of straight".

For example, if you want the robot to stay pointed in the commanded direction, the output of the PID would drive the mec's rotation command.



Last edited by Ether : 22-02-2011 at 12:19.