I noticed OkapiLib’s motion profiling blindly follows velocity without using odometry data to correct for error. Has anybody ever been able to achieve motion profiling AND odometry or do I need to pick one.
This is where “Pure Pursuit” and “Ramsete Controllers” come into play. I’ve found this series of videos on Pure Pursuit very approachable:
WPILib documentation on Ramsete: Ramsete Controller — FIRST Robotics Competition documentation
That said, as with anything, I would advise you to start simple. Perhaps Motion Profiling on it’s own is “good enough”, or using Odometry to track where you are at all times and then generating a Motion Profile for where you want to go is good enough.
Remember Gall’s Law:
A complex system that works is invariably found to have evolved from a simple system that worked. A complex system designed from scratch never works and cannot be patched up to make it work. You have to start over with a working simple system
Thanks for answering
Is pure pursuit or Ramsete generally better? I ask because when I google Ramsete it’s all about FIRST and when I google pure pursuit there’s more stuff from college courses, neither of them seem to be used in vex much.
Not really answerable. They both seek to do the same thing - given a trajectory and given odometry information, try to follow the theoretical trajectory based on observed state. In general, it seems that the WPILib folks (who are way smarter and experienced than I) seem to differentiate the two based on the type of drivetrain - Pure Pursuit for Holonomic drives and Ramsete for skid-steer. That said, I’m pretty sure folks have run skid-steer drives thru a motion profile using pure pursuit. But I’m sure posts on ChiefDelphi (and probably several posters here) can give you a more educated / informed opinion than mine.
In either case, there is still going to be some sort of tuning - what look-ahead distance to use for PP (do you vary it based on speed/curvature/etc.), or the gains for Ramsete. That tuning will come after you’ve written / copied / implemented the algo, along with the associated debugging process.
Not trying to discourage, just trying to help folks understand the implications of going down this…path
- You’ll need your Motion Profiling to work
- You’ll need your Odometry to work
As you iterate thru the Motion Profile, you may need to make sure that your Odometry is in sync with the MP. This may be one area where Pure Pursuit is “better” in the sense that your “current” position and the “look-ahead” factor relatively deterministically finds your target point.
My best advice is: Make sure you don’t lose sight of the reason that led you to explore this topic. Most likely that is “How do I make my robot move reliably over long distances quickly during autonomous?” A reliable auton w/o pure pursuit is probably better than an unreliable auton w pure pursuit. But being able to discuss what it is, what challenges you faced, and why you decided to use it or not is a fantastic topic to discuss during judging interviews.