Skip to content

CrossTheRoadElec/Python-NonFRC-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phoenix 6 outside FRC using Python

Very simple getting started example for using Phoenix 6 in Python.

Requirements

  1. Make sure you meet the Phoenix 6 System Requirements
  2. Install requirements.txt with pip install -r requirements.txt.
  3. If using a CANivore on Linux, install canivore-usb

If running on linux with a generic USB to CAN SocketCAN adapter, run the ./generic_socketcan_start.sh script.

If you're using CANivore on Windows, no additional steps are needed to interface with the CANivore. Ensure Tuner's "CANivore USB" toggle is off when running hardware-attached on Windows.

FRC-Lock

If a device has seen an FRC Robot Controller (RoboRIO or similar), it will "FRC-Lock". Unlock it for non-FRC use by performing a Factory Default in Tuner.

Running Robot Code

The Python package of Phoenix 6 by-default runs simulation if the system supports it. In order to run with hardware, set the CTR_TARGET environment variable to "Hardware".

A table of what to run is provided below:

Target Windows Linux MacOS
Simulation python robot.py python robot.py python robot.py
Hardware $env:CTR_TARGET="Hardware"; python robot.py CTR_TARGET=Hardware python robot.py Not supported

Other Examples

Most of the examples available on our Phoenix 6 Examples repo are applicable for non-FRC as well.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published