Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Write the indexer-Tigger subsystem #27

Open
tylertian123 opened this issue Feb 11, 2020 · 4 comments
Open

Write the indexer-Tigger subsystem #27

tylertian123 opened this issue Feb 11, 2020 · 4 comments
Assignees
Labels
testing This issue is awaiting testing on a physical robot
Milestone

Comments

@tylertian123
Copy link
Member

tylertian123 commented Feb 11, 2020

Indexer and Tigger
image

The indexer is directly attached to the intake and will funnel power cells and feed them into Tigger, the tower that will bring the power cells up into the shooter. Shown above is a CAD model for it (belts not shown, bottom image is the latest).

The indexer will have 2 motors, one for each belt. (The belts might be running in opposite directions to prevent jams.) Tigger has a motor for its belts which bring the power cells up to the intake, and another motor for the front roller, which will feed power cells from the intake into it. Tigger will also have 2 photoelectric sensors positioned on the back wall at the bottom which allows us to stack the power cells neatly.

Here's how it should work:

  • When the intake (Write intake subsystem and teleop command #23) is lowered and also a few seconds after it is raised again, run Tigger and the indexer, unless Tigger is already full.
  • The two indexer belts should run together along with Tigger's front roller to bring power cells in until the bottommost photoelectric sensor of Tigger is activated. Then, stop the front belt and roller, and start running the up roller/belts of Tigger to bring the power cell up, until the other sensor is activated and the bottommost sensor is deactivated. Repeat as needed.
  • Tigger should keep a count of how many power cells are in it. It can only hold 3 power cells maximum, so if there are two power cells in it, run only the front roller and indexer belts to bring the third power cell into the bottom, but don't run the up rollers to bring it up. If there are 3 power cells in it, don't do anything.
  • When neither sensors are activated, Tigger is assumed to be empty. The power cell count can then be cleared.
  • We will likely sense when we have shot a power cell through monitoring the RPM of the shooter wheel or some other method. For now, don't worry about power cells exiting Tigger.
@tylertian123 tylertian123 added the new members Easy to get started; good for new members label Feb 11, 2020
@tylertian123 tylertian123 added this to the Teleop Code milestone Feb 11, 2020
@tylertian123
Copy link
Member Author

To use a photoelectric sensor, you can use a DigitalInput. For at least one of our sensors, DigitalInput.get() will return true when it's activated (blocked), but some of them may be the opposite. Might be useful to make a class for it and add some kid of setInverted(boolean) method, but might not be worth the effort.

@tylertian123
Copy link
Member Author

Since the operation of this subsystem is closely related to the intake but not so much so that they'd be the same subsystem, I'd consider branching off from the intake branch (once #23 is done most likely). Issue #25 will be closed.

Also, this is likely going to be one of if not the most complicated subsystem on the robot, so please ask me if you have any questions.

tylertian123 referenced this issue Feb 23, 2020
Merge the Indexer and Tigger subsystems.
The Indexer and Tigger will run when Intake is lowered. Powercells will be brought up when there is room in Tigger.
@tylertian123
Copy link
Member Author

@AmberMLiu The requirements have changed a bit but I have the flowchart ready:
Flowchart
Wow, I actually used a flowchart for something other than ICS class. Amazing.

It's quite a bit to read but basically:

  • The controls can either be in normal (automatic) or override (manual) mode (toggle with the Start button maybe?)
  • In normal mode, the subsystem should attempt to always move power cells that are already in Tigger into position but will not bring any more power cells into Tigger unless the left or right bumper or trigger is pressed.
  • If the left or right bumper or trigger is pressed and existing power cells are in place (see flowchart), the V-indexer and Tigger front roller should run. If the left bumper/trigger was pressed, the two belts on the V-indexer should run in the same direction (both down), while for the right bumper/trigger the two belts should run in opposite directions (one down, one up).
  • In override mode everything is controlled manually and there is very little logic. Same controls apply to the V-indexer and Tigger front roller. Additionally, if the Y button is pressed, Tigger back roller should run.

Reading the state of the intake is no longer required as now it'll be controlled by a button. Also note that the triggers are analog axes, so you would read them by using controller.getRawAxis(XboxController.Axis.kLeftTrigger.value), controller.getRawButton(XboxController.Button.kLeftBumper.value), etc.

Also, amazing work! 🎉 I'm really impressed by what you have so far. Keep up the good work! I know this is quite a bit of work, so if you feel like you need a break, feel free to ask me to finish the rest.

@tylertian123
Copy link
Member Author

Updated flowchart:
flowchart

@tylertian123 tylertian123 added testing This issue is awaiting testing on a physical robot and removed new members Easy to get started; good for new members labels Mar 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
testing This issue is awaiting testing on a physical robot
Projects
None yet
Development

No branches or pull requests

2 participants