The robot as a system · University · about 25 min
position() is the lab's overhead camera. odometry() is what the robot has, and it drifts.
[1 mark]Why is using position() as the input to a controller treated as cheating?
[1 mark]A gyro reads 0.4 degrees per second too high. Integrated for 90 seconds, how many degrees of heading error does that bias alone produce?
[1 mark]How do the two kinds of sensor error grow when dead reckoning integrates them?
[1 mark]Driving a square, the heading error gets a little bigger at every corner. Why does that matter more than a position error of the same size?
[1 mark]Driving the same square with set_noise(0), odometry() and position() agree exactly, yet the robot still has not come back to where it started. What does that show?
[1 mark]At the end of a run, odometry() gives (12.0, 118.5) and position() gives (15.0, 114.5). What does this print?
import math
ox, oy = 12.0, 118.5
tx, ty = 15.0, 114.5
print("error:", round(math.hypot(ox - tx, oy - ty), 1))Drive at least 120 cm, with at least one turn in it. At the end, print how far odometry() is from position(), as error: 4.3.
from bugbot import * connect() forward(70, distance=50)
Plan your program here, then type it in and press Run.
set_noise(0), set_noise(1) and set_noise(3). Tabulate the error.