Mecanum Drive strafing moves in an arc

Our team is using mecanum drive for our chassis this year. We are attempting to get it to strafe left and right however when we do it typically follows an arc instead of going right or left. We have attempted to use pids and even got them working quite well when not strafing. Any advice on this?

In general, FRC robots that use mecanum drives will follow non-straight paths when controlled in an open-loop way due to all sorts of factors:

  • Weight of the robot settling on different wheels due to acceleration/deceleration
  • Motors that all behave slightly differently
  • Manufacturing differences for each drive pod (a little more friction here, a little less there…)

It sounds like you are already using some form of PID control. What are you measuring? If you’re not already, then I suggest putting the orientation of your robot under PID control using a gyro, and holding your most recent heading if your rotational input is small.

Ideally, you would also be measuring ground-truth speeds via unpowered follow wheels so you could directly measure translation, and use PID on that as well. In previous years where we have built mecanum drives, our robot has often been under several layers of PID control:

  • Positional PID for a target heading
  • Velocity PID for a target X translation
  • Velocity PID for a target Y translation
  • Each wheel had a Velocity PID to reach specific rotational rates.

However, you can get a lot of value just out of heading control, which only requires a gyro.

We had this issue in 2017, but instead of fixing it we actually used it to our advantage. The arc meant we could start strafing earlier and it sped up our cycle time. That being said, I highly recommend using a closed loop control to fix this. Just a simply P controller will probably get you to strafe perpendicularly.

double error = 90 - gyro.getHeading();

Team Titanium in 2017 has a great shot in their video of how they mounted wheels to do this

You should start by ensuring your mechanical system system is working correctly. Using software to cover up a mechanical deficiency is bad practice.

Meccanum drives rely on the 4 wheels all having approximately the same normal force relative to the floor (weight) at all times. This can be difficult when the floor is not flat. Some compliance (flexibility) in your chassis would allow the weight to be more evenly distributed over the 4 wheels. How stiff is your chassis?

First, a couple of basic things: Are your wheels arranged correctly? That is, do the rollers form an “X” when viewed from above, a diamond when viewed from below?
Are your wheels mapped correctly? When on blocks,

  • Drive forward should have all wheels spinning the same direction
  • Rotate right should reverse the right side wheels
  • Starting from forward, strafe right should reverse the right front and left rear wheels

Next, and what I suspect is your problem: check that your rollers spin freely. This will not bother driving forward, but will significantly affect strafing and affect turning somewhat less.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.