Our team is trying to follow Trajectory using Ramsete Controller and we came across some problems. First of all, even if PID values are 0, robot can follows trajectory. Should it work like that? And second of all, when our robot is turning/rotating right and left, motors oscillate (they turn on and off alternately). Here is graph of our motors’ speeds:
If you are following the WPI tutorial, and you used the robot characterization, your robot should be able to follow paths purely on feed forward alone. PID values are for making sure it reaches exactly the correct speed if FF is not accurate enough. Not sure why it is oscillating though, is it possible for you to post your code?
I’m not sure about others, but personally it isn’t very helpful having to manually download your code to help you debug. In the future, you might want to create a repository on github, or just paste your code with formatting in CD.
As far as your motor oscillation goes, make sure you’ve followed this wpilib guide on troubleshooting trajectory following and can verify all of the steps included.
You were right with these PIDs. Thank you so much? Can this oscillating happen because FF is too big?
@Quake sorry for this mediafire solution. Here is repository: https://github.com/fszewczyk/ramsete-trouble/tree/auto/
@fszewczyk, it might be because of FF being to high, but the numbers looked reasonable so I’m not sure.
I think the code looks fine, so the first thing I would do is check all the conversions and then check the numbers you entered when you were running robot characterization.
If all of those are fine, try graphing the set point and the speed like they recommend in the auto troubleshooting guide. I would also graph the angle the gyro sees and if it oscillates like crazy you have a problem there as well.
When you had it drive a straight path, did it move the correct distance?
Thank you guys for help! It started working. It turned out that our gyro is reversed. Now it works completely fine. Such a stupid mistake haha! Thank you <3
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.