Embedded Motion Control 2017 Group 3 / Corridor Challenge
This page is part of the Embedded Motion Control Group 3 of 2017.
This page is about the design made from the initial design up to the moment of the the Corridor Challenge. For this challenge is PICO should drive itself through a corridor which is constructed with parallel walls, detect the first exit and take a turn. First the design steps are described, followed by notable algorithms used and their software implementation and concluding with the functioning of the code in the simulation. In figure 1, a typical corridor used in the Corridor Challenge is visible, however, the opening could also be at the left side.
Motion Algorithm
From the requirements we designed we wanted PICO to never hit any walls, but also prevent PICO from going into deadlocks. With this decision we excluded the use of the potential field, where the walls give a distance dependent rejecting force towards PICO. Although this can be a very robust way to avoid walls, it could potentially create a lot of deadlocks problems (mostly for the maze). Instead we used a PID controller to keep PICO always in the middle of a corridor, we used sections of filtered (averaged) data from the LRF (as shown in Figure 2) as input for the PID controller.
This PID controller only operates in the part of the corridor where there are walls on both sides, when PICO detects an open space on one of the sides the PID is be turned off and he would turn 90 degrees (left or right) based on the odometry data. After turning, PICO would attempt to find the two corner points of the new corridor (blue dots in Figure 3) and move to match the lengths of the pink and red line. Once PICO was in the middle of the new corridor it would move forward and turn the original PID on again.
Simulation of the corridor challenge
Initial Alignment
We had created an algorithm that would align PICO to the walls at stratup, but after learning that pico would start in an already parallel position, we disabled the code because it was unnecessary. A video of the simulation of this function is shown below, the code for angle calculation can be found here [1]