-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nitay - I am a god(the simulation shows perfect graphs despite it bei…
…ng imposible) - working on simulatin pid and feedforward
- Loading branch information
Showing
14 changed files
with
65 additions
and
25 deletions.
There are no files selected for viewing
14 changes: 8 additions & 6 deletions
14
src/main/java/training/commands/ArmCommands/elbowCommands/ElbowStayInPlace.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
package training.commands.ArmCommands.elbowCommands; | ||
|
||
import edu.wpi.first.math.geometry.Rotation2d; | ||
import edu.wpi.first.wpilibj2.command.Command; | ||
import training.subsystems.ArmSubsystems.elbow.Elbow; | ||
import training.subsystems.ArmSubsystems.elbow.ElbowConstants; | ||
|
||
import java.lang.module.ModuleDescriptor; | ||
|
||
public class ElbowStayInPlace extends Command { | ||
|
||
private final Elbow elbow; | ||
private Elbow elbow; | ||
private Rotation2d targetPosition; | ||
|
||
public ElbowStayInPlace(Elbow elbow) { | ||
this.elbow = elbow; | ||
this.targetPosition = elbow.getTargetPosition(); | ||
addRequirements(elbow); | ||
} | ||
|
||
|
||
@Override | ||
public void execute() { | ||
if (elbow.isAtTargetPosition(elbow.getTargetPosition(), ElbowConstants.POSITION_TOLERANCE, ElbowConstants.VELOCITY_TOLERANCE)) { | ||
elbow.stayAtPosition(); | ||
} | ||
elbow.stayAtPosition(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,6 @@ public interface IElbow { | |
|
||
void updateInputs(ElbowInputsAutoLogged inputs); | ||
|
||
void stayAtPosition(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters