-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy path2021_robot_constants.cpp
More file actions
42 lines (35 loc) · 1.64 KB
/
2021_robot_constants.cpp
File metadata and controls
42 lines (35 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "shared/2021_robot_constants.h"
#include "shared/constants.h"
RobotConstants_t create2021RobotConstants(void)
{
RobotConstants_t robot_constants = {
.mass_kg = 2.5f, // determined experimentally
.inertial_factor = 0.37f, // determined experimentally
.robot_radius_m = static_cast<float>(ROBOT_MAX_RADIUS_METERS),
// TODO (#2112): update this
.jerk_limit_kg_m_per_s_3 = 40.0f,
.front_wheel_angle_deg = 32.06f,
.back_wheel_angle_deg = 46.04f,
// TODO (#2112): update this
.front_of_robot_width_meters = 0.11f,
.dribbler_width_meters = 0.07825f,
// Dribbler speeds are negative as that is the direction that sucks the ball in
.indefinite_dribbler_speed_rpm = -10000,
.max_force_dribbler_speed_rpm = -12000,
.release_ball_dribbler_speed_rpm = 2000,
// Motor constant
.motor_max_acceleration_m_per_s_2 = 4.5f,
// Robot's linear movement constants
.robot_max_speed_m_per_s = 3.000f,
.ball_placement_wall_max_speed_m_per_s = 0.3f,
.ball_placement_retreat_max_speed_m_per_s = 0.3f,
.dribble_speed_m_per_s = 1.5f,
.robot_max_acceleration_m_per_s_2 = 3.0f,
.robot_max_deceleration_m_per_s_2 = 3.0f,
// Robot's angular movement constants
.robot_max_ang_speed_rad_per_s = 10.0f,
.robot_max_ang_acceleration_rad_per_s_2 = 30.0f,
.wheel_radius_meters = 0.03f,
.wheel_rotations_per_motor_rotation = 17.0f / 60.0f};
return robot_constants;
}