From 86df2209380969c1edaaae7beb81cbaf21209a71 Mon Sep 17 00:00:00 2001 From: ary Date: Fri, 22 Sep 2023 10:25:50 -0400 Subject: [PATCH] update comp chassis --- RELENTLESS/include/globals.hpp | 15 +++++++++++---- RELENTLESS/src/globals.cpp | 25 ++++++++++++++----------- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/RELENTLESS/include/globals.hpp b/RELENTLESS/include/globals.hpp index 2e06192..60a0ca9 100644 --- a/RELENTLESS/include/globals.hpp +++ b/RELENTLESS/include/globals.hpp @@ -3,7 +3,10 @@ #include "lemlib/api.hpp" #include "ary-lib/drive/drive.hpp" -#define TRACK_WDITH 11.5; +#define TRACK_WDITH 11.5 +#define PLACEHOLDER_TC_OFFSET 2.5 +#define WHEEL_SIZE 2.75 +#define DRIVE_RATIO 0.75 namespace globals { extern pros::Controller master; @@ -21,9 +24,13 @@ namespace globals { extern pros::Motor_Group right_drive; extern lemlib::Drivetrain_t chassis_odom; - extern Drive chassis; - extern pros::Rotation enc_left; - extern pros::Rotation enc_right; + extern pros::Rotation rot_vert; + extern pros::Rotation rot_horiz; extern pros::Rotation enc_theta; + + extern lemlib::TrackingWheel vert_tracking_wheel; + extern lemlib::TrackingWheel horiz_tracking_wheel; + + extern Drive chassis; } \ No newline at end of file diff --git a/RELENTLESS/src/globals.cpp b/RELENTLESS/src/globals.cpp index f52b591..38b1480 100644 --- a/RELENTLESS/src/globals.cpp +++ b/RELENTLESS/src/globals.cpp @@ -14,32 +14,35 @@ namespace globals { pros::Motor motor_brf(4, MOTOR_GEARSET_06, true); pros::Motor motor_brb(4, MOTOR_GEARSET_06, true); - pros::Motor_Group left_drive({ motor_fl, motor_ml, motor_bl }); - pros::Motor_Group right_drive({ motor_fr, motor_mr, motor_br }); + pros::Motor_Group left_drive({ motor_tlf, motor_tlb, motor_blf, motor_blb }); + pros::Motor_Group right_drive({ motor_trf, motor_trb, motor_brf, motor_brb }); + + // Electronics / Pneumatics / Sensors + pros::Rotation rot_vert(0); + pros::Rotation rot_horiz(1); + // pros::Rotation enc_right(); + // pros::Rotation enc_theta(); lemlib::Drivetrain_t chassis_odom { &left_drive, &right_drive, 11.5, - 2.75, + WHEEL_SIZE, 450 }; + lemlib::TrackingWheel vert_tracking_wheel(&rot_vert, 2.75, PLACEHOLDER_TC_OFFSET, 1); // subject to change: p3 -> tracking center offset + lemlib::TrackingWheel hroiz_tracking_wheel(&rot_horiz, 2.75, PLACEHOLDER_TC_OFFSET, 1); + Drive chassis( {-4,-4,-4,-4}, {1,1,1,1}, 16, - 3.125, + WHEEL_SIZE, 600, - 0.6 + DRIVE_RATIO ); - - // Electronics / Pneumatics / Sensors - // pros::Rotation enc_left(); - // pros::Rotation enc_right(); - // pros::Rotation enc_theta(); - // Misc } \ No newline at end of file