Quote:
Originally Posted by inform880
I want to create a Halo Drive for our six wheel robot with 4 jag motor controllers. The idea is that one stick would be for the speed and the other would turn the bot.
I honestly don't know where to even start. I don't know what sort of algorithm to use or what function would be aproprate.
What algorithm should I use? What function should I use?
|
WPILib:
Code:
/**
* Drive the motors at "speed" and "curve".
*
* The speed and curve are -1.0 to +1.0 values where 0.0 represents stopped and
* not turning. The algorithm for adding in the direction attempts to provide a constant
* turn radius for differing speeds.
*
* This function will most likely be used in an autonomous routine.
*
* @param outputMagnitude The forward component of the output magnitude to send to the motors.
* @param curve The rate of turn, constant for different forward speeds.
*/
void RobotDrive::Drive(float outputMagnitude, float curve)