mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Updated C++ documentation
Fixed incorrect documentation for Task class, improved documentation for RobotDrive's drive() function (thanks to FRC Team 4579), and ran doxygen -u on cpp.doxy to remove deprecated XML_SCHEMA and XML_DTD tags Change-Id: I2f3fa4018d69b84e67376a5feb0eca43d5fa7623
This commit is contained in:
@@ -176,16 +176,24 @@ public class RobotDrive implements MotorSafety {
|
||||
}
|
||||
|
||||
/**
|
||||
* Drive the motors at "speed" and "curve".
|
||||
* Drive the motors at "outputMagnitude" and "curve".
|
||||
* Both outputMagnitude and curve are -1.0 to +1.0 values, where 0.0
|
||||
* represents stopped and not turning. curve < 0 will turn left and curve > 0
|
||||
* will turn right.
|
||||
*
|
||||
* 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.
|
||||
* The algorithm for steering provides a constant turn radius for any normal
|
||||
* speed range, both forward and backward. Increasing m_sensitivity causes
|
||||
* sharper turns for fixed values of curve.
|
||||
*
|
||||
* 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.
|
||||
* @param outputMagnitude The speed setting for the outside wheel in a turn,
|
||||
* forward or backwards, +1 to -1.
|
||||
* @param curve The rate of turn, constant for different forward speeds. Set
|
||||
* curve < 0 for left turn or curve > 0 for right turn.
|
||||
* Set curve = e^(-r/w) to get a turn radius r for wheelbase w of your robot.
|
||||
* Conversely, turn radius r = -ln(curve)*w for a given value of curve and
|
||||
* wheelbase w.
|
||||
*/
|
||||
public void drive(double outputMagnitude, double curve) {
|
||||
double leftOutput, rightOutput;
|
||||
|
||||
Reference in New Issue
Block a user