Fixed DoCoerceGoal compiler error in y2014 claw
Change-Id: If90d27777b270e6d49d386880c4eae3a9c7e5a9c
diff --git a/y2014/control_loops/claw/claw.cc b/y2014/control_loops/claw/claw.cc
index 4f71410..9320e6b 100644
--- a/y2014/control_loops/claw/claw.cc
+++ b/y2014/control_loops/claw/claw.cc
@@ -123,6 +123,8 @@
const Eigen::Matrix<double, 4, 1> pos_poly_k =
poly.k() - poly.H() * velocity_K * velocity_error;
const ::aos::controls::HPolytope<2> pos_poly(pos_poly_H, pos_poly_k);
+ const ::aos::controls::HVPolytope<2, 4, 4> hv_pos_poly(
+ pos_poly_H, pos_poly_k, pos_poly.Vertices());
Eigen::Matrix<double, 2, 1> adjusted_pos_error;
{
@@ -163,9 +165,9 @@
bool is_inside_h;
const auto adjusted_pos_error_h =
- DoCoerceGoal(pos_poly, LH, wh, position_error, &is_inside_h);
+ DoCoerceGoal(hv_pos_poly, LH, wh, position_error, &is_inside_h);
const auto adjusted_pos_error_45 =
- DoCoerceGoal(pos_poly, L45, w45, intersection, nullptr);
+ DoCoerceGoal(hv_pos_poly, L45, w45, intersection, nullptr);
if (pos_poly.IsInside(intersection)) {
adjusted_pos_error = adjusted_pos_error_h;
} else {