Lab 8: Stunts
In this lab I set out to achieve Task A. To peform Task A the robot needs to drive towards the wall, execute a flip when it is on the black pad, and then drive back past the starting line. To achieve this I modified the code I had written for Lab 7. The only addition was a piece of code that caused the robot to flip when it got close enough and drive backwards. In my testing, I found that to have the robot stop on the black pad it needed to execute the stop at around 900 mm away from the wall.
Trial 1
Something to note here, as you can see the distance graph stops at 900 mm. This is because in the above code the sensor collection stops once the robot reaches the stopping distance to the wall and then it just executes the flip. If sensor collection was occuring the robot would sense 4000 mm because there are no obstacles in front of it. Additionally the motor input after the stopping distance is the motor inputs used in the commands.
Trial 2
Trial 3