We can just do basic motion
profiling, but we want arbitrary constraints!
Constraints convert trajectory
"states" to min/max velocity and acceleration.
E.g. limit velocity within a region;
limit control effort (voltage).
Let's try limiting in a region of the field.
We want to find the maximum admissible velocity for each trajectory state.
Forwards pass. Set the velocity of each state to $min(v_{user max}, v_{accel max}, v_{constraint max})$.
Forwards pass has computed all accels between states, but some of them are larger than our max accel.
We do a backwards pass that uses all computed accels and max accels to compute acceptable new max velocities.
Then we use $a$, $s$, and $v$ to compute $t$ for all states. We now have a complete time-parameterized velocity profile!