The robot as a system · University · about 45 min
Characterise the robot you were given and print the figures the rest of the course will use.
[1 mark]Put the steps of one data sheet experiment in order.
Number the lines 1 to 5 to put them in the right order.
Wait past the transient, about 3 tauStop, and let the robot settleTake several readings and average themStop, and let it settle again before the next experimentApply the input[1 mark]Why must the robot settle again after each experiment before the next one starts?
[1 mark]Why does each student measure their own data sheet rather than use a shared one?
[1 mark]These are the settled readings from two experiments: forward speed from flow() and turn rate from imu(). What does this print?
readings = [19.4, 18.9, 19.6, 19.1, 19.0]
rates = [-112.0, -115.5, -113.0, -114.5, -112.5]
v_max = sum(readings) / len(readings)
w_max = sum(rates) / len(rates)
print("v_max:", round(v_max, 1))
print("w_max:", round(abs(w_max), 1))[1 mark]A command is walked up in steps of 5, recording the settled flow() speed at each. Anything above 1 cm/s counts as moving. What does this print?
table = [(5, 0.0), (10, 0.1), (15, 2.4), (20, 3.6), (25, 4.9)]
for power, v in table:
if v > 1.0:
print("dead band:", power)
break[1 mark]The settled() helper waits 1.0 s after applying an input before reading. With a time constant of about 0.25 s, is that long enough?
Measure all four and print them, one per line, exactly like this: The whole run has ninety seconds, which is plenty for four experiments and nowhere near enough to be careless.
from bugbot import * connect() # measure, do not assume
Plan your program here, then type it in and press Run.
set_noise(3). Which figure survives the noise best, and which is worst? That ranking tells you which measurements to trust on a real robot.