|
3 | 3 | import edu.wpi.first.wpilibj.Timer; |
4 | 4 | import frc.libzodiac.ui.Axis; |
5 | 5 | import frc.libzodiac.util.Vec2D; |
6 | | -import frc.robot.subsystems.Chassis; |
7 | 6 |
|
8 | 7 | import java.util.ArrayDeque; |
9 | 8 |
|
|
12 | 11 | */ |
13 | 12 | public abstract class Zwerve extends Zubsystem implements ZmartDash { |
14 | 13 | private static final double POS_FIX_KP = 1; |
| 14 | + private static final double ROTATION_OUTPUT = 1; |
15 | 15 | public final Vec2D shape; |
16 | 16 | /** |
17 | 17 | * Gyro. |
@@ -128,7 +128,6 @@ public Zwerve init() { |
128 | 128 | * @param rot rotate velocity, CCW positive |
129 | 129 | */ |
130 | 130 | public Zwerve go(Vec2D vel, double rot) { |
131 | | - this.debug("pos", ""+Chassis.inav.getPosition()); |
132 | 131 | // direction adjustment |
133 | 132 | final var curr_yaw = this.yaw.get(); |
134 | 133 | this.debug("desired", this.desired_yaw); |
@@ -160,7 +159,7 @@ public Zwerve go(Vec2D vel, double rot) { |
160 | 159 | final var w = this.shape.y / 2; |
161 | 160 | Vec2D[] v = { new Vec2D(l, w), new Vec2D(-l, w), new Vec2D(-l, -w), new Vec2D(l, -w) }; |
162 | 161 | for (var i = 0; i < 4; i++) { |
163 | | - v[i] = v[i].rot(Math.PI / 2).with_r(rot).add(vt); |
| 162 | + v[i] = v[i].rot(Math.PI / 2).with_r(rot*ROTATION_OUTPUT).add(vt); |
164 | 163 | } |
165 | 164 | for (int i = 0; i < 4; i++) { |
166 | 165 | this.module[i].go(v[i].mul(this.output)); |
|
0 commit comments