Cheatography
https://cheatography.com
General Reference
RoboRIO Address: |
roborio-1418-frc.local |
Default Gateway |
10.14.18.1 |
Robot Router SSID: |
1418 |
Documentation
RobotPy Setup: |
|
PyFRC / WPILib: |
|
PyFRC Extras: |
|
Veiwing Network Tables
Use
Network Tables are used like a print statement for the robot. We are able to view the values being pushed into network tables from out laptops
Pushing Data to Network Tables
Create new table (Usally in robot init)
self.sd = NetworkTable.getTable('SmartDashboard')
Push value (In robot loop)
self.sd.putNumber("Value name", value))
Viewing Network Tables
1) Install robotpy's eclipse plugins
2) Connect to the robot's router on your laptop
3) Open eclipse and got to WPILib > Run Outline Viewer
4) Enter a host of: roborio-1418.local
5) Click Start Client |
Python
Statements
if expression:
statements
elif expression:
statements
else:
statements
Loops
while expression:
statements
for var in collection:
statements
for i in range(start, end):
statements
|
|
|
Git
Pull Changes: |
|
Add a File: |
|
Remove File: |
|
Move FIle: |
git mv <file name> <new file name/path>
|
Commit: |
git commit -m "<insert comment here>"
|
Push: |
git push <repo/remote> <branchname>
|
Check Status: |
|
Command Line / Terminal
Change Folder/Directory: |
|
List Files: |
|
Delete File: |
|
Move File: |
mv <file name> <new file name/path>
|
Create Folder: |
|
Python Robot Simulator
Use
BEFORE deploying code to the robot or pushing code to git make sure to test your code in the pyfrc simulator. This makes sure that your code will not crash the robot and can also be helpful when developing code at home away from the robot.
Running Simulator
1) Navigate 2016-robot/robot/
2) Run the simulator with python3 robot.py sim
|
Deploy To Roborio
Deploying
1) Change your wifi to the robot's wifi 1418
2) Navigate to the 2016-robot/robot/
directory in terminal.
3) Use command python3 robot.py deploy
to start deploying.
4) Use the robot address roborio-1418.local
when prompted
Tests
If no tests are in the 2016-robot/tests/
directory then your will have to deploy with --builtin
Troubleshooting
Update pyfrc: pip3 install --upgrade --user pyfrc
|
|
Created By
Metadata
Favourited By
Comments
morganclemons97, 15:36 31 Oct 17
Resurgence-Robotics 1080 likes this idea! hope you don't mind if we make a similar sheet :)
morganclemons97, 15:36 31 Oct 17
Resurgence-Robotics 1080 likes this idea! hope you don't mind if we make a similar sheet :)
Add a Comment
More Cheat Sheets by carter.fendley