RobotCasserole1736 / RobotCasserole2019

Software for Robot Casserole's 2019 FIRST Deep Space competition season
MIT License
5 stars 0 forks source link

Make a grabbyThing class #137

Closed gerth2 closed 5 years ago

gerth2 commented 5 years ago

We've got a new grabbything. Make a new class for grabbything.

It's got rollers to suck in a ball!

It's got a wedge that grabs the hatches like a baus.

It needs to not run the rollers when the current gets too high so we don't burn stuff out!

It's gotta have telemetry to track all the things!!!

Do it do it do it

Actual requirements TBD.

gerth2 commented 5 years ago

Sounds like we're going with Nick's design sooo....

Driver will still command the following: --Intake requested --Eject requested --Hatch mode desired --Ball mode desired.

There will be two motors driven off of Talon SPX's - one for each side (set) of wheels. There is also a pneumatic cylinder in the center to enlarge or shrink the size of the grippy thing. Enlarged is for cargo, shrunken is for hatches Finally, there is a pneumatic cylinder that actuates a "wrist" - extended will put it on position to align with the low goal, retracted will put it in position for the high goal.

When hatch mode requested, retract the pneumatic cylinder to go to hatch mode. When ball mode is requested, extend the pneumatic cylinder to go to ball mode.

When intake is requested, run the motors inward. When eject is requested, run the motors outward. Use four calibrations - there should be four different speeds (intake cargo, eject cargo, intake hatch, eject hatch). Start all calibrations at a value of 50% max motor speed.

Add logic to look at the current flowing to each motor (might need to read from PDP?). If the current exceeds a calibrated threshold for a calibrated duration, force both motor commands command to zero. Start the calibrations at 50A for one second.

Add logic in the arm to command the wrist position. Based on the most recently commanded position of the arm, command the wrist to be in the "bent" or "straight" positions. The wrist should be bent when the arm is commanded to the lower position (picking up hatch from the human player station), or the top position (placing at top of rocket). Manual mode should not change wrist state.