@@ -45,22 +45,34 @@ struct RobotConstants
4545 // The angle between y-axis of the robot and the rear wheel axles [degrees]
4646 float back_wheel_angle_deg;
4747
48- // X position of centre of front wheel
49- float front_wheel_x_magnitude_meters ;
48+ // X position of centre of front right wheel
49+ float fr_x_pos_meters ;
5050
51- // Y position of centre of front wheel
52- float front_wheel_y_magnitude_meters ;
51+ // Y position of centre of front right wheel
52+ float fr_y_pos_meters ;
5353
54- // X position of centre of rear wheel
55- float back_wheel_x_magnitude_meters ;
54+ // X position of centre of front left wheel
55+ float fl_x_pos_meters ;
5656
57- // Y position of centre of rear wheel
58- float back_wheel_y_magnitude_meters ;
57+ // Y position of centre of front left wheel
58+ float fl_y_pos_meters ;
5959
60- // The total width of the entire flat face on the front of the robot [meters]
60+ // X position of centre of back left wheel
61+ float bl_x_pos_meters;
62+
63+ // Y position of centre of back left wheel
64+ float bl_y_pos_meters;
65+
66+ // X position of centre of back right wheel
67+ float br_x_pos_meters;
68+
69+ // Y position of centre of back right wheel
70+ float br_y_pos_meters;
71+
72+ // The total width of the entire flat face on the front of the robot [metres]
6173 float front_of_robot_width_meters;
6274
63- // The distance from one end of the dribbler to the other [meters ]
75+ // The distance from one end of the dribbler to the other [metres ]
6476 float dribbler_width_meters;
6577
6678 // Indefinite dribbler mode sets a speed that can be maintained indefinitely [rpm]
@@ -88,10 +100,12 @@ struct RobotConstants
88100 // The maximum angular acceleration achievable by our robots [rad/s^2]
89101 float robot_max_ang_acceleration_rad_per_s_2;
90102
91- // The radius of the wheel, in meters
103+ // The radius of the wheel, in metres
92104 float wheel_radius_meters;
93105
94- // Computed by finding sqrt(x^2 + y^2) of front and rear wheels. Both equal
106+ // Distance [metres] from centre of robot to centre of wheel.
107+ // Found by sqrt(x^2 + y^2) of a wheel.
108+ // Front wheel arm = Rear wheel arm. See ASCII image above.
95109 float expected_lever_arm;
96110};
97111
@@ -108,10 +122,14 @@ constexpr RobotConstants createRobotConstants()
108122 .front_wheel_angle_deg = 32 .0f ,
109123 .back_wheel_angle_deg = 44 .0f ,
110124
111- .front_wheel_x_magnitude_meters = 0 .03485f ,
112- .front_wheel_y_magnitude_meters = 0 .06632f ,
113- .back_wheel_x_magnitude_meters = 0 .04985f ,
114- .back_wheel_y_magnitude_meters = 0 .05592f ,
125+ .fr_x_pos_meters = 0 .03485f ,
126+ .fr_y_pos_meters = -0 .06632f ,
127+ .fl_x_pos_meters = 0 .03485f ,
128+ .fl_y_pos_meters = 0 .06632f ,
129+ .bl_x_pos_meters = -0 .04985f ,
130+ .bl_y_pos_meters = 0 .05592f ,
131+ .br_x_pos_meters = -0 .04985f ,
132+ .br_y_pos_meters = -0 .05592f ,
115133
116134 .front_of_robot_width_meters = 0 .11f ,
117135 .dribbler_width_meters = 0 .07825f ,
0 commit comments