Hey,
Could someone explain how to use MotionMagic?
Best Regards
Shadi #7079
Once you’re done with PIDF tuning (most of the work), you can just use the set command with the MotionMagic control mode, and it’ll generate the motion profile on the fly. However, as @Peter_Johnson said, you should follow the process in the CTRE documentation to set it up.
how would i make a motion magic not decelerate at the end but accelerate or decelerate to do a curve
Best Regards
Shadi #7079
Motion Magic always does a trapezoidal profile. If you want to do something different than that, you need to use Motion Profile control mode. See https://phoenix-documentation.readthedocs.io/en/latest/ch16_ClosedLoop.html#motion-magic-control-mode
Also, if you just want to get to a selected position, you could use the Position control mode, which uses closed-loop PID.
what i mean is making the robot do a curve ( or a curving turn ) around an object
like cheesy poofs did.
Best Regards
Shadi #7079
That is full motion profiling. You can find their code here. https://github.com/Team254/FRC-2018-Public