I think that I did something wrong when setting up my chasses controller. Whenever I run any command involving it, I get a memory permission error. My full code is In-Progress_Programs/Testing-Prebuild/States · Mages · ACP Robotics / 2021-2022 Season · GitLab, and the chassis controller is
std::shared_ptr<OdomChassisController> drive = //Odometry.
ChassisControllerBuilder()
.withMotors(
{ leftBack, leftFront },
{ rightBack, rightFront }
)
.withSensors(
ADIEncoder{ 'A', 'B' }, //Left Encoder
ADIEncoder{ 'C', 'D' } //Right Encoder
)
.withGains(
{ 0.01, 0, 0 }, // distance controller gains
{ 0.01, 0, 0 }, // turn controller gains
{ 0.01, 0, 0 } // angle controller gains (helps drive straight)
)
.withDimensions(AbstractMotor::gearset::green, { {4.125_in, 12_in}, imev5GreenTPR })//Drive wheel size, Drive wheel track
.withOdometry({ { 4.125_in, 8_in}, quadEncoderTPR })//tracking wheel size, tracking wheel track
.buildOdometry();
I need to tune the PID, but that is not possible if I can’t run any of the code. Does anyone see a mistake I made? Thanks