Firstly we have read and gone through the CTRE documents for the TalonSRX and are still having issues. Specifically we are trying to set the position of an arm that is driven by a VexPro Versa Planetary gearbox into a CTRE Mag encoder with physical limit switches installed as well. Physically the system is working correctly with the limit switches stopping the arm correctly. According to the Web Dashboard, the motor and the sensor are in-phase and working correctly.
I know we are probably just missing some configuration setting for the TalonSRX, but we have spent multiple hours trying to check example code and going over documents but still canât get it right.
The issue is with the closedLoopError. If it shows up correctly (on the SmartDashboard) then the position control works correctly. However, many times the ClosedLoopError is not correct and actually is not changing like we would expect. It is almost random.
This is why I thought it was some kind of missing configuration variable.
Our code is freely available on https://github.com/Team997Coders/BunnyBotElmer and the specific code is in the ArmJoint Subsystem and ArmToAngle Command.
(I could have included the code, but this way I wonât forget something)
If anyone can help us figure out what is missing, we would appreciate it.
Thank You!
