Make 2019 target selector

Selects targets based on which direction the robot is moving and which
target is largest in the view of the robot, using some virtual cameras
that have 180 degree fields of view to identify targets (the 180 is a
tunable number that represents how wide we want the net we cast for
targets to be--it could be smaller if we want the driver to line
themselves up more, or bigger if we wanted to be able to turn more than
90 degrees to reach a target).

Also, lowered the degree of line following polynomial because the 4th
degree polynomial was being somewhat unstable for the 2019 drivetrain
config.

Change-Id: Idea8cd7c91c706362843a3aacc9c4aafe1490442
diff --git a/y2019/control_loops/drivetrain/BUILD b/y2019/control_loops/drivetrain/BUILD
index de52215..5a4dd40 100644
--- a/y2019/control_loops/drivetrain/BUILD
+++ b/y2019/control_loops/drivetrain/BUILD
@@ -121,12 +121,34 @@
 )
 
 cc_library(
+    name = "target_selector",
+    srcs = ["target_selector.cc"],
+    hdrs = ["target_selector.h"],
+    deps = [
+        ":camera",
+        "//frc971/control_loops:pose",
+        "//frc971/control_loops/drivetrain:localizer",
+        "//y2019:constants",
+    ],
+)
+
+cc_test(
+    name = "target_selector_test",
+    srcs = ["target_selector_test.cc"],
+    deps = [
+        ":target_selector",
+        "//aos/testing:googletest",
+    ],
+)
+
+cc_library(
     name = "event_loop_localizer",
     srcs = ["event_loop_localizer.cc"],
     hdrs = ["event_loop_localizer.h"],
     deps = [
         ":camera_queue",
         ":localizer",
+        ":target_selector",
         "//frc971/control_loops/drivetrain:localizer",
         "//y2019:constants",
     ],