Hey all, I am having an issue when attempting to use yagsl. When trying to drive, when trying to change direction, going from field oriented straight to field oriented left for example, I am having an issue where some of the wheels do not do anything. it is inconsistent on which wheels do it and how many. When I look at the swerve visualizer on elastic, those wheels dont have targets positions or speeds. I am able to run the modules on legacy code, not using yagsl. Right now I am just using the example code given on the library docs. here is the
git repo: GitHub - FRCTEAM2064/Robot2024 at Dev
if anyone has any info/references/ideas or needs more info to help let me know!
I will later today, @Technologyman00s solution of the offsets helped, I had misunderstood offsets to be raw data rather than angles. Adjusting the pid has helped lower the amount of times that the wheels just aren’t assigned a position but it will still occasionally happen.
Sorry for delayed response, my team had week 1 and 2 competitions and it was pretty hectic.
We figured out it was unrelated to YAGSL, which makes sense, so that was good
The more frustrating news is that we still don’t entirely know the cause. The issue is something when calling setreference() on a sparkmax. When I originally made the issue we were only testing the drive base. We used the sparkmax pid to control our intake position as well as our shooter angle. We started experiencing an issue where we would set the reference but the motor just wouldn’t move. If we jostled it then it would start moving again. When looking at rev hardware client, we can see that spark is pulling from the pdh, but its never sending any voltage to the motor. The first thought is that it would be a bad spark, but we moved that specific spark to different locations on the robot that use the ‘setreference’ and it had no problems.