View Single Post
  #3   Spotlight this post!  
Unread 17-01-2017, 22:28
David Lame David Lame is offline
Registered User
FRC #0247
 
Join Date: Feb 2015
Location: Berkley, MI
Posts: 88
David Lame is a jewel in the roughDavid Lame is a jewel in the roughDavid Lame is a jewel in the roughDavid Lame is a jewel in the rough
Re: Mecanum Drive control

In the past, we've had good success with using a gyroscope to correct the tendency to drift on mecanum drives.

I would think there would be a problem trying to use encoders to correct the wheel speeds, although I've never tried it. The problem I would anticipate is wheel slip. When using encoders for other purposes, I found there was a fair amount of wheel slip with mecanum wheels. To keep the thing driving straight, you would have to have an accurate measure of wheel speed on the ground, and slip would get in the way.

Back when I first joined as a mentor in 2014, I found a good article online about how to use the gyroscope for correction, and we implemented it that year. It involves a PID loop with the gyroscope measurement versus the desired angle for the error input. That article pointed out a few "gotchas", such as the unfortunate tendency for gyroscope chips to drift, and the interesting "kick" that can happen at the end of a turn, but it gave solutions. Unfortunately, I don't have the link to the article, but some googling should find something similar.

We had a very good programming lead that year who understood the concepts, but he was a bit sloppy. Be very, very, careful to avoid sign errors in your PID constants. If you get it wrong, you could go into what was affectionately known as the "death spiral".
Reply With Quote