april tag
This commit is contained in:
@@ -63,10 +63,22 @@ public class AprilTag3 extends Command {
|
|||||||
}
|
}
|
||||||
else if(Botyaw >90 && Botyaw <=180){
|
else if(Botyaw >90 && Botyaw <=180){
|
||||||
drivetrain.setControl(drive.
|
drivetrain.setControl(drive.
|
||||||
withRotationalRate(a/20).
|
withRotationalRate(tx/20).
|
||||||
withVelocityX(0).
|
withVelocityX(MathUtil.clamp(-x/4, -1, 1)).
|
||||||
withVelocityY( b/50));
|
withVelocityY(MathUtil.clamp(z/4, -1, 1)));
|
||||||
System.out.println(b/50);
|
}
|
||||||
|
else if(Botyaw >-90 && Botyaw <=0){
|
||||||
|
drivetrain.setControl(drive.
|
||||||
|
withRotationalRate(tx/20).
|
||||||
|
withVelocityX(MathUtil.clamp(-x/4, -1, 1)).
|
||||||
|
withVelocityY(MathUtil.clamp(-z/4, -1, 1)));
|
||||||
|
}
|
||||||
|
else if(Botyaw >-180 && Botyaw <=-90){
|
||||||
|
drivetrain.setControl(drive.
|
||||||
|
withRotationalRate(tx/20).
|
||||||
|
withVelocityX(MathUtil.clamp(x/4, -1, 1)).
|
||||||
|
withVelocityY(MathUtil.clamp(-z/4, -1, 1)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
drivetrain.setControl(drive.
|
drivetrain.setControl(drive.
|
||||||
|
|||||||
Reference in New Issue
Block a user