The-Charge / SteamBot2017

Other
0 stars 0 forks source link

Investigate speed control for drive system to allow better control at low power settings #72

Closed abcurrie closed 7 years ago

Shalmezad commented 7 years ago

May want to consider taking a look at SirLancebot since we have done this last year, specifically:


SirLancebot Drivebase All our drive commands (tank, arcade, halo, clayton, etc) extended DriveBase. The commands implemented getLeft() and getRight(), DriveBase would use the current control method and feed those values to the drivetrain.

In particular, pay attention to how it says setRightPercentVBus(rightspeed); and setRightSpeedPercentage(rightspeed);

It does use a sendable chooser. If you want to implement this, it's in the OI


InitSpeedPercentageMode() In the drivetrain, switches it to use speed "percentage" mode (it's the CANTalon speed control mode, the percentage comes into play in the next part)

setLeftSpeedPercentage() Has the magic for going from percentage to speed control.