|
1 | 1 | #pragma once |
2 | 2 |
|
3 | | -#include "shared/constants.h" |
4 | | - |
5 | 3 | namespace robot_constants |
6 | 4 | { |
7 | 5 |
|
@@ -140,95 +138,6 @@ struct RobotConstants |
140 | 138 | * |
141 | 139 | * @return robot constants for the robot |
142 | 140 | */ |
143 | | -#if CHECK_VERSION(2026) |
144 | | -constexpr RobotConstants createRobotConstants() |
145 | | -{ |
146 | | - return { |
147 | | - .robot_radius_m = static_cast<float>(ROBOT_MAX_RADIUS_METERS), |
148 | | - .front_wheel_angle_deg = 32.0f, |
149 | | - .back_wheel_angle_deg = 44.0f, |
150 | | - |
151 | | - .fr_x_pos_meters = 0.03485f, |
152 | | - .fr_y_pos_meters = -0.06632f, |
153 | | - .fl_x_pos_meters = 0.03485f, |
154 | | - .fl_y_pos_meters = 0.06632f, |
155 | | - .bl_x_pos_meters = -0.04985f, |
156 | | - .bl_y_pos_meters = 0.05592f, |
157 | | - .br_x_pos_meters = -0.04985f, |
158 | | - .br_y_pos_meters = -0.05592f, |
159 | | - |
160 | | - .front_of_robot_width_meters = 0.11f, |
161 | | - .dribbler_width_meters = 0.07825f, |
162 | | - |
163 | | - // Dribbler speeds are negative as that is the direction that sucks the ball in |
164 | | - .indefinite_dribbler_speed_rpm = -10000, |
165 | | - .max_force_dribbler_speed_rpm = -12000, |
166 | | - |
167 | | - // Motor constant |
168 | | - .motor_max_acceleration_m_per_s_2 = 2.0f, |
169 | | - |
170 | | - // Robot's linear movement constants |
171 | | - .robot_max_speed_m_per_s = 3.0f, |
172 | | - .robot_trajectory_max_speed_m_per_s = 2.5f, |
173 | | - |
174 | | - .robot_max_acceleration_m_per_s_2 = 4.5f, |
175 | | - .robot_max_deceleration_m_per_s_2 = 3.0f, |
176 | | - |
177 | | - .robot_trajectory_max_acceleration_m_per_s_2 = 3.0f, |
178 | | - .robot_trajectory_max_deceleration_m_per_s_2 = 2.0f, |
179 | | - |
180 | | - // Robot's angular movement constants |
181 | | - .robot_max_ang_speed_rad_per_s = 10.0f, |
182 | | - .robot_trajectory_max_ang_speed_rad_per_s = 7.0f, |
183 | | - .robot_max_ang_acceleration_rad_per_s_2 = 30.0f, |
184 | | - |
185 | | - .wheel_radius_meters = 0.03f, |
186 | | - |
187 | | - .expected_lever_arm = 0.0749f, |
188 | | - |
189 | | - // Kalman filter variances for robot localizer |
190 | | - .kalman_process_noise_variance_rad_per_s_4 = 1.0f, |
191 | | - .kalman_vision_noise_variance_rad_2 = 0.01f * 0.01f, |
192 | | - .kalman_motor_sensor_noise_variance_rad_per_s_2 = 0.5f}; |
193 | | -} |
194 | | -#elif CHECK_VERSION(2021) |
195 | | -constexpr RobotConstants createRobotConstants() |
196 | | -{ |
197 | | - return { |
198 | | - .robot_radius_m = static_cast<float>(ROBOT_MAX_RADIUS_METERS), |
199 | | - .front_wheel_angle_deg = 32.06f, |
200 | | - .back_wheel_angle_deg = 46.04f, |
201 | | - |
202 | | - .front_of_robot_width_meters = 0.11f, |
203 | | - .dribbler_width_meters = 0.07825f, |
204 | | - |
205 | | - // Dribbler speeds are negative as that is the direction that sucks the ball in |
206 | | - .indefinite_dribbler_speed_rpm = -10000, |
207 | | - .max_force_dribbler_speed_rpm = -12000, |
208 | | - |
209 | | - // Motor constant |
210 | | - .motor_max_acceleration_m_per_s_2 = 4.5f, |
211 | | - |
212 | | - // Robot's linear movement constants |
213 | | - .robot_max_speed_m_per_s = 3.000f, |
214 | | - .robot_trajectory_max_speed_m_per_s = 3.000f, |
215 | | - .robot_max_acceleration_m_per_s_2 = 3.0f, |
216 | | - .robot_max_deceleration_m_per_s_2 = 3.0f, |
217 | | - .robot_trajectory_max_acceleration_m_per_s_2 = 3.0f, |
218 | | - .robot_trajectory_max_deceleration_m_per_s_2 = 3.0f, |
219 | | - |
220 | | - // Robot's angular movement constants |
221 | | - .robot_max_ang_speed_rad_per_s = 10.0f, |
222 | | - .robot_trajectory_max_ang_speed_rad_per_s = 7.0f, |
223 | | - .robot_max_ang_acceleration_rad_per_s_2 = 30.0f, |
224 | | - |
225 | | - .wheel_radius_meters = 0.03f, |
226 | | - |
227 | | - // Kalman filter variances for robot localizer |
228 | | - .kalman_process_noise_variance_rad_per_s_4 = 0.5f, |
229 | | - .kalman_vision_noise_variance_rad_2 = 0.01f * 0.01f, |
230 | | - .kalman_motor_sensor_noise_variance_rad_per_s_2 = 0.5f * 0.5f}; |
231 | | -} |
232 | | -#endif |
| 141 | +RobotConstants createRobotConstants(); |
233 | 142 |
|
234 | 143 | } // namespace robot_constants |
0 commit comments