We’re a Java shop, and we are running 3 motors per side for drive this year (budget and space willing).
In the past, we have used PWM Y cables to make it all look like 4 motors. This year we want to control all 6 motors independently (easier to troubleshoot and find bad connections @ competition).
The Wpilib drive object only supports 4 motors tops. The solution we used was just to poke the Drive object as usual, then immediately interrogate a controller on each side for it’s current power and poke that back into the 3rd motor on each side (the motor that is not part of the Drive object).
The other solution we contemplated was doing a Composite motor object; I think strongback has something like that.
Ours is working fine, but I’m curious how other people solved this problem?
I would recommend making your own drive class, have it extend the RobotDrive class if you want, and set all of the motor values yourself. The main arcade and tank drive methods in the RobotDrive class are simple enough that you can recreate them easily with however many motors you need to.
^^ This is what I going to suggest if you are using PWM. We use Talon SRX controllers with CAN and you can slave controllers together through software.
This is what I also recommend you guys do. Re-implementing arcade/tank drive is super trivial and also gives you more control over what’s going on under the hood.
On a side note, in 2014 we had 6 drive motors and implemented our own drive subsystem that automatically switched on motors based on the amount of current the drive train was pulling. It would also stagger motor startup to try and prevent brown outs. Basically when we were just driving around at a constant velocity it would only use one cim per side. The moment we hit an obstacle, the current used by that single cim would spike up and the robot code would bring online more motors to give the robot extra oomph and help break static friction. We called it hammer drive, because when we ran into other robots we would hit them like a hammer. You might want to experiment with something like this if you have time. http://i.imgur.com/X0cTvS5.png