Hey! Our robot’s arm won’t stop at the setpoints we set. this is our code: GitHub - karyabsrnr/arm24
any help is appreciated
Hey! Our robot’s arm won’t stop at the setpoints we set. this is our code: GitHub - karyabsrnr/arm24
any help is appreciated
What is/are the relevant file(s) for it?
Nevermind, found it. Unfortunately I can’t help though.
Wdym by won’t stop at the setpoint? It falls because of gravity?
If so (and anyways), I advise having some sort of kG value that’ll keep your arm in place. The kG (or feedforward) output should be cos(angle) * kG
You can calculate kG using sysid or manually, and apply it doing something like:
double kgOutput = Math.cos(setpoint.position);
m_spark.set(kgOutput + output);
Just make sure you’re inputting radians into Math.cos
I advise you look into the ArmFeedforward class to calculate the other ff outputs
not because of gravity, it just won’t stop unless we disable it , it keeps on turning
Oh, that’s probably because you didn’t implement getMeasurement()
You should return the encoder’s position there
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.