-
Notifications
You must be signed in to change notification settings - Fork 126
Euclidean Debug #3731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Euclidean Debug #3731
Changes from all commits
0ae208a
3cc10dd
65eaac3
f53aee3
7f7fb0f
167f589
835c2ac
e541f5d
f4c6cd7
61c9e5d
86a81d3
7262200
5b55d1c
2fc875c
1f2f5ac
501ab89
78245e1
6455b48
68b301a
11cb3c1
32d0eec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,41 +10,69 @@ struct RobotConstants | |
| // The radius of the robot [m] | ||
| float robot_radius_m; | ||
|
|
||
| // clang-format off | ||
|
|
||
| // The front_wheel_angle_deg and back_wheel_angle_deg are measured as absolute | ||
| // angles from the robot's y-axis to each wheel axle. | ||
| // | ||
| // In the ASCII diagram below: | ||
| // - front_wheel_angle_deg = A | ||
| // - back_wheel_angle_deg = B | ||
| // | ||
| // The angles are assumed to be symmetric for the left and right sides of the robot. | ||
| // | ||
| // y | ||
| // ▲ | ||
| // | | ||
| // Back wheel │ Front wheel | ||
| // └────────► , - │ - , ◄───────┘ | ||
| // , '\ │ /' , | ||
| // , \ B │ A / │ | ||
| // , \ │ / │ | ||
| // , \ │ / │ | ||
| // , └────────┼───────► x Front of robot | ||
| // , │ | ||
| // , │ | ||
| // , │ | ||
| // , .' | ||
| // ' - , _ , ' | ||
| // FRONT OF ROBOT | ||
| // | ▲ X-Axis | ||
| // | / -------+--------- \ eric | ||
| // |A / .' │ '. \ ◄─── Front wheel | ||
| // | /.' │ .'.\ grayson | ||
| // |// │ . \\ samuel | ||
| // ; │ . Lever ; | ||
| // | │ . Arm | | ||
| // ◄─────┼──────────────┼ | | ||
| // Y-Axis| | | ||
| // ; ; | ||
| // |\\ // | ||
| // | \'. .'/ | ||
| // |B \ '. .' / ◄─── Back wheel | ||
| // | \ '-. _.-' / | ||
| // | ''------'' | ||
|
|
||
| // clang-format on | ||
|
|
||
| // The angle between y-axis of the robot and the front wheel axles [degrees] | ||
| float front_wheel_angle_deg; | ||
|
|
||
| // The angle between y-axis of the robot and the rear wheel axles [degrees] | ||
| float back_wheel_angle_deg; | ||
|
|
||
| // The total width of the entire flat face on the front of the robot [meters] | ||
| // X position of centre of front right wheel | ||
| float fr_x_pos_meters; | ||
|
|
||
| // Y position of centre of front right wheel | ||
| float fr_y_pos_meters; | ||
|
|
||
| // X position of centre of front left wheel | ||
| float fl_x_pos_meters; | ||
|
|
||
| // Y position of centre of front left wheel | ||
| float fl_y_pos_meters; | ||
|
|
||
| // X position of centre of back left wheel | ||
| float bl_x_pos_meters; | ||
|
|
||
| // Y position of centre of back left wheel | ||
| float bl_y_pos_meters; | ||
|
|
||
| // X position of centre of back right wheel | ||
| float br_x_pos_meters; | ||
|
|
||
| // Y position of centre of back right wheel | ||
| float br_y_pos_meters; | ||
|
|
||
| // The total width of the entire flat face on the front of the robot [metres] | ||
| float front_of_robot_width_meters; | ||
|
|
||
| // The distance from one end of the dribbler to the other [meters] | ||
| // The distance from one end of the dribbler to the other [metres] | ||
| float dribbler_width_meters; | ||
|
|
||
| // Indefinite dribbler mode sets a speed that can be maintained indefinitely [rpm] | ||
|
|
@@ -72,8 +100,13 @@ struct RobotConstants | |
| // The maximum angular acceleration achievable by our robots [rad/s^2] | ||
| float robot_max_ang_acceleration_rad_per_s_2; | ||
|
|
||
| // The radius of the wheel, in meters | ||
| // The radius of the wheel, in metres | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. alr who's french
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WHAT THE FUCK IS A MILE |
||
| float wheel_radius_meters; | ||
|
|
||
| // Distance [metres] from centre of robot to centre of wheel. | ||
| // Found by sqrt(x^2 + y^2) of a wheel. | ||
| // Front wheel arm = Rear wheel arm. See ASCII image above. | ||
| float expected_lever_arm; | ||
| }; | ||
|
|
||
| /** | ||
|
|
@@ -89,6 +122,15 @@ constexpr RobotConstants createRobotConstants() | |
| .front_wheel_angle_deg = 32.0f, | ||
| .back_wheel_angle_deg = 44.0f, | ||
|
|
||
| .fr_x_pos_meters = 0.03485f, | ||
| .fr_y_pos_meters = -0.06632f, | ||
| .fl_x_pos_meters = 0.03485f, | ||
| .fl_y_pos_meters = 0.06632f, | ||
| .bl_x_pos_meters = -0.04985f, | ||
| .bl_y_pos_meters = 0.05592f, | ||
| .br_x_pos_meters = -0.04985f, | ||
| .br_y_pos_meters = -0.05592f, | ||
|
|
||
| .front_of_robot_width_meters = 0.11f, | ||
| .dribbler_width_meters = 0.07825f, | ||
|
|
||
|
|
@@ -108,7 +150,9 @@ constexpr RobotConstants createRobotConstants() | |
| .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_radius_meters = 0.03f, | ||
|
|
||
| .expected_lever_arm = 0.0749f}; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How is this computed? Also can you label this somewhere in the ASCII diagram or something to better explain what this value points to? |
||
| } | ||
| #elif CHECK_VERSION(2021) | ||
| constexpr RobotConstants createRobotConstants() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this ASCII art is ass-key. Make better? :)