I’m trying to get an accurate turning method in auton, and I thought the Inertial Sensor would be the way to do that. I created a program to turn the robot to the left, but the issue is that the turning varies wildly from run to run and the angles are just not precise.
Here is a list of the issue:
-
Sensor does not read rotation correctly (a full 360 turn only requires 305 degrees in the code). A lot of the turns are completely wrong for the angles required. For example, I have a 135 degree turn in the pic below but only have 80 degrees set as the turn. However, this consistently puts me in the same spot.
-
Margin of error extremely high (99 degrees will put me on the left of a tower while 99.1 will put me to the right of a tower consistently)
-
Will attempt to error correct when over-shooting but only occasionally (sporadically)
-
The brain shows the heading as the correct absolute angle but when I attempt to print out the heading value to terminal, the angle is completely incorrect (registers as 0 degrees initially no matter where you’re facing)
I don’t know why these things happen, but I’ve heard only good things from other teams so I figure it must be my code. We have the sensor wired up and attached the way the vex-site recommends, so I don’t think it’s a build issue.