Maneuvers#

Virtual lane following#

Some maneuvers were completely executed using virtual lane following (not sure if this is the best term). This was achieved by virtually tracing the path that the car has to take between two points, using hermite curves or straight lines.

These were the steps followed:

  1. Take the current position and orientation of the car and trace a line starting in its center following its orientation vector.

  2. From that line, take the point (P1) that is at a distance d from the car (this can be seen as the “lookahead” of the car, how much in the future it is thinking).

  3. Take the projection point (P2) of point P1 on the current planed trajectory (either a hermite curve or a straight line).

  4. The distance between these two points is considered the error (e) for the steering. The planned trajectory is working as the center of a virtual lane (as can be remembered from the lane detection algorithm).

_images/virtual_lane_following.jpg

Intersection Navigation#

For the intersection navigation we relied mostly on the GPS information and the virtual lane following described above. The trajectory of the car was obtained by tracing a hermite curve from the initial to the final trajectory point.

This happens when the car is in the intersection navigation state. The car switches to this state from the lane following state once it has detected a horizontal lane marking and is ready to initiate intersection navigation maneuver (e.g. after stopping for the stop sign if it is present).

The car returns to the lane following state once it has reached the final intersection point.

We weren’t able to successfully execute intersection navigation in the competition track due to some undiscovered problem with GPS / IMU calibration.

Parking#

For parking we followed a similar strategy to the intersection navigation. However, here the trajectory definition is harder.

We chose to do perpendicular parking and we implemented the trajectory with a state machine. Each trajectory part is a machine state and each trajectory discontinuity point is a state machine transition event. Once the car reaches a discontinuity point it advances in the trajectory state. This maneuver also required a part of the trajectory to be made in reverse (the orientation vector used for the virtual lane following is rotated 180º).

_images/parking.jpg

Overcoming#

After detecting a car and reaching a certain distance from it, we simply execute a left turn to change lanes, go along the left lane for a certain period of time, and after do a right turn to move to the right lane. The timing and angle of these turns were a bit hard coded because our more dynamic strategy didn’t achieve the best results in the real tracks and we didn’t have the time to improve it.

Using our first strategy, we turned left and only stopped turning once the car detected the left lane in front. Then, we would only return to the right lane once the side distance sensor stopped detecting the car that it was overcoming.