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-feeding #79

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

auto-feeding #79

wants to merge 6 commits into from

Conversation

etangent
Copy link
Contributor

@etangent etangent commented Sep 21, 2024

PR for task "Auto Feed"

Shoots at target 2 feet in front of the amp at z=0. The shot velocity is calculated in terms of the pitch (math can be found here). Pivot angle can be changed beforehand through operator manual pivot, and it will hold that angle for the duration of the shot.

Since the note is shot high and likely changes orientation in its arc, the note will almost certainly not land where it is modeled in code. Testing that is a very good idea.

I've also added ethan's constant so we can change that to account for disturbances (assuming that we would want to account for different disturbances in the feeding vs shooting code). You may wish to change the name.

image

Also supports feeding while driving

SOTM.feeding.-.Made.with.Clipchamp.mp4

@Unclesdad Unclesdad self-requested a review September 23, 2024 20:08
@HenryLi-0 HenryLi-0 assigned HenryLi-0 and unassigned HenryLi-0 Sep 23, 2024
@HenryLi-0 HenryLi-0 self-requested a review September 23, 2024 20:10
Copy link
Member

@HenryLi-0 HenryLi-0 left a comment

Choose a reason for hiding this comment

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

Seems to work pretty well, except maybe for possibly the continuing pointing at the feeding target area even after the note is shot (and occasionally not shooting again until simulation restart?).

@@ -263,6 +269,8 @@ private void configureBindings() {
.deadlineWith(Commands.idle(shooter)))
.toggleOnTrue(led.raindrop());

operator.y().onTrue(shooting.feedToAmp(x, y));
Copy link
Member

Choose a reason for hiding this comment

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

Maybe this should be .whileTrue? In simulation, the robot continues pointing at the feeding target area, even after the note is shot.

Copy link
Member

Choose a reason for hiding this comment

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

It also seems to sometimes make it only shoot once in simulation and not again?

Copy link
Contributor Author

@etangent etangent Sep 23, 2024

Choose a reason for hiding this comment

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

Shooting only once is because of feeder code not working in sim

Copy link
Contributor

Choose a reason for hiding this comment

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

One other thing, this should probably be given to the driver instead b/c its harder to coordinate this between two people in a really fast manner. Ask @Yxhej for specific button.

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.

4 participants