My team was trying to use the
Drivetrain.turnFor function this weekend, but noticed something very strange.
turnFor(90, deg), the robot would spin 180 degrees instead. We tried a few other degrees - all were doubled. They also tried to test the
driveFor function to see if maybe there was something wrong with the drivetrain object that was created, but
driveFor worked as expected.
There are no sensors (gyro or inertial) being used right now.
The hack would be to just divide the degrees by 2, but that is not a good coding practice.
We thought there might be something wrong with the drivetrain initialization, but it does not look incorrect. The drivetrain specs are: wheels are 4" omnis, wheel and track width are around 12" each. This the drivetrain initialization:
drivetrain Drivetrain = drivetrain(LeftDriveSmart, RightDriveSmart, 101.6*M_PI, 304.8, 311.15, mm, 1.0);