Tuesday, May 19, 2009

Bypass Edge using Path Executer

After some work on a path execture we tested it today with some arrays. The concept of the path executer is that it can perform an pre-described motion using an array in counts. For example you have { {-10,500}, {0,300}, {30, -200} }, then the rover will first steer to minus 10 en drive 500 counts, then it will set its steer straight en drive again. Using this, different function can use the same basic moves. While driving forward it checks for edges, if an edge is encountered it will return the position of the array to the level-up function so it can decide how to react. In this way we know exactly what distance was driven. The path executer also has the ability to reverse a whole path or just a part of the path so we can reverse the driven distance. In the video below an action is shown. The rover detects an edge and reverses, then it performs a (first untuned version) S-Corner to bypass it. This also indicates that the rover reacts on the slave brick, which sends the edge to the master, which determines what is going to happen.