Hello, my team is using a Mecanum drivetrain powered by NEOs and Spark Maxes this year, and we would very much like to get trajectory-following working. I think I understand it pretty well, but not 100% yet. I know that I need to get my ks, kv, and ka constants from characterizing the drivetrain and that I need to use the new SysID 2022 tool to do that, but how does it work with a mecanum drivetrain? Do I use the tool exactly as I would with a West Coast Drivetrain?
I don’t have an answer to your question, but I’d advise against using NEOs for your Mecanum. My team had 8 of them break last year and since we switched to Falcon 500’s we have had no issues. If you have it in your budget Falcons are much more durable, have more power, and have a much faster response time.
You can use the drivetrain characterizer just as you would with a tank drive.
NEOs are perfectly fine motors, so I can only assume you were doing something weird with them. Also, they’re available everywhere, whereas the Falcon 500s are generally sold out everywhere.
As a follow up to this, mecanum trajectory following requires a x, y, rotation, and individual wheel PIDs. Would the PID for the tank drive still apply to all? (Excluding rotation which you can get from a rotational test)
The LQR gains will work okay (not perfectly during lateral movement, because of roller friction) for wheel speed control.
They will not work for anything else.
Awesome, thanks! I just wanted someone to clarify that for me
We have already finished building our drivetrain with NEOs
Are the kP values for the x, y, and theta controllers just found through guess-and-check, or is there a better methodology for determining these constants?
Nope. Used them in the toughbox gearboxes under the exact same circumstances as CIM and Falcon motors. The NEOs are the only ones that failed
If you understand the math you can use LQR for those constants, too, but you’d have to do this yourself. Otherwise, guess and tune.
I know this is revitalizing an old thread, but we are about to begin this on Saturday. Do you have a link to sources to help us learn how to begin to translate the LQR constants to x, y, and theta proportions?
I assume the WPILib State Space docs…
…are a good start, but are there other sources you would recommend?
I am not the strongest mathematician on the team.