Merge "Update aos_config on the roboRIO for y2023"
diff --git a/y2023/control_loops/python/graph_tools.py b/y2023/control_loops/python/graph_tools.py
index 7614390..cf4fd7b 100644
--- a/y2023/control_loops/python/graph_tools.py
+++ b/y2023/control_loops/python/graph_tools.py
@@ -202,16 +202,19 @@
UPPER_PROXIMAL_LIMIT = np.pi * 1.5
LOWER_PROXIMAL_LIMIT = -np.pi
+UPPER_DISTAL_LIMIT = 0.75 * np.pi
+LOWER_DISTAL_LIMIT = -0.75 * np.pi
+
UPPER_ROLL_JOINT_LIMIT = 0.75 * np.pi
LOWER_ROLL_JOINT_LIMIT = -0.75 * np.pi
def arm_past_limit(theta1, theta2, theta3):
delta = theta2 - theta1
- return (delta > UPPER_DELTA_LIMIT or delta < LOWER_DELTA_LIMIT) or (
- theta3 > UPPER_ROLL_JOINT_LIMIT or
- theta3 < LOWER_ROLL_JOINT_LIMIT) or (theta1 > UPPER_PROXIMAL_LIMIT
- or theta1 < LOWER_PROXIMAL_LIMIT)
+ return delta > UPPER_DELTA_LIMIT or delta < LOWER_DELTA_LIMIT or \
+ theta1 > UPPER_PROXIMAL_LIMIT or theta1 < LOWER_PROXIMAL_LIMIT or \
+ theta2 > UPPER_DISTAL_LIMIT or theta2 < LOWER_DISTAL_LIMIT or \
+ theta3 > UPPER_ROLL_JOINT_LIMIT or theta3 < LOWER_ROLL_JOINT_LIMIT
def get_circular_index(theta):
diff --git a/y2023/control_loops/superstructure/arm/arm_constants.h b/y2023/control_loops/superstructure/arm/arm_constants.h
index 39e146f..6151027 100644
--- a/y2023/control_loops/superstructure/arm/arm_constants.h
+++ b/y2023/control_loops/superstructure/arm/arm_constants.h
@@ -17,16 +17,16 @@
.l0 = 20 * 0.0254,
.l1 = 38 * 0.0254,
- .m0 = 9.34 / 2.2,
- .m1 = 9.77 / 2.2,
+ .m0 = 4.5 / 2.2,
+ .m1 = 15.5 / 2.2,
// Moment of inertia of the joints in kg m^2
- .j0 = 2957.05 * 0.0002932545454545454,
- .j1 = 2824.70 * 0.0002932545454545454,
+ .j0 = 0.092,
+ .j1 = 1.6,
// Radius of the center of mass of the joints in meters.
- .r0 = 21.64 * 0.0254,
- .r1 = 26.70 * 0.0254,
+ .r0 = 4.5 * 0.0254,
+ .r1 = 20 * 0.0254,
// Gear ratios for the two joints.
.g0 = 55.0,