Code for the FRC 1757 pre season pep rally
VS Code is reccomended but not strictly required VS Code
alternative Neovim
this is skippable if you desire to just use the simulator
- Image the roboRIO Imaging instructions
- Configure the roboRio
Item Value Team number 1757
Firmware 6.0.0f1
Image FRC_roboRIO_2021_v3.0
Static IP 10.17.57.2
Subnet Mask 255.255.255.0
- PDP
- FalconFX
- CANCoder
Device | Class | Range | ID |
---|---|---|---|
robo_rio | core | 0 - 9 | master (no ID) |
pdp | core | 0 - 9 | 0 |
front_left_drive | motors | 10 - 29 | 10 |
front_left_steer | motors | 10 - 29 | 11 |
front_right_drive | motors | 10 - 29 | 12 |
front_right_steer | motors | 10 - 29 | 13 |
back_left_drive | motors | 10 - 29 | 14 |
back_left_steer | motors | 10 - 29 | 15 |
back_right_drive | motors | 10 - 29 | 16 |
back_right_steer | motors | 10 - 29 | 17 |
front_left_encoder | sensors | 40 - 59 | 40 |
front_right_encoder | sensors | 40 - 59 | 41 |
back_left_encoder | sensors | 40 - 59 | 42 |
back_right_encoder | sensors | 40 - 59 | 43 |
lights | IO | 60 - 70 | 60 |
Device | IP Address | Subnet Mask |
---|---|---|
OpenMesh radio | 10.17.57.1 |
???.???.???.??? |
roboRIO | 10.17.57.2 |
255.255.255.000 |
Driver Station (laptop) | 10.17.57.5 |
255.000.000.000 |
- IMPORTANT: Perform ALL operations in a python virtualenv
Recommend placing the virtualenv in the TShirtCannon
repo folder under .venv
(to keep everything together) however the virtualenv is local to your system and should not be uploaded (ignored in .gitignore
)
cd <path-to-mentorbot-repo>
py -3 -m venv ./.venv
- Activate virtualenv
(Virtualenv activation may differ depending on your operating system and terminal)
- Git Bash (Windows)
source <path-to-mentorbot-repo>/.venv/Scripts/activate
- Git Bash (Windows)
- Install / update dependancies
(must have internet connection)
python -m pip install -r requirements.txt
- Download python for roboRIO
(must have internet connection)
python -m robotpy_installer download-python
- Download robotpy modules for roboRIO
(must have internet connection)
(examples:
python -m robotpy_installer download robotpy
robotpy
,robotpy[ctre,navx]
,robotpy[all]
) (see: robotpy on pypi) - Install python on roboRIO
(must be connected to roboRIO)
python -m robotpy_installer install-python
- Upload robotpy modules to roboRIO
(must be connected to roboRIO)
(examples:
python -m robotpy_installer install robotpy
robotpy
,robotpy[ctre,navx]
,robotpy[all]
) (see: robotpy on pypi) - Deploy robotpy program
- To robot
(must be connected to roboRIO)
python robot.py deploy
- To simulator
python robot.py sim
- To robot
(must be connected to roboRIO)