We are trying to get the TurnToAngle commands from this example working. Our code. It is currently either oscillating (until it times out at 5 sec) or not turning depending on the value of P that is used.
I think one of the things we need here is a static offset to help with friction. This obviously has to help according to the direction so can’t just be a constant. I think adding an F term might do this but am not sure how I would add an F term here. I started a bit of code in TurnToAngle that would add this offset but couldn’t actually get it working.
I noticed that our gyro is going from 180 to -180. I thought the pigeon wrapped? It looks like this is using the 180/-180 what is the advantage of that? Seems to just add complication around the point it crosses over?
What is the advantage/disadvantage of TurnToAngleProfiled vs regular? I couldn’t find much documentation on how these worked / how to use them.
I could have tried adding a D term too but from what I have heard this should work with just P so I think something else is wrong.