MoveDifferential: use gyro support for better accuracy
odometry support went in via #235 but the initial commit did not include gyro support
@WasabiFan in a nutshell do you just use the gryo angle instead of calculating the angle based on the wheel movements?
ok I watched enough builderdude35 videos on Youtube last night that I think I have my head wrapped around what to do with the gyro in terms of odometry. I think my gryo is busted though, I do things like use MoveDifferential turn_to_angle to turn 90 degrees and the robot looks like it turned exactly 90 degrees but the gyro says it turned 50 degrees.
The way I would imagine implementing it is to throw the gyro and wheel odometry angle measurements into a Kalman filter (to smooth out the gyro data, primarily) then use the output measurement for calculations. That being said, the noise of the gyro probably isn't huge and both of our measurements are continuously integrated rather than individually sampled, so a Kalman filter might be overkill.
What was the approach you saw?
For rotating in place it just used move steering to start rotating and then stopped when the gyro got to the desired angle. They had to underestimate though (aim for 80 degrees to end up turning the desired 90 degrees) so it wasnt crazy impressive. What we have right now (without a gyro) is actually pretty good. I can tell it to torn 90 and it will sometimes hit it dead on but others it will only be off by a degree or two.
For driving forward in a straight line they used a PID controller to adjust motors to keep the gyro at the original angle. This all looked very cool to me and worked really well in the video. He would have the robot driving straight and then would nudge it with his hand and the robot would straighten itself out
Having lots of gyro issues right now, filed https://github.com/ev3dev/ev3dev/issues/1262
Also hitting https://github.com/ev3dev/ev3dev/issues/1269
We reverted the commit so am re-opening this one