Hey,
What is the “motion magic arc” control mode of the Talon SRX? We see there’s an option for it in the Java files, but cannot find any mention of it in the software manual. What is that control mode, and how should we use it?
Thanks!
See Section 10.7
Our team used this mode to drive specific distances in autonomous and also to control our elevator by having it go to specific heights.
Did you use Motion Magic Arc or just Motion Magic?
I guess it would be just Motion Magic and not the “Arc”. My bad.
Here is the CTRE example.
From my understanding of the mode, it adds the heading on top of the distance. This means you can add a gyro into the mix and you can use it to keep the robot straight. You can also use it to drive in a curve and have the robot stop the profile at a different heading.
It looks like the Pigeon from CTRE must be used, which we do not have. Thanks!
FWIW, Motion Profile Arc (MPA) is very difficult to use compared to regular Motion Profile. Regular MP is easy to use, but I would recommend a RIO-side solution for MPA.
Seconding this. The API for Motion Profile Arc is very clunky, because it is not a natural thing to handle on the motor controllers - drive angle controllers by nature need to coordinate multiple controllers doing different things simultaneously, and CTRE gets around this in a very ugly manner by essentially duplicating the angle controller on each side of the drive.
Not really sure what you mean by this. It runs a cascaded loop on the one controller that slaves values to the other controller.
I do however agree that the API is very rough. Team 319 has written some wrappers that really clean it up.
It does? I was under the impression that you had to set it up simultaneously on each side of the drive, with the polarity inverted, like with how the “secondary PID” is implemented for gyro stabilization during teleop driving. Slaving the other side of the drive seems even worse - do you really want to be moving your motor controllers in and out of slave mode?
Either way, it’s a rough API because it’s a rough problem-space because it’s highly un-natural to run the loop on the motor controllers in the first place.
It’s actually even worse because you can’t do a different feedforward for the left and right sides’ velocity, they have to have the same velocity feedforward effectively. It makes MPA very sketchy when moving at higher speeds.
Basically, if you want to make a turn to one side in the middle of the path, you just pretend that the center of the robot is moving at constant velocity and let the angular control loop try and overcome the angle error on its own, with no feedforward for left and right.
Oof.