TALON SRX built-in PID controller with Navx as a feedback device?


#1

Do you guys know if it is possible to use the navx with the talon srx built in pid?

Thank you.


#2

I don’t believe so in the sense of plugging a NavX into the TalonSRX to run a PID system, but one thing that is possible and has been done many times before is using heading/yaw data from the NavX to turn the robot, but this requires a bit of code and is not a “built in” functionality. Hope this helps!!


#3

I did not mean to plug the navx directly into the talon. I mean to use the data sent by the navx like the yaw angle as the control feedback for the talon built-in pid. I guess it’s not possible.


#4

In most cases, full PID control won’t be necessary and P alone is enough. You can write your own P controller quickly and easily:

yawError = targetYaw - gyro.getAngle();
yaw = kP * yawError

The yawError is the difference between the set point (targetYaw) and the current position. Then multiply the error by the proportional gain (kP) to get the controller output, yaw.


#5

Unfortunately I do not think it is possible. Perhaps you can use the MotionProfileArc control mode with the CTRE Pigeon IMU.


#6

huuh ok. I wanted to use the magic motion feature of the talon, I guess I would have to implement my own. Thank You though!