It’s possible to use PathWeaver using a grayhill encoder that uses the Encoder class? I only saw examples that uses the CANSparkMax that has the encoder embed in it
PathWeaver is an app to create paths. Did you mean path following? You can do path following with any motors and encoders.
What I mean is that to be able to use PathWeaver I need to give the motors speeds and in the examples that I saw, they get from the encoder with the method getVelocity() that returns the rpm, but the class encoder only have the method getRate() that return the cpr
First of all, getRate()
returns the velocity (assuming you set unit conversions correctly - the same as the SparkMax API). See this.
Did you look at the docs? The trajectory tutorial (on frc-docs) uses the Encoder
class, all other examples are (or should be) adapted from that example.
thanks!!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.