I’m a bit confused with Talon’s motion profile mode and where the Pigeon IMU plays into all of this. First, what is the difference between Motion Profile mode and Motion Profile Arc mode? I know Motion Profile Arc has something to do with the Pigeon IMU, but how is it better or worse? Also, if I want to run a 2D profile with a drivetrain and do curves and stuff, do I need to have a Pigeon IMU because I really don’t see how it can do curves with just mere encoder values.
Here is the motion profile reference manual from CTRE’s website.
I suggest you read through how the motion profile functions, specifically section 3.4 where it describes the inner and outer loops and the trajectory points, including heading.
Keep in mind that if you drive forward the correct amount with one side of the drive train, your robot will turn 90 degrees eventually. So in a perfect world with no wheel scrub you don’t need any angular feedback to run motion profiling.
If you do want angular control, then you can use motionprofilingarc and utilize the auxilary PID where the arc is the “outside” loop and the motion profile is the “inside” loop. Look at the 9.10.1 function diagram on page 83 to understand how the PID loops interact.
It’s very similar to how teams have done auto in the past. The first loop sets the motor values to get distance/speed, and the second one modifies the initial values to correct for angular errors.