Log in

View Full Version : Programming Drive with a 4 Motor, 2 Wheel Setup


r0306
17-02-2013, 02:48
We've decided to move double up the power to the back wheels by moving front motors to the back and leaving the front with free-spinning low friction wheels, as shown in the picture below. However, I am unsure as how I should program the drive code as we were using the default drive constructor:

RobotDrive drive = new RobotDrive(FRONT_LEFT, REAR_LEFT, FRONT_RIGHT, REAR_RIGHT);

Now that the two front motors are relocated, should I reverse the channels so that they turn the same direction like this:

RobotDrive drive = new RobotDrive(FRONT_RIGHT, REAR_LEFT, FRONT_RIGHT, REAR_LEFT);

http://sphotos-b.xx.fbcdn.net/hphotos-prn1/s480x480/528120_562473630431689_1938133323_n.jpg

eddie12390
17-02-2013, 09:30
We've decided to move double up the power to the back wheels by moving front motors to the back and leaving the front with free-spinning low friction wheels, as shown in the picture below. However, I am unsure as how I should program the drive code as we were using the default drive constructor:

RobotDrive drive = new RobotDrive(FRONT_LEFT, REAR_LEFT, FRONT_RIGHT, REAR_RIGHT);

Now that the two front motors are relocated, should I reverse the channels so that they turn the same direction like this:

RobotDrive drive = new RobotDrive(FRONT_RIGHT, REAR_LEFT, FRONT_RIGHT, REAR_LEFT);

http://sphotos-b.xx.fbcdn.net/hphotos-prn1/s480x480/528120_562473630431689_1938133323_n.jpg

I'm not sure that you need to make any change at all, depending on the build of the gearbox the motors should still spin the same direction that they did previously. If you try to run anything like Mecanum strafing it won't work but the normal drive code (Tank/Arcade) should be just fine.

Ether
17-02-2013, 18:25
We've decided to move double up the power to the back wheels by moving front motors to the back and leaving the front with free-spinning low friction wheels

If you are doing this to solve the turning problem discussed here (http://www.chiefdelphi.com/forums/showthread.php?t=113536), I doubt it will work. For your sake, I hope I'm wrong.

Please let us know.

r0306
18-02-2013, 00:28
Actually, we managed to resolve the turning issue by doing this. We tested it today and it works. Although it's still hard to turn sometimes, it is an obvious improvement to the 4 high traction design.

Ether
18-02-2013, 00:31
We tested it today and it works.

On carpet?

r0306
20-02-2013, 00:16
Not so much on carpet as on tiles but it is still turn-able on the playing field.