I am looking to implement motion profile into our autonomous. I have been doing some research and my understanding of motion profile is as follows:
1)you want to eliminate the amount of jerk (derivative of acceleration) a robot experiences so that it can be extremely consistent and predictable in its movements.
2) you do this by making sure that the robot does not increase its velocity too quickly
this is where I am a little stuck. I do not give the robot a command for a specific velocity instead i do something like Robot.arcadeDrive(x,0).
Am I supposed to take the robot and feed it several values of x and read the given velocity from an encoder on the drivetrain and then from a linear regression figure out the inverse function? This seems very doable i was just wondering if there is something easier i am missing. Thanks all for your help.
If you want to implement motion profiling there are at least 5 ways to do it without reinventing the wheel that I can name off the top of my head (my kids implemented motion profiling two ways this weekend alone).
You can generate paths and implement motion profiles using these:
Pathfinder by Jaci (Easy to follow integration guide provided in the Wiki and probably would take less than 2 hours to integrate it)
TrajectoryLib by Team 254
SmoothPathPlanner by KHEngineering
If you’re using TalonSRX’s you could likewise use the built in firmware for:
MPE (Motion Profile Executor)
Motion Magic
Whatever path you choose, it took us about 6 or so hours to integrate them for our robot. (would have been less if it wasn’t for one simple bug that was overlooked @ integration)