made the wrist stiffer
diff --git a/frc971/control_loops/python/control_loop.py b/frc971/control_loops/python/control_loop.py
index 6704526..c5316e7 100644
--- a/frc971/control_loops/python/control_loop.py
+++ b/frc971/control_loops/python/control_loop.py
@@ -83,13 +83,15 @@
ans = [" Eigen::Matrix<double, %d, %d> %s;\n" % (
matrix.shape[0], matrix.shape[1], matrix_name)]
first = True
- for element in numpy.nditer(matrix, order='C'):
- if first:
- ans.append(" %s << " % matrix_name)
- first = False
- else:
- ans.append(", ")
- ans.append(str(element))
+ for x in xrange(matrix.shape[0]):
+ for y in xrange(matrix.shape[1]):
+ element = matrix[x, y]
+ if first:
+ ans.append(" %s << " % matrix_name)
+ first = False
+ else:
+ ans.append(", ")
+ ans.append(str(element))
ans.append(";\n")
return "".join(ans)
diff --git a/frc971/control_loops/python/wrist.py b/frc971/control_loops/python/wrist.py
index 498a485..6fc9c27 100755
--- a/frc971/control_loops/python/wrist.py
+++ b/frc971/control_loops/python/wrist.py
@@ -19,7 +19,7 @@
# Moment of inertia of the wrist in kg m^2
# TODO(aschuh): Measure this in reality. It doesn't seem high enough.
# James measured 0.51, but that can't be right given what I am seeing.
- self.J = 1.51
+ self.J = 2.0
# Resistance of the motor
self.R = 12.0 / self.stall_current + 0.024 + .003
# Motor velocity constant
@@ -45,7 +45,7 @@
self.ContinuousToDiscrete(self.A_continuous, self.B_continuous,
self.dt, self.C)
- self.PlaceControllerPoles([.84, .84])
+ self.PlaceControllerPoles([.72, .72])
print self.K