Thunderbots Project
Loading...
Searching...
No Matches
robot_constants.h
1#pragma once
2
6typedef struct RobotConstants
7{
8 // The mass of the entire robot including batteries [kg]
9 // Determined experimentally by weighing the robot and battery
10 float mass_kg;
11
12 // The inertial factor
13 float inertial_factor;
14
15 // The radius of the robot [m]
16 float robot_radius_m;
17
18 // The maximum jerk this robot may safely undergo [m/s^3]
19 float jerk_limit_kg_m_per_s_3;
20
21 // The front_wheel_angle_deg and back_wheel_angle_deg are measured as absolute angle
22 // to each of the wheels from the front y axis of the robot. In the ASCII art below,
23 // front_wheel_angle_deg = A and back_wheel_angle_deg = A + B. The angles are assumed
24 // to be left/right symmetrical
25 //
26 // ▲
27 // │
28 // │
29 // │
30 // │
31 // │
32 // │
33 // │
34 // │
35 // │
36 // *#### ### ###│### ### ####*
37 // *## │ ##*
38 // *## │ ##* wheel
39 // *## │ ##* │
40 // *## │ xx##*◄──┘
41 // *## │ A xxx ##*
42 // *## │ xxxx ##*
43 // *## │ xxxx ##*
44 // *## │xxxx ##*
45 // *## xx B ##*
46 // *## xx ##*
47 // *## xx ##*
48 // *## xx ##*
49 // *## xx ##*
50 // *## xx ##*
51 // *## x ##*
52 // *## ##*◄──┐
53 // *## ##* │
54 // *## ##* wheel
55 // *** ### ### ***
56
57 // angle between each front wheel and the front y axis of the robot [degrees]
58 float front_wheel_angle_deg;
59
60 // angle between each back wheel and the front y axis of the robot [degrees]
61 float back_wheel_angle_deg;
62
63 // The total width of the entire flat face on the front of the robot [meters]
64 float front_of_robot_width_meters;
65
66 // The distance from one end of the dribbler to the other [meters]
67 float dribbler_width_meters;
68
69 // Indefinite dribbler mode sets a speed that can be maintained indefinitely [rpm]
70 int indefinite_dribbler_speed_rpm;
71
72 // Max force dribbler mode sets the speed that applies the maximum amount of force on
73 // the ball [rpm]
74 int max_force_dribbler_speed_rpm;
75
76 // The maximum acceleration achievable by our motors [m/s^2]
77 float motor_max_acceleration_m_per_s_2;
78
79 // The maximum speed achievable by our robots, in metres per second [m/s]
80 float robot_max_speed_m_per_s;
81
82 // The maximum acceleration achievable by our robots [m/s^2]
83 float robot_max_acceleration_m_per_s_2;
84
85 // The maximum deceleration (break) achievable by our robots [m/s^2]
86 float robot_max_deceleration_m_per_s_2;
87
88 // The maximum angular speed achievable by our robots [rad/s]
89 float robot_max_ang_speed_rad_per_s;
90
91 // The maximum angular acceleration achievable by our robots [rad/s^2]
92 float robot_max_ang_acceleration_rad_per_s_2;
93
94 // The radius of the wheel, in meters
95 float wheel_radius_meters;
96
97 // The gear ratio between the motor shaft and wheel shaft
98 // [# of wheel rotations / 1 motor rotation]
99 float wheel_rotations_per_motor_rotation;
100
Definition robot_constants.h:7