View Single Post
  #5   Spotlight this post!  
Unread 18-01-2017, 15:39
JohnGilb JohnGilb is offline
Programming Mentor, Drive Mentor
FRC #0488
 
Join Date: Mar 2011
Rookie Year: 2003
Location: Redmond, WA
Posts: 116
JohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura about
Re: Mecanum Drive control

Our team took a fairly simple approach with regards to controlled mecanum drive.
  1. Measure our angle relative to the field
  2. Measure our instantaneous velocity

For (1), We used a highly accurate gyro. Today, the navX-MXP is a great choice.

For (2), we put three "follow wheels" on the robot to measure our velocity relative to the floor. These were small omniwheels sprung to press against the carpet with encoders on them.

We then broke mecanum drive into two components - rotation and translation.

The rotational PID attempted to keep robot heading constant unless the driver indicated a change via joysticks.

The translational PID compared the ideal velocity (from the driver's joysticks) to the actual robot X/Y velocity.

Between these two, we had a "rotational intent" and "translational intent" that were fed into the WPILib mecanum library.

This ended up being a good approach for us, since we didn't need to worry about wheel slip - the follow wheels were very accurate throughout the match. (This approach doesn't work as well when the playing field isn't level).

By applying PID on the total output of the system (i.e. how exactly is the robot moving) we were able to account for drift, slip, X/Y friction asymmetry, weight distribution, etc... with this one solution.
Reply With Quote