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

Se/swerve commands #11

Merged
merged 15 commits into from
Jan 28, 2024
Merged

Se/swerve commands #11

merged 15 commits into from
Jan 28, 2024

Conversation

Keobkeig
Copy link
Contributor

SwerveDrivetoShoot doesnt work as intended
SwerveDriveXMode should be tested on real robot

Keobkeig and others added 4 commits January 26, 2024 15:49
Co-authored-by: Tmanxyz <Tmanxyz@users.noreply.github.com>
Co-authored-by: metereel <Material-Energy@users.noreply.github.com>
Co-authored-by: alex <alex-wanger@users.noreply.github.com>
Co-authored-by: rzheng287 <rzheng287@users.noreply.github.com>
Co-authored-by: Tmanxyz <Tmanxyz@users.noreply.github.com>
Co-authored-by: metereel <Material-Energy@users.noreply.github.com>
Co-authored-by: alex <alex-wanger@users.noreply.github.com>
Co-authored-by: rzheng287 <rzheng287@users.noreply.github.com>
Co-authored-by: naveed1117 <naveed1117@users.noreply.github.com>
Co-authored-by: jopy-man <jopy-man@users.noreply.github.com>
Co-authored-by: Tmanxyz <Tmanxyz@users.noreply.github.com>
private Pose2d getSpeakerTargetPose(Rotation2d angleToSpeaker) {
//Everything under is from aiming at center of speaker
Vector2D robotPose = new Vector2D(Odometry.getInstance().getPose().getTranslation());
Vector2D targetPose = new Vector2D(this.targetPose.getTranslation());
Copy link
Member

Choose a reason for hiding this comment

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

Interpolate between target poses +- certain y distance from the center of the speaker to adjust the point which the robot will aim at for shooting.

private final HolonomicController controller;
private final FieldObject2d targetPose2d;

public SwerveDriveToShoot(Pose2d targetPose) {
Copy link
Member

Choose a reason for hiding this comment

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

Remove unused targetPose param

Copy link
Member

Choose a reason for hiding this comment

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

This command is supposed to align from any point on the field to a certain shooting distance away from the speaker and to point at the speaker target position. then shoot.

@BenG49 BenG49 merged commit fee152a into main Jan 28, 2024
1 check passed
@BenG49 BenG49 deleted the se/swerve-commands branch January 28, 2024 02:56
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.

3 participants