Moving the robot

In the previous exercice we were drawing the outline of the robot based on the pair [math](A, \theta)[/math]. Now we are going to build a a simple script to animate the robot. The robot uses differential steering, which means the left motor runs at speed [math]v_0[/math] and the right motor at speed [math]v_1[/math]. From this we can calculate the forward speed [math]v_f=\frac{v_1+v_0}2[/math] and also the differential speed [math]v_d=\frac{v_1-v_0}2[/math] In order to animate the robot we add 3 buttons: - [b]Reset[/b], which sets [math]A=(0,0)[/math] and [math]\theta=0[/math] - [b]Start[/b], which starts the animation (StartAnimation[true]) - [b]Stop[/b], which stops the animation (StartAnimation[false]) We also add an animation script to the (invisible) time slider: A=A+v*v_f*dt θ=θ+ω dt Set two motor speeds [math](v_0, v_1)[/math] and press the [b]Start[/b] button. Observe the trajectory of the two wheels.

Try to create your own robot animation. Add buttons to turn left/right and other buttons to accelerate/decelerate.