Hi, so there’s a weird bug when using odometry and coordinates with okapi for us. We run the following command:
chassis->setState({6.5_in, 36_in, 0_deg});
chassis->moveToPoint({2_ft, 3_ft});
All is well for now. The robot moves to the correct spot. However, now if I run the following…
chassis->moveToPoint({4_ft, 3_ft});
Instead of moving two feet further in the Y-Axis (as would be expected), the robot actually moves 4 feet forward, as if the Y coordinate were 0. However, the robot moves in a straight line, meaning it realizes that the X-Coordinate is the same. This is a really weird bug, and a bit annoying. We’ve gotten around it somewhat by setting the state after every movement, but obviously that isn’t something we should be doing. Does anyone have a solution for this? For reference, below is our chassis initialization.
std::shared_ptr<OdomChassisController> chassisAuton = ChassisControllerBuilder()
.withMotors(
{1, 12}, //left motors are ports 1 and 2
{-10, -19}
) //right motors are ports 10 and 19 (reversed)
.withSensors( //declares rotation sensors; left at port 3 and right on port 5 (reversed)
RotationSensor{3},
RotationSensor{5, true}
)
//blue gearset, 3.25 inch wheel diameter, 9.75 inch wheelbase (Left-Back to Right-Back Wheel)
.withDimensions(AbstractMotor::gearset::blue, {{3.25_in, 9.75_in}, imev5BlueTPR})
//3.25in tracking wheel, 15_in distance between encoder wheels, 4090 Ticks Per Rotation
.withOdometry({{3.25_in, 15.5_in}, 4090})
/
//Builds the chassis
.buildOdometry(); // build an odometry chassis