Using NavX Gyro for TalonSRX Closed-loop Motion Profiling

Hello everyone,

So I am trying to implement a motion profiling control similar to this, but we use NavX instead of CTRE Pigeon. I saw that on this post, @kylelanman suggested sending gyro orientation data to Talon SRX. Does anyone have an idea how can this be achieved? I saw the FRCNetCommCANSessionMuxSendMessage​(int messageID, byte[] data, int periodMs) method on this WPILIB documentation page, but in what format Talon SRX expects to receive gyro data? Should I try emulating a Pigeon? I would appreciate any type of help. Thanks!

The Talon SRX supports a software emulated sensor.

1 Like


Take a look at the remote sensor option. I have heard that the NavX treats negative degrees differently than the Pigeon, so take a look at that.

If you want to use ctre’s motion profiling arc (Motion Profiling with a gyro) I would 100% recommend ditching your navx and switching for a pigeon. As stated above the navx does not treat degrees in the same manor as the pigeon does. The navx has more of a field orientation for lack of better words so if you turn your robot 30 degrees to the left the navx would say 330 and the pigeon would say -30. If you turn it 30 degree to the right (from the zero point) the navx would say 30 and the pigeon would say 30 as well. If you turn your robot around 360 degrees 3 times a pigeon would say 1080 degrees while a navx would say 0. If you were to zero both out and turn your robot back 3 turns the pigeon would say -1080 while your navx would again say 0. Even if you were able to convert the navx to emulate the pigeon there is not “good” way of sending the data to the talon and if there was you would experience a sort of “lag”. In reference the other comment stated above about the software emulated sensor please refer to this.(HERE)

This is true if you use… actually this is not true at all. getYaw() returns values between -180 and 180.

If you care about continuity like you are describing, getAngle() solves that problem.

1 Like