Skip to content
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

Open
wants to merge 33 commits into
base: on-robot
Choose a base branch
from
Open

Tomer-arm #9

wants to merge 33 commits into from

Conversation

tomer-hershman
Copy link

No description provided.

src/main/java/training/Robot.java Outdated Show resolved Hide resolved
src/main/java/training/subsystems/Module.java Outdated Show resolved Hide resolved
src/main/java/utils/simulation/FlywheelSimulation.java Outdated Show resolved Hide resolved
src/main/java/utils/simulation/GyroSimulation.java Outdated Show resolved Hide resolved
@YoniKiriaty YoniKiriaty changed the base branch from master to on-robot August 7, 2024 20:38
src/main/java/training/commands/MoveElbowToAngle.java Outdated Show resolved Hide resolved
src/main/java/training/commands/MoveElbowToAngle.java Outdated Show resolved Hide resolved
src/main/java/training/commands/MoveElbowToAngle.java Outdated Show resolved Hide resolved
src/main/java/utils/DefaultRobotManager.java Outdated Show resolved Hide resolved
Copy link

@greenblitz4590 greenblitz4590 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IM SORRY
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⣿⣿⣭⣦⣭⣭⣍⡙⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⢉⡙⠿⠟⣋⣴⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣌⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⣠⡞⡷⠶⠙⣿⣿⣿⣿⣿⣿⣿⣿⡿⠝⡛⠻⣿⣿⣿⣿⣇⠈⢿⣿⣿⣿⣿⠟⡁⠀⠹⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣉⠁⢹⡗⠶⠦⣌⠙⣿⣿⣝⢭⡵⠚⠉⠉⠛⣿⣿⣿⣯⠛⢧⠈⣿⣿⡿⢋⣾⠀⢀⣇⢿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⢸⣫⣤⣤⣄⣸⣿⣿⣿⣤⣶⣶⣶⣾⣶⣬⣿⣿⣿⣆⠈⠀⠈⢩⡶⠟⢋⣁⣈⣁⣾⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢸⣿⣿⣿⢿⣿⣿⣿⣿⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣽⣇⠀⣴⣾⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⣿⣿⣿⠏⠘⠻⠛⠉⠻⣦⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢸⣿⣿⣿⢠⣶⣤⣤⣶⣶⣾⣧⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠈⠉⠉⡉⠉⠛⠿⠿⠿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣸⣿⣿⢣⡿⠛⠛⠛⠛⠿⣿⣿⣧⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣰⣶⣦⡀⠂⠀⠀⠠
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⣿⣿⣿⣇⠀⢄⣷⣷⣠⣈⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠻⢿⣿⡟⠂⠀⠀⢀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⣿⣿⣿⣿⣿⣯⣙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢋⣴⣿⣿⠶⠍⠃⠀⣤⡈⢉
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢸⣿⡿⢡⣾⣿⣦⣼⣿⣷⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠊⣿⡙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠻⠇⢸⣿⣿⣿⡿⠇⠙⢿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣿⣿⠁⡄⢻⣧⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⢡⣴⣦⡄⠉⢉⡁⠀⠐⠣⠄
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠋⢱⠟⡁⠀⠁⠈⢿⣧⣙⢿⣿⣺⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠋⣠⣿⣿⠟⠀⠀⠀⠀⠀⠰⠂⠘
⣿⡟⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⢠⣾⡇⠾⠀⠀⠈⣿⡿⢿⡻⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⣡⣾⣿⡿⢃⠀⠀⠀⢀⣀⣀⡀⢼⠀
⣿⠁⣿⣿⡿⣫⣾⣿⢏⣿⠏⠀⣰⣿⣿⠃⠠⠀⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢛⣡⣾⣿⣿⠏⣠⡆⠀⠀⣴⣿⣿⣿⣿⣦⠀
⣼⠀⠟⣡⣾⣿⣿⡏⣼⡏⢈⢠⣿⣿⣿⡁⠀⠀⠀⣦⠀⠀⠉⠉⢉⣙⠻⠿⣿⣿⣿⣥⣶⣿⣿⠿⠛⣁⡶⠈⠀⠀⢰⣿⣿⣿⣿⣿⣿⡇
⣟⢠⡞⣿⡇⣿⠟⣼⡿⢣⡎⣾⣿⣿⣿⡇⠘⠀⠈⠛⠀⠀⠀⠀⠈⠛⠿⡅⢠⣈⡛⢛⣿⣽⣷⣶⣿⠛⠀⠀⠀⠀⠀⠀⠙⠿⣿⠿⢿⣿
⣿⢸⡇⢫⠀⠿⢠⡿⢁⡞⣸⣿⣿⣿⣿⣿⡀⠀⠀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠫⢣⣾⣾⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⢶⣿⣿
⣱⡘⢁⣿⠀⢀⣿⢁⡮⢰⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⡀⠀⠀⠀⢀⡁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿

src/main/java/training/subsystems/RobotArm/Roller.java Outdated Show resolved Hide resolved
src/main/java/training/subsystems/RobotArm/Roller.java Outdated Show resolved Hide resolved
src/main/java/training/subsystems/RobotArm/Roller.java Outdated Show resolved Hide resolved
Copy link

@Sh-Pe Sh-Pe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahhhh

src/main/java/training/RobotTypes.java Outdated Show resolved Hide resolved
src/main/java/training/TrainingRobotManager.java Outdated Show resolved Hide resolved
@Sh-Pe
Copy link

Sh-Pe commented Aug 21, 2024

image
cat car

@Sh-Pe
Copy link

Sh-Pe commented Aug 24, 2024

Consider running .\graldew spotlessApply on the main directory. This will pass you the formatting test (also make a separate commit for that).

src/main/java/training/RobotTypes.java Outdated Show resolved Hide resolved
src/main/java/training/TrainingRobotManager.java Outdated Show resolved Hide resolved
Copy link
Member

@GilStein1 GilStein1 left a 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;
Copy link
Member

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) {
Copy link
Member

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());
Copy link
Member

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

Comment on lines +38 to +40
public boolean isAtSpeed(Rotation2d velocity) {
return (Math.abs(getVelocity().minus(velocity).getDegrees()) <= RollerConstants.TOLERANCE.getDegrees());
}
Copy link
Member

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

Comment on lines +21 to +22
if (instance == null)
instance = new Elbow();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

סוגריים מסולסלים בבקשה

Comment on lines +34 to +36
public Rotation2d getVelocity() {
return inputs.velocity;
}
Copy link
Member

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);
}


Copy link
Member

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());
}


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

רווח כפול

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants