Absolute Encoder Value for Rev Throughbore doesn't update on the SmartDashboard
Technologyman00 opened this issue · 22 comments
It could be related to the other issue regarding Through bore IDs but on the smart dashboard the through bore encoders just jitter around, but dont respond to any change in the wheel's rotation.
This could be because i recently added a conversion factor and ThroughBores's conversion factors I assumed was 1. Does the value show as -1 to 1 in shuffleboard or Glass?
Try changing this 1 to a 2048 then.
Also be sure to use attached
not throughbore since it is attached to the SparkMax and throughbores can be connected via pwm
So after playing around with it for awhile, attached does the trick, but it also requires that the gear ratio for angle is 1:1 for it to make sense. Maybe I dont understand what that is for.
Unrelated, but the wheels and motors just spin wildly with no joystick input
You probably need to invert it.
It needs to be 1:1 because the through bore already scales correctly when attached to the SparkMAX, i will add this to the documentation now that you point it out!
You probably need to invert it.
they were inverted, now I uninverted them. Same issue
You probably need to invert it.
they were inverted, now I uninverted them. Same issue
I am unsure then, can you post a video of frc-web-dashboard
with a swerve drive widget? It may display your issue more clearly. The algorithms from the configs are translated from every other swerve drive program from FRC. It is unlikely they are wrong but i would encourage you to double check if you feel they are.
Sorry for not posting a link earlier, here is the dashboard i like to use.
https://youtu.be/0Cs7NzRXHhA That is quite representative of what is happening in person
To follow up I thought it could be that the PID loop is overshooting, which is likely, but it looks like the PID constants aren't applied to all sparkmaxes
One of the modules functions perfectly the other 3 do not
Paging through the REV hardware client, the settings of the working Sparkmax is slightly different than the others. Does the PID Loop run on the sparkmax or the Rio?
The PID loop runs on the SparkMAX.
Thank you, I was able to get 3 of them working but one still isnt working properly, I will investigate a hardware issue.
I am glad that you're making progress! Just to let you know if the SparkMAX's repititively dont configure it may be because of this issue BroncBotz3481/YAGSL-Example#59 which i havent addressed yet because of the time commitment to build an elegant solution i talked about on the main thread here https://www.chiefdelphi.com/t/yet-another-generic-swerve-library-yagsl-beta/425148/329?u=nstrike
(Really it should be fixed by REV via a RevLib update, but probably wont be)
Ok this might be a rev library thing, but if the number is ~40 or greater the turn motor at least spins wildly. I changed only the ID in both the JSON and Rev Hardware Client and it goes from broken to fixed.
So now just sitting idle when enabled works, but any controller input has it act wildly. Any reason for that?
🥴 I have no idea why that happened but will be adding this to the FAQ's because of the obscurity, thank you for finding that!
I have seen that before, it could be encoder conversions or inversion (sorry thats the most common mistake so i cant weed it out), i sughest you set it to an insanely high value which would slow it down and you can see if its going the right direction.
🥴 I have no idea why that happened but will be adding this to the FAQ's because of the obscurity, thank you for finding that!
Also BTW just to check 33 works fine, so its not a bit conversion issue.
Closing since issue appears to be fixed, added statement to FAQ. Thanks for contributing!