2015-02-24 09:05:20 -05:00
# Dent
2015-03-06 21:38:41 -05:00
[The Hitchhikers ](http://team2059.org ) 2015 robot
2015-02-24 09:05:20 -05:00
2015-03-06 21:38:41 -05:00
### Features
#### Subsystems
+ [Mecanum drivetrain ](Subsystems/Drivetrain.cpp )
+ [Collector ](Subsystems/Collector.cpp ) to collect totes in main elevator
+ [Internal elevator ](Subsystems/Elevator.cpp ) for totes
+ [External elevator ](Subsystems/BinElevator.cpp ) for bins or totes
+ [Pneumatics ](Subsystems/Pneumatics.cpp ) for opening/closing bin elevator arms (unused)
2015-02-24 09:50:57 -05:00
2015-03-06 21:38:41 -05:00
#### Sensors
+ [Ultrasonic ](Subsystems/Collector.cpp#L9 ) to check if a tote is in the robot (unused)
+ [hall effect sensors ](Subsystems/Elevator.cpp#L6-L8 ) to check the elevator's position
2015-02-24 09:50:57 -05:00
2015-03-06 21:38:41 -05:00
#### Automated Commands
+ [AutoDrive ](Commands/Autonomous/AutoDrive.cpp ) to drive forward without a joystick
+ [CollectTote ](Commands/Autonomous/CollectTote.cpp ) to drive forwards and roll in collectors in parallel
+ [ReleaseTote ](Commands/Autonomous/ReleaseTote.cpp ) to drive backwards and roll out collectors in parallel
+ [Turn ](Commands/Autonomous/Turn.cpp ) to turn the robot
2015-02-24 09:50:57 -05:00
2015-03-06 21:38:41 -05:00
### Running the code
#### Setup (for Linux)
+ Make sure you have the [toolchain ](http://first.wpi.edu/FRC/roborio/toolchains/ ) installed
+ Edit the path of WPILib and the REMOTEIP on the Makefile
+ Run `make putkey` to put the public key on the rrio for faster deploying (optional)
2015-02-24 09:50:57 -05:00
2015-03-06 21:38:41 -05:00
#### Building
+ Run `make && make deploy`
+ Run `ssh admin@rrio-ip.local '/home/lvuser/FRCUserProgram'` to execute the program
2015-02-24 09:05:20 -05:00
2015-03-06 21:38:41 -05:00
### Usage
2015-03-06 23:03:01 -05:00
#### Left Joystick (USB 0)
2015-03-06 21:38:41 -05:00
+ X-Axis - Drive forwards and backwards
+ Y-Axis - Strafes left and right
+ Z-Axis - Turns left and right
+ Throttle - Adjusts collector speed
+ Button 1 - Collect totes
+ Button 2 - Eject totes
2015-02-24 09:19:47 -05:00
2015-03-06 23:03:01 -05:00
#### Right Joystick (USB 1)
2015-03-06 21:38:41 -05:00
+ Button 3 - Lowers bin elevator
+ Button 4 - Lowers main elevator
+ Button 5 - Raises bin elevator
+ Button 6 - Raises main elevator
2015-04-05 06:45:31 -04:00
+ Button 7 - Runs an elevator cycle
2015-03-06 21:38:41 -05:00
+ Button 12 - Cancel raising and lowering for both elevators
2015-03-06 23:03:01 -05:00
### Dashboard
#### Configuration
2015-03-06 21:38:41 -05:00
+ CodeVersion - The current version of the code
+ Auto Wait Time - The amount of time to wait for any autonomous to run (default: 2.0)
+ Two totes - Collect a second tote if using Auto Sequence 4 or 5 (default: true)
+ Three totes - Collect a third tote if using Auto Sequence 4 or 5 (default: false)
+ Auto Zone Distance - Amount of time in seconds to drive to the auto zone (default: 2.1)
+ Auto Tote Distance - Amount of time in seconds to drive to a second or third tote if using Auto Sequence 4, 5, or 7 (default: 0.5)
+ Auto Bin Distance - Amount of time in seconds to drive to a bin if using Auto Sequence 6 or 7 (default: 0.5)
2015-04-05 06:45:31 -04:00
+ TurnAmount - Amount of time in seconds to turn the robot 90 degrees
2015-03-06 21:38:41 -05:00
+ Elevator Bottom - Status of the bottom elevator sensor
+ Elevator Top - Status of the top elevator sensor
+ Auto Sequence - The sequence of autonomous to run
2015-03-06 22:27:05 -05:00
2015-03-06 23:03:01 -05:00
#### Autonomous
2015-03-06 22:27:05 -05:00
1. Drive to auto zone, turn
2. Lower BinElevator, collect bin, turn, drive to AutoZone, turn
3. Raise BinElevator, turn, drive to AutoZone, turn
4. Collect 1, 2, or 3 totes, turn, drive to AutoZone, turn
5. Same as auto 4, but navigate around bins (not implemented)
6. Collect 1 bin then 1 tote (not implemented)
7. Collect 3 totes, collect bin, drive to AutoZone (not implemented)
2015-07-31 12:52:03 -04:00
### Contributing
This project uses [1TBS ](https://en.wikipedia.org/wiki/1TBS ) (Astyle Google variant with -j) and the `-xc -xn -xl -xG -j -s2 -C -S -K -N` [Astyle (2.04+) ](http://astyle.sourceforge.net/ ) flags.