State estimation · University · about 45 min
Reach a target the robot cannot see, using nothing but the filter you wrote.
[1 mark]The robot has moved sideways to x = 30 cm at y = 60 cm, and tag 9 is at (0, 155), straight up the mat from the start. The code treats the tag's range as if it were the y distance. What does it print?
import math x, y = 30.0, 60.0 TAG_Y = 155.0 rng = math.hypot(0 - x, TAG_Y - y) y_from_fix = TAG_Y - rng print(round(rng, 1), round(y_from_fix, 1), round(y - y_from_fix, 1))
[1 mark]How does the lesson suggest avoiding that trap?
[1 mark]After a missed run, a plot shows the estimate tracked the truth closely, yet the robot still missed the target. Where is the fault?
[1 mark]The controller uses speed = min(13.0, 0.6 * gap). What speed, in cm/s, does it ask for when the gap is 10 cm?
[1 mark]The prediction step uses the heading h + 0.5 * rate * DT to rotate the flow into the world frame. Why the half step?
[1 mark]Put the parts of the navigation program in the order the lesson lists them.
Number the lines 1 to 4 to put them in the right order.
Plot, to tell estimator faults from controller faultsCalibrate the gyroSteer by the estimate through the inverse kinematicsRun a filter every tick, predicting with flow and correcting from tag 9Reach the green target, which is 105 across and 105 up from the start, using only your own estimate. Print my x: and my y: at the end, within 12 cm of the truth. position() is not allowed anywhere.
from bugbot import * import math connect() DT = 0.1 TX, TY = 105.0, 105.0
Plan your program here, then type it in and press Run.
odometry() together. Is your filter beating the built-in dead reckoning?