ev3dev / ev3dev-lang-python

Pure python bindings for ev3dev
MIT License
422 stars 146 forks source link

Does MoveTank support two different Motor? #769

Open Vincentwtt opened 3 years ago

Vincentwtt commented 3 years ago

Hi there,

I am curious that is there anyway to give different motor size for MoveTank? e.g. MediumMotor for Output_A while LargeMotor for Output_D

If not, is there any other way to control two different motor simultaneously?

WasabiFan commented 3 years ago

MoveTank does not support two different types of motor by default.

You can, if it's helpful, construct a MotorSet with the two different motors in it, and that will get you some of the teamed functionality you may want. I believe both medium and large motors' encoders use the same resolution, in which case this may work fine if you command a specific speed and intend for them both to rotate at that same speed, but I may be mis-remembering.

If you're indeed trying to drive with these two motors (i.e., you have a MediumMotor on one side of your robot and a LargeMotor on the other), you may find some other types of asymmetry in its behavior that will mean your robot doesn't drive straight. It would probably be better to use two of the same type of motor for driving.