You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MoveDifferential: use gyro support for better accuracy #620
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.
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
changed the title [-]MoveDifferential Odometry: add gyro support for better accuracy[/-][+]MoveDifferential: use gyro support for better accuracy[/+]on Jan 4, 2020
Activity
dwalton76 commentedon Apr 18, 2019
@WasabiFan in a nutshell do you just use the gryo angle instead of calculating the angle based on the wheel movements?
dwalton76 commentedon Apr 21, 2019
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.
WasabiFan commentedon Apr 21, 2019
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?
dwalton76 commentedon Apr 21, 2019
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.
dwalton76 commentedon Apr 21, 2019
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
dwalton76 commentedon Apr 21, 2019
Having lots of gyro issues right now, filed ev3dev/ev3dev#1262
dwalton76 commentedon Apr 26, 2019
Also hitting ev3dev/ev3dev#1269
[-]MoveDifferential Odometry: add gyro support for better accuracy[/-][+]MoveDifferential: use gyro support for better accuracy[/+]dwalton76 commentedon Jan 17, 2020
We reverted the commit so am re-opening this one