View Single Post
  #3   Spotlight this post!  
Unread 01-12-2010, 10:50
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,065
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: Mecanum - use of gyro

Quote:
Originally Posted by mwsmith78 View Post
It works, but not as smooth as we would like. We still get some drifting, but other times you can see it correcting (especially when we inflate k1).
To address these issues, you can try a somewhat more complicated approach.

Take your Z-axis (yaw rate) command from your joystick and integrate it (with a gain tuning constant) to create a yaw angle command.

Take the accumulated yaw angle measurement from the gyro and subtract it from the yaw angle command to form the yaw angle error.

Now you can feed this yaw angle error into a PID. The output from the PID is your modified yaw rate command Z' which gets sent (along with your fwd/rev and strafe joystick commands) to your mecanum logic which converts them in to the four wheel speeds.



Reply With Quote