Following a trajectory · University · about 30 min
The trapezoid, the triangle when there is no room to reach cruise, and what jerk costs you.
[1 mark]A trapezoidal move covers 80 cm with an acceleration limit of 10 cm/s/s and a cruise speed of 15 cm/s. How long is the cruise (flat top) phase, in seconds to 2 decimal places?
[1 mark]What does this print? It works out the whole duration of the same profile.
D, A, V = 80.0, 10.0, 15.0 t_acc = V / A d_acc = V * V / (2 * A) t_flat = (D - 2 * d_acc) / V print(round(2 * t_acc + t_flat, 2))
[1 mark]The same limits (10 cm/s/s, 15 cm/s) are used for an 8 cm move. What peak speed does the profile reach, in cm/s to 2 decimal places?
[1 mark]A trapezoid generator works on long moves, but every short move overshoots. What is the most likely bug?
[1 mark]The BugBot's drive is a first order lag with a time constant of 0.25 s. Roughly what initial acceleration does a step command to 20 cm/s produce, in cm/s/s?
[1 mark]The drive has no acceleration limit of its own. Which are good reasons to impose one anyway?
Tick every answer that is true.
[1 mark]A robot arm rings for a moment at the start and end of every trapezoidal move. What change addresses the cause?
Build a trapezoidal profile that covers 80 cm with an acceleration limit of 10 cm/s/s and a cruise speed of 15 cm/s, sampled every 0.05 s. Plot v and s at every sample, with a wait(0.1) after every second one so the chart has a time axis (the simulator runs in 0.02 s steps, so a wait(0.05) would last 0.04 s), and print peak:, duration: and distance:, the last being the area under your own speed profile.
from bugbot import * connect() DISTANCE, A_MAX, V_MAX, DT = 80.0, 10.0, 15.0, 0.05
Plan your program here, then type it in and press Run.
sqrt(a * d)?