**Path Control Competition**

At the beginning of the competition, two parameters, the longitudinal
distance (d) for a straight line segment, or the radius (R) and angle
of rotation (theta) for a curved segment will be provided (as seen in
the figure. the curve has theta=180 degrees). From this information,
the two velocity parameters (vlong,vtheta) can be computed. Your code
should be set up to handle the quick paramaterization of an
*n*-segment path (where *n* is no greater than 5).

At the beginning of the competition we will give you a path in a data structure of the form:

segment | type | p1 | p2 |
---|---|---|---|

1 | 0 | 10 | |

2 | 1 | 5 | -180 |

3 | 1 | 5 | 180 |

There are three segments in this path, where the "type" paramter is 0 if the segment is a straight line path. In that case there is only 1 paramater ("p1"), equal to "d" as in the figure. Type 0 segments are the curved segments with the first parameter "p1" equal to the radius "R", and the second parameter "p2" equal to the number of degrees to turn for. In the figure, all turns are for +/- 180 degrees. Note that the path laid out in the table will produce the one shown in figure (a). Figure (b) would look like:

segment | type | p1 | p2 |
---|---|---|---|

1 | 0 | 10 | |

2 | 1 | 5 | -180 |

3 | 0 | 10 |

and Figure (c) would look like:

segment | type | p1 | p2 |
---|---|---|---|

1 | 1 | 5 | -180 |

2 | 0 | 10 | |

3 | 1 | 5 | 180 |

Each robot will be given the chance to traverse each path 3-5 times, collecting mean and variance data as in the report, and the overall performance will be measured. There may be a trade off of speed and accuracy in your choice of velocity parameters. Both will be measured and compared in the final competition. We encourage you to try your best to beat the other team!