The motors on the left vs. right side of the drive train are rotated 180deg out from one another. To make both sides cause the wheels on the drivetrain to go in the same direction, one side of the drivetrain has to be driven in the opposite direction of the other.* The motor controllers have no notion of the forward/reverse direction relative to your robot. They can only indicate the polarity of their output voltage relative to the M+ and M- markings on their output pins.
I'm not sure why you saw the motor operating at half speed. setInvertedMotor() shouldn't affect max speed. How did you determine this was the case? Are you sure that the motors in each gear box are spinning in the same direction relative to one another?
* I'm making the assumption that voltage applied in the same polarity to all drive motors causes them all to rotate in the same direction. This isn't always true. Last year two of our 6 CIMs spun opposite the rest when the same polarity voltage was applied to their wires.
Quote:
Originally Posted by notmattlythgoe
The speed difference between forward and backwards should be very minimal. You probably need to calibrate the Jaguars to get them to spin the correct speed.
|
If it were a calibration problem, I would have expected the speed problem to be observed in the opposite direction of travel after the setInvertedMotor() was added to the code. Was this the case?