mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Add tests for equivilance of RobotDrive and DifferentialDrive/MecanumDrive (#732)
Add documentation for how to get same results as RobotDrive and improve RobotDrive documentation
This commit is contained in:
committed by
Peter Johnson
parent
e308dd28f3
commit
cbd08a1e11
@@ -81,6 +81,20 @@ class SpeedController;
|
||||
* The positive X axis points ahead, the positive Y axis points to the right,
|
||||
* and the positive Z axis points down. Rotations follow the right-hand rule, so
|
||||
* clockwise rotation around the Z axis is positive.
|
||||
*
|
||||
* Inputs smaller then 0.02 will be set to 0, and larger values will be scaled
|
||||
* so that the full range is still used. This deadband value can be changed
|
||||
* with SetDeadband().
|
||||
*
|
||||
* <p>RobotDrive porting guide:
|
||||
* <br>TankDrive(double, double, bool) is equivalent to
|
||||
* RobotDrive#TankDrive(double, double, bool) if a deadband of 0 is used.
|
||||
* <br>ArcadeDrive(double, double, bool) is equivalent to
|
||||
* RobotDrive#ArcadeDrive(double, double, bool) if a deadband of 0 is used
|
||||
* and the the rotation input is inverted eg ArcadeDrive(y, -rotation, false)
|
||||
* <br>CurvatureDrive(double, double, bool) is similar in concept to
|
||||
* RobotDrive#Drive(double, double) with the addition of a quick turn
|
||||
* mode. However, it is not designed to give exactly the same response.
|
||||
*/
|
||||
class DifferentialDrive : public RobotDriveBase {
|
||||
public:
|
||||
|
||||
@@ -44,6 +44,23 @@ class SpeedController;
|
||||
* The positive X axis points ahead, the positive Y axis points to the right,
|
||||
* and the positive Z axis points down. Rotations follow the right-hand rule, so
|
||||
* clockwise rotation around the Z axis is positive.
|
||||
*
|
||||
* Inputs smaller then 0.02 will be set to 0, and larger values will be scaled
|
||||
* so that the full range is still used. This deadband value can be changed
|
||||
* with SetDeadband().
|
||||
*
|
||||
* RobotDrive porting guide:
|
||||
* <br>In MecanumDrive, the right side speed controllers are automatically
|
||||
* inverted, while in RobotDrive, no speed controllers are automatically
|
||||
* inverted.
|
||||
* <br>DriveCartesian(double, double, double, double) is equivalent to
|
||||
* RobotDrive#MecanumDrive_Cartesian(double, double, double, double)
|
||||
* if a deadband of 0 is used, and the ySpeed and gyroAngle values are inverted
|
||||
* compared to RobotDrive (eg DriveCartesian(xSpeed, -ySpeed, zRotation,
|
||||
* -gyroAngle).
|
||||
* <br>DrivePolar(double, double, double) is equivalent to
|
||||
* RobotDrive#MecanumDrive_Polar(double, double, double) if a
|
||||
* deadband of 0 is used.
|
||||
*/
|
||||
class MecanumDrive : public RobotDriveBase {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user