We’ve been having a problem with our Autonomous when driving for revolutions when the velocity is set to a limit. It seems that when we have it moving, say for example at 75 percent for 1.5 revolutions the motors seem to continuously speed up then slow down back to that limit causing our robot to do what as I can describe as almost “fish-tailing”.
Are FRightMotor and RightMotor really supposed to spin in opposite directions?
I don’t see a brakeType for one motor.
Not that it matters for anything but cleanliness here, but you have three absolutely useless lines of code at the top because you have assigned velocities when you use them.
@John TYler I originally tried to have them all on the rotateFor command but when I did that our robot would sit there and jitter back in forth like it was over-correcting.
@callen They’re all spinning in the same direction. I’m assuming you thought rev was reverse, but in this case it was revolutions. The rotateFor command has an auto brake already in it. As for the assigned velocities that’s for the rest of the program.
Oops. I see that now. I was reading all the directionType::fwd and misread the next line. Yes, rotateFor has an auto brake, but what type of brake is it? I would be explicit about it unless you know for sure.
@callen I still can’t see how that would affect why our robot is sort of “fish-tailing”. The rotateFor command as said by @John TYler has a hold after it reaches the specified distance.
@6008A At this point I’m prepared to say that your problem is not in the section of code that you’ve shown us so far. That leaves other parts of the code or the hardware as possible culprits.
@callen All the position-targeted motor movement commands in RMS and VCS end in a hold braking mode. That’s something that happens down at the level of the motor’s firmware if I’m remembering correctly.