-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tomer-arm #9
base: on-robot
Are you sure you want to change the base?
Tomer-arm #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IM SORRY
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⣿⣿⣭⣦⣭⣭⣍⡙⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⢉⡙⠿⠟⣋⣴⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣌⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⣠⡞⡷⠶⠙⣿⣿⣿⣿⣿⣿⣿⣿⡿⠝⡛⠻⣿⣿⣿⣿⣇⠈⢿⣿⣿⣿⣿⠟⡁⠀⠹⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣉⠁⢹⡗⠶⠦⣌⠙⣿⣿⣝⢭⡵⠚⠉⠉⠛⣿⣿⣿⣯⠛⢧⠈⣿⣿⡿⢋⣾⠀⢀⣇⢿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⢸⣫⣤⣤⣄⣸⣿⣿⣿⣤⣶⣶⣶⣾⣶⣬⣿⣿⣿⣆⠈⠀⠈⢩⡶⠟⢋⣁⣈⣁⣾⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢸⣿⣿⣿⢿⣿⣿⣿⣿⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣽⣇⠀⣴⣾⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⣿⣿⣿⠏⠘⠻⠛⠉⠻⣦⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢸⣿⣿⣿⢠⣶⣤⣤⣶⣶⣾⣧⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠈⠉⠉⡉⠉⠛⠿⠿⠿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣸⣿⣿⢣⡿⠛⠛⠛⠛⠿⣿⣿⣧⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣰⣶⣦⡀⠂⠀⠀⠠
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⣿⣿⣿⣇⠀⢄⣷⣷⣠⣈⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠻⢿⣿⡟⠂⠀⠀⢀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⣿⣿⣿⣿⣿⣯⣙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢋⣴⣿⣿⠶⠍⠃⠀⣤⡈⢉
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢸⣿⡿⢡⣾⣿⣦⣼⣿⣷⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠊⣿⡙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠻⠇⢸⣿⣿⣿⡿⠇⠙⢿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣿⣿⠁⡄⢻⣧⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⢡⣴⣦⡄⠉⢉⡁⠀⠐⠣⠄
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠋⢱⠟⡁⠀⠁⠈⢿⣧⣙⢿⣿⣺⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠋⣠⣿⣿⠟⠀⠀⠀⠀⠀⠰⠂⠘
⣿⡟⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⢠⣾⡇⠾⠀⠀⠈⣿⡿⢿⡻⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⣡⣾⣿⡿⢃⠀⠀⠀⢀⣀⣀⡀⢼⠀
⣿⠁⣿⣿⡿⣫⣾⣿⢏⣿⠏⠀⣰⣿⣿⠃⠠⠀⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢛⣡⣾⣿⣿⠏⣠⡆⠀⠀⣴⣿⣿⣿⣿⣦⠀
⣼⠀⠟⣡⣾⣿⣿⡏⣼⡏⢈⢠⣿⣿⣿⡁⠀⠀⠀⣦⠀⠀⠉⠉⢉⣙⠻⠿⣿⣿⣿⣥⣶⣿⣿⠿⠛⣁⡶⠈⠀⠀⢰⣿⣿⣿⣿⣿⣿⡇
⣟⢠⡞⣿⡇⣿⠟⣼⡿⢣⡎⣾⣿⣿⣿⡇⠘⠀⠈⠛⠀⠀⠀⠀⠈⠛⠿⡅⢠⣈⡛⢛⣿⣽⣷⣶⣿⠛⠀⠀⠀⠀⠀⠀⠙⠿⣿⠿⢿⣿
⣿⢸⡇⢫⠀⠿⢠⡿⢁⡞⣸⣿⣿⣿⣿⣿⡀⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠫⢣⣾⣾⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⢶⣿⣿
⣱⡘⢁⣿⠀⢀⣿⢁⡮⢰⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⡀⠀⠀⠀⢀⡁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahhhh
Consider running |
src/main/java/training/subsystems/RobotArm/elbow/ElbowSimulation.java
Outdated
Show resolved
Hide resolved
src/main/java/training/subsystems/RobotArm/roller/RollerNEO.java
Outdated
Show resolved
Hide resolved
src/main/java/training/subsystems/RobotArm/elbow/ElbowFactory.java
Outdated
Show resolved
Hide resolved
src/main/java/training/subsystems/RobotArm/roller/RollerNEO.java
Outdated
Show resolved
Hide resolved
src/main/java/training/subsystems/RobotArm/roller/RollerNEO.java
Outdated
Show resolved
Hide resolved
src/main/java/training/subsystems/RobotArm/elbow/ElbowSimulation.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
יפה מאוד
public class MoveRollerAtSpeed extends Command { | ||
|
||
private Roller roller; | ||
private Rotation2d velocity; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double
private Roller roller; | ||
private Rotation2d velocity; | ||
|
||
public MoveRollerAtSpeed(Rotation2d velocity) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, double and not rotation2d
} | ||
|
||
public void initialize() { | ||
Roller.getInstance().moveAtSpeed(velocity.getDegrees()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.moveAtSpeed(velocity) change velocity to a double representing the rotation
public boolean isAtSpeed(Rotation2d velocity) { | ||
return (Math.abs(getVelocity().minus(velocity).getDegrees()) <= RollerConstants.TOLERANCE.getDegrees()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe velocity should be a double
if (instance == null) | ||
instance = new Elbow(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
סוגריים מסולסלים בבקשה
public Rotation2d getVelocity() { | ||
return inputs.velocity; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think velocity should be a double
motor.getPIDController().setReference(velocity, CANSparkBase.ControlType.kVelocity, RollerConstants.PID_SLOT); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
רווח כפול
return Rotation2d.fromDegrees(motor.getEncoder().getVelocity()); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
רווח כפול
No description provided.