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

auto factories #55

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open

auto factories #55

wants to merge 35 commits into from

Conversation

aridavidson001
Copy link

The use of triggers is really cool honestly. We can use them in robotContainer as well to bind certain commands to certain things(like moving the elevator to whatever level if we're x feet from the feeder station, or auto moving the elevator if we're doing auto-align with the reef).
Also the auto stuff is reallllllllly cool.

@aridavidson001 aridavidson001 changed the title moved auto stuff to robot.java, made it better(used choreo's autoChooser instead of a sendable chooser), and created an example auto in robot.java auto factories Jan 26, 2025
@Ishan1522
Copy link
Member

/format 😄

@aridavidson001
Copy link
Author

/format

1 similar comment
@Ishan1522
Copy link
Member

/format

src/main/java/frc/robot/RobotContainer.java Outdated Show resolved Hide resolved
src/main/java/frc/robot/RobotContainer.java Outdated Show resolved Hide resolved
src/main/java/frc/robot/RobotContainer.java Outdated Show resolved Hide resolved
src/main/java/frc/robot/RobotContainer.java Outdated Show resolved Hide resolved
@Ishan1522 Ishan1522 linked an issue Feb 2, 2025 that may be closed by this pull request
Copy link
Member

@JacksonElia JacksonElia left a comment

Choose a reason for hiding this comment

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

Good job Ari, this looks great!

Next challenge is figuring out how to get pose estimation to work. I would talk with @Ishan1522 about how to do this as we need a command to extend DriveCommandBase but I'm not sure what is the best way to do that.

src/main/java/frc/robot/commands/auto/ExampleAuto.java Outdated Show resolved Hide resolved
src/main/java/frc/robot/Autos.java Show resolved Hide resolved
src/main/java/frc/robot/Autos.java Outdated Show resolved Hide resolved
src/main/java/frc/robot/Robot.java Show resolved Hide resolved
@JacksonElia JacksonElia mentioned this pull request Feb 4, 2025
6 tasks
@Ishan1522
Copy link
Member

Next challenge is figuring out how to get pose estimation to work. I would talk with @Ishan1522 about how to do this as we need a command to extend DriveCommandBase but I'm not sure what is the best way to do that.

lol i forgot about this one good question, i think it shouldn't be bad tho.

@Ishan1522
Copy link
Member

lemme look at the code more......

Copy link
Member

@Ishan1522 Ishan1522 left a comment

Choose a reason for hiding this comment

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

one pregunta por favor and gracias

double moveY = sample.vy + yController.calculate(pose.getY(), sample.y);
double moveTheta =
sample.omega + headingController.calculate(pose.getRotation().getRadians(), sample.heading);
drive(moveX, moveY, moveTheta, true);
Copy link
Member

Choose a reason for hiding this comment

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

@JacksonElia would this method not correctly do pose estimation for following trajectories? i don't think it is used yet, but I'm pretty sure this would work no?

Copy link
Member

Choose a reason for hiding this comment

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

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

Copy link
Member

Choose a reason for hiding this comment

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

i suppose it can't estimate the pose if we aren't using the drive command lol

Copy link
Member

Choose a reason for hiding this comment

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

it could do pose estimation there i guess but then we don't get vision

src/main/java/frc/robot/Autos.java Outdated Show resolved Hide resolved
src/main/java/frc/robot/Autos.java Outdated Show resolved Hide resolved
src/main/java/frc/robot/RobotContainer.java Outdated Show resolved Hide resolved
src/main/java/frc/robot/RobotContainer.java Outdated Show resolved Hide resolved
src/main/java/frc/robot/RobotContainer.java Outdated Show resolved Hide resolved
(SwerveSample sample) -> {
FollowChoreoTrajectory command =
new FollowChoreoTrajectory(swerveDrive, visionSubsystem, sample);
command.execute();
Copy link
Member

Choose a reason for hiding this comment

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

this might not be correct. idk

Copy link
Member

Choose a reason for hiding this comment

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

uh it seems weird just doing command.execute? I don't think this is right probably

Copy link
Member

Choose a reason for hiding this comment

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

yeah me too lol im gonna test it today

@aridavidson001
Copy link
Author

/format

@Ishan1522
Copy link
Member

Ok I'm actually so sorry I didn't get to test this yesterday but I pinky promise we will do it today

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

Successfully merging this pull request may close these issues.

auto factories and such
3 participants