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

Clean up intaking logic in IntakeAssembly #114

Closed
yabberyabber opened this issue Apr 2, 2018 · 0 comments
Closed

Clean up intaking logic in IntakeAssembly #114

yabberyabber opened this issue Apr 2, 2018 · 0 comments

Comments

@yabberyabber
Copy link
Contributor

The state machine in IntakeAssembly is great at avoiding collisions and smoothly transitioning between manual operation, position-preset operation, and hanging operation. The intaking operation is mucking up what would otherwise be a very clean state machine.

https://github.com/Team973/2018-inseason/blob/silicon-valley/src/subsystems/IntakeAssembly.cpp#L407

It's non-obvious but calling GoToIntakePosition changes the ControlMode to one of the position control modes. This does a great job of moving the intake to the ground but it leaves us in a state where we are no longer waiting for the cube to finish intaking.

There are multiple ways to fix this. This is currently implemented in teleop as a quick hack (https://github.com/Team973/2018-inseason/blob/silicon-valley/src/TeleopMode.cpp#L80). One way to solve this issue would be to clean up the teleop implementation and store a member variable in Teleop.

  • make s_intaking a member variable of Teleop
  • track 3 states: VaultIntaking (on IsCubeIn, flash lights and set the wrist to holding mode), SwitchIntaking (on IsCubeIn, flash lights, go to stow position, and set the wrist to holding mode), and Idle (don't do anything... the user isn't intaking) and implement them in TeleopPeriodic
This issue was closed.
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

No branches or pull requests

1 participant