I want to tap into the experience of other teams with mecanum wheels. We are using mecanum wheels this season. Earlier in the season, it was performing very well. But lately, it can't strafe straight any more. When strafe to the left, it also goes a little backward so it was traveling diagonally left and back (the heading is fine though since we use gyro to maintain proper heading). It messed up our autonomous. We examined the wheels very careful. We thought we found some free play of the wheels (some wheels have free play side to side so that when it strafes, they may shift to one side rubbing against the frame). We took the wheels out and re-assemble them with proper spacers to get rid of the problem. The problem went away for a while. Then it's back again. We examined the wheels again and they don't have any free play any more. So what caused that? We have a motor test that we run on each individual wheel for 5 seconds and if one wheel has more friction than the others, it will show up with a lesser encoder count. But all wheels have pretty much the same count (with insignificant differences). We vacuumed the field thinking debris on the field may make the wheels slip. Anything we did would improve the situation a bit but the problem always comes back. So I am wondering if anybody has any suggestion on what else to look for.
Announcement
Collapse
Technology Forum Has Moved!
The FIRST Tech Challenge Technology forum has moved to a new location! Please take a look at our forum blog for links and instructions on how to access the new forum.
Note that volunteers (except for FTA/WTA/CSA will still access their role specific forum through this site. The blog also outlines how to access the volunteer forums.
Note that volunteers (except for FTA/WTA/CSA will still access their role specific forum through this site. The blog also outlines how to access the volunteer forums.
See more
See less
Experience with mecanum wheels?
Collapse
X
-
We have the same issue and I believe it is affected by the foam tiles more than anything. We also use a gyro to maintain proper heading while strafing but have the same issue of drifting forwards and backwards while going both left and right. One test was to strafe across the entire field with the intention of moving in a straight line. Sometimes it was in front of the line and sometimes behind the line. It actually made it to the other side right on target. Differences in the floor is the only thing that could explain that. We haven't come up with a way to detect or compensate for this but only plan on strafing short distances in autonomous.
Does speed make a difference for you? We're using the dpad buttons to move in the four cardinal directions but at a low speed for precise control during teleop. It seems to go straighter at lower speeds.
-
-
Originally posted by mlwilliams View PostDoes speed make a difference for you? We're using the dpad buttons to move in the four cardinal directions but at a low speed for precise control during teleop. It seems to go straighter at lower speeds.
1) What motors are you using?
This is important for a couple of reasons:
a) because most motors generate less CPS than the standard TETRIX motors. So if you are over-demanding, some of your motors may be generating more speed than the others, simply because they are maxed out
differently. This may cause drift while strafing. Requesting a lower speed would eliminate this problem.
b) we know that last season's NR motors had an issue that they generated less pulses while under load, but only in one direction (this was due to shifting of the encoder magnet).
Is the issue symetrical? eg: is the drift the same in both directions.
What % speed are you requesting f
Comment
-
-
Having fought (and finally overcome) these same issues on an FRC build 2 years go, here are three thoughts on things you can try:
1> You could try moving the Center of Gravity around the robot (e.g. by adding temporary ballast). If your CoG is not directly over the geographic middle of your wheels, you will have different weights and thus different frictional effects on each wheel. Mecanum works best with equal weight on each wheel. Going slower generally limits wheel slippage, and reduces the impacts of the above. Moving the CoG around and testing impacts will help you understand if unequal wheel slippage might be a problem.
Also consider the "net torque" around the non-centered CoG for all the force vectors for your 4 wheels, and if they don't net out to 0 your robot will rotate as it strafes. If your CoG is far from centered, this can be significant.
In short, having stable and centered CoG if possible is the most important fix. Everything else you do is to OVERCOME the issues that are created with other configurations.
2> Another thing to look at: are you regulating the wheel speeds via Encoder (e.g. Run With Encoder) as you strafe? Minor variations in motor, gear box, axles, bearings, etc can have a huge impact on real wheel rotational speed, and even very minor variations will cause issues. For TeleOp this is pretty easy to deal with just be setting motor controller mode. For Auto, the problem is you are probably using Run to Position, which AFAIK doesn't guarantee the motor is running at a particular encoder verified speed, only that it will attempt to run to a specific encoder value. All 4 wheels might be moving the right number of clicks, but not necessarily at synchronized RPMs (e.g. one wheel moving a bit faster at the start of the motion than others). The MR motor controllers are I think fairly unsophisticated in managing the motor speed -- pretty much just powering the motor "open loop" at the max power you specify until it gets close to the target.
We overcame this with an FRC robot build a few years back using custom PID code in Java instead of relying on PID code in motion controllers. Basically you need a PID routine on the overall robot that controls the distance moved (forward/back or strafe). This is a single PID for the entire robot, not per wheel. Its input is the "average" of the distance to be moved of the 4 wheels -- i.e. average of the encoder clicks remaining to be moved -- but you have to carefully account for the "sign" of the encoders and wheels turning in opposite directions when you strafe and same direction for forward/back movement when you compute this average. Note that this PID has NO direct connection to powering/moving individual wheels.
The output of this first stage PID provides a desired velocity you want to move the robot, in this case in a particular strafing direction. We then apply the normal Mecanum motion mathematics to convert this velocity into specific required rotational velocities for each wheel. We then use this as the input to each wheels motors using a PID type speed control (e.g. Run With Encoder). This scheme which relies on averaging the various encoders as a measure of overall distance moved / remaining only works for motion directly forward/back or direct side to side strafing. The mathematics breaks I think if you try and use it for diagonal motion of any type.
3> You may be able to use a gyro to help keep things in alignment as you strafe. Depending on how you apply gyro correction, it might just keep you "straight" but with forward/rear drift as mlwilliams points out. Generally Mecanum motion calculations have as an input both a translation motion vector (distance and velocity) but also a rotational velocity input. Using the gyro to detect alignment error as you strafe (i.e. you turned) would allow you to deriva a rotational velocity input for your Mecanum calculations. However, there are several complexities here, as CoG potentially comes back into play doing the rotational correction accurately. Finally, the math for rotational calculations of the "simple" Mecanum dynamics assume the wheels are in a square configuration (equal wheelbase side to side and front to rear wheels). If your geometry is different, you may need to adjust.
There are several white papers and presos on ChiefDelphi that go through Mecanum motion dynamics, including calculations accounting for varying wheel bases, track widths, etc... Some to start with:
https://www.chiefdelphi.com/media/papers/1836
https://www.chiefdelphi.com/media/papers/2390
https://www.chiefdelphi.com/media/papers/1836
Good luck with this. It's certainly doable and has been done by teams in the past -- but does require quite a bit of time to get right.
Comment
-
-
Originally posted by mlwilliams View PostDoes speed make a difference for you? We're using the dpad buttons to move in the four cardinal directions but at a low speed for precise control during teleop. It seems to go straighter at lower speeds.
Comment
-
-
Originally posted by Philbot View PostI don't know how much load is placed on the motors while running mecanum wheels, so I'll ask a couple of questions..
1) What motors are you using?
This is important for a couple of reasons:
a) because most motors generate less CPS than the standard TETRIX motors. So if you are over-demanding, some of your motors may be generating more speed than the others, simply because they are maxed out
differently. This may cause drift while strafing. Requesting a lower speed would eliminate this problem.
b) we know that last season's NR motors had an issue that they generated less pulses while under load, but only in one direction (this was due to shifting of the encoder magnet).
Is the issue symetrical? eg: is the drift the same in both directions.
What % speed are you requesting f
Strafing does cause a lot of stress on the motors. I can tell because I was monitoring the battery voltage. If we are just driving forward and backward, a fully charged battery (13V at rest) will be drawn down to 12V or may be 11V in the worst case. But when strafing, the battery can go down to 10 or 9V easily.
Comment
-
-
Originally posted by msonnier View Post1> You could try moving the Center of Gravity around the robot (e.g. by adding temporary ballast). If your CoG is not directly over the geographic middle of your wheels, you will have different weights and thus different frictional effects on each wheel. Mecanum works best with equal weight on each wheel. Going slower generally limits wheel slippage, and reduces the impacts of the above. Moving the CoG around and testing impacts will help you understand if unequal wheel slippage might be a problem.
Originally posted by msonnier View Post2> Another thing to look at: are you regulating the wheel speeds via Encoder (e.g. Run With Encoder) as you strafe? Minor variations in motor, gear box, axles, bearings, etc can have a huge impact on real wheel rotational speed, and even very minor variations will cause issues. For TeleOp this is pretty easy to deal with just be setting motor controller mode. For Auto, the problem is you are probably using Run to Position, which AFAIK doesn't guarantee the motor is running at a particular encoder verified speed, only that it will attempt to run to a specific encoder value. All 4 wheels might be moving the right number of clicks, but not necessarily at synchronized RPMs (e.g. one wheel moving a bit faster at the start of the motion than others). The MR motor controllers are I think fairly unsophisticated in managing the motor speed -- pretty much just powering the motor "open loop" at the max power you specify until it gets close to the target.
Originally posted by msonnier View PostWe overcame this with an FRC robot build a few years back using custom PID code in Java instead of relying on PID code in motion controllers. Basically you need a PID routine on the overall robot that controls the distance moved (forward/back or strafe). This is a single PID for the entire robot, not per wheel. Its input is the "average" of the distance to be moved of the 4 wheels -- i.e. average of the encoder clicks remaining to be moved -- but you have to carefully account for the "sign" of the encoders and wheels turning in opposite directions when you strafe and same direction for forward/back movement when you compute this average. Note that this PID has NO direct connection to powering/moving individual wheels.
Code:// // According to RobotDrive.mecanumDrive_Cartesian in WPILib: // // LF = x + y + rot RF = -x + y - rot // LR = -x + y + rot RR = x + y - rot // // (LF + RR) - (RF + LR) = (2x + 2y) - (-2x + 2y) // => (LF + RR) - (RF + LR) = 4x // => x = ((LF + RR) - (RF + LR))/4 // // LF + RF + LR + RR = 4y // => y = (LF + RF + LR + RR)/4 // // (LF + LR) - (RF + RR) = (2y + 2rot) - (2y - 2rot) // => (LF + LR) - (RF + RR) = 4rot // => rot = ((LF + LR) - (RF + RR))/4 //
Originally posted by msonnier View PostThe output of this first stage PID provides a desired velocity you want to move the robot, in this case in a particular strafing direction. We then apply the normal Mecanum motion mathematics to convert this velocity into specific required rotational velocities for each wheel. We then use this as the input to each wheels motors using a PID type speed control (e.g. Run With Encoder). This scheme which relies on averaging the various encoders as a measure of overall distance moved / remaining only works for motion directly forward/back or direct side to side strafing. The mathematics breaks I think if you try and use it for diagonal motion of any type.
Originally posted by msonnier View Post3> You may be able to use a gyro to help keep things in alignment as you strafe. Depending on how you apply gyro correction, it might just keep you "straight" but with forward/rear drift as mlwilliams points out. Generally Mecanum motion calculations have as an input both a translation motion vector (distance and velocity) but also a rotational velocity input. Using the gyro to detect alignment error as you strafe (i.e. you turned) would allow you to deriva a rotational velocity input for your Mecanum calculations. However, there are several complexities here, as CoG potentially comes back into play doing the rotational correction accurately. Finally, the math for rotational calculations of the "simple" Mecanum dynamics assume the wheels are in a square configuration (equal wheelbase side to side and front to rear wheels). If your geometry is different, you may need to adjust.
Comment
-
-
Phil,
Thinking about it some more, I am suspecting you are right about the shifting magnets in the encoders because strafing does assert a lot of stress on the motors. How do you prove that? Is there a simple way to pinpoint this is the problem? One way I can think of is too add external US Digital encoders but it is a lot of work modifying the robot for this "experiment" (have to somehow mount the encoders on either the motor shaft or the wheel shaft.
Comment
-
-
Originally posted by mikets View PostPhil,
Thinking about it some more, I am suspecting you are right about the shifting magnets in the encoders because strafing does assert a lot of stress on the motors. How do you prove that? Is there a simple way to pinpoint this is the problem? One way I can think of is too add external US Digital encoders but it is a lot of work modifying the robot for this "experiment" (have to somehow mount the encoders on either the motor shaft or the wheel shaft.
The system "appears" to be working correctly because all the encoder values match what they should,, but in reality the effected motors are trying to run faster because they aren't sending the motor controllers enough pulses. This assumes you are running in RUN_USING_ENCODER mode, which we typically so.
Ultimately we proved what was going on by running running all motors at 50% power (under load) for 2 seconds (when we pressed a button) and recorded the change in encoder counts for each motor.
One was decidedly less than the others. After replacing the motor, things worked fine... for about 2 days, and then it stared happening again.
We disected the motor and saw the encoder magnet move in and out based on load.
------ A new thought ------
Folks have been talking about having a balanced COG, which is pretty essential, but there is another issue...
It's hard to keep even ground contact on a 4 wheel robot, and a mecanum drive needs equal pressure on all wheels to ensure that the force vectors line up.
This is why it's hard to use them on uneven ground.
Have you checked that all your wheels are aligned to the same plane?
If you have direct drive wheels, it's really easy to just accidentally rotate one motor in the mount, and cause an uneven drive surface.
Even a frame that isn't built square (flat) can be a problem. 1/8" can make all the difference.
ps: This is why we went with a three wheel omni this year. Guaranteed contact on wheels plus you get an extra motor to use elsewhere
.
Comment
-
-
Originally posted by Philbot View PostIt was quite difficult to diagnose and prove the encoder issue.
The system "appears" to be working correctly because all the encoder values match what they should,, but in reality the effected motors are trying to run faster because they aren't sending the motor controllers enough pulses. This assumes you are running in RUN_USING_ENCODER mode, which we typically so.
Ultimately we proved what was going on by running running all motors at 50% power (under load) for 2 seconds (when we pressed a button) and recorded the change in encoder counts for each motor.
One was decidedly less than the others. After replacing the motor, things worked fine... for about 2 days, and then it stared happening again.
We disected the motor and saw the encoder magnet move in and out based on load.
Originally posted by Philbot View PostHave you checked that all your wheels are aligned to the same plane?
If you have direct drive wheels, it's really easy to just accidentally rotate one motor in the mount, and cause an uneven drive surface.
Even a frame that isn't built square (flat) can be a problem. 1/8" can make all the difference.
Comment
-
-
Robot needs Iron
Mecum wheels have to have balanced loads. We carry 15 pounds of weight on our robot to make it work well with these wheels (really: we buy exercise ankle weights and take the iron out of them). We move the weight around so that everything is exactly balanced in the center of the four wheels. The mecum wheels need even pressure on them to successfully strafe: any differences will cause some to slip and others to roll.
Comment
-
-
We rebuilt our robot with mecanum wheels, and find that sideways driving does not go straight due to wheel slippage. Two of our 10th grade team members came up with a test: mark all 4 wheels with a bit of colored tape. Run an Autonomous opmode that simply strafes a few feet, and a little more to get a tape marker to show again. If your software and hardware are turning the wheels the proper amount, all four tape markers will show. Ours passes that test. We therefore think our wheels are slipping. They seem to do so more on a slick floor than on the Velocity Vortex Field.
We tried robgcarlisle's manual push down technique, but it did not help. Static weights, though, may be a better test.
Comment
-
-
Originally posted by 5294-jjkd View PostWe are using mecanum wheels, with no issue of slippage --- our robot weighs over forty pounds at this point without any added ballast.
Comment
-
Comment