Python
Cannot retrieve the latest commit at this time.
| Failed to load latest commit information. | |||
|
|
doc | ||
|
|
README | ||
|
|
cRIO_ports.conf | ||
|
|
client.py | ||
|
|
fake_wpilib.py | ||
|
|
motorTorques.conf | ||
|
|
network.conf | ||
|
|
robot.py | ||
README
This Python library will test FRC robot code in conjunction with
the VIRSYS physics simulator. It will implement the same API as WPILib,
allowing one to test the same code that will run on the cRIO.
DEPENDENCIES
1. VIRSYS (VIrtual Robot SYStem)
Go to http://www.virsys.org/get_started.html, and get
* VIRSYS alpha download
* GLUT library
You not the LabVIEW project as this Python implementation replaces it.
2. Python
Go to http://python.org/download/, download Python for your platform
virsysPy has been tested on Python 3.1.2 and Python 3.2, but others
should work as well.
RUNNING THE PROJECT
Run both programs simultaneously:
* robot.py <-- from this project, virsysPy
* virsys.exe <-- from the VIRSYS download, DEPENDENCIES #1
Put your robot program in robot.py. A sample is provided.
It is hard coded for Autonomous mode (a fix will come later).
For now, to test Operator Control, change:
* robot.py: add an OperatorControl method
* fake_wpilib.py: RobotBase.IsOperatorControl to return True
RobotBase.IsAutonomous to return False
CONFIGURATION
To run your Python program on a different computer than VIRSYS, edit
both network.conf and VIRSYS's virsysPhysics.txt to reflect the IP
addresses and port numbers of the respective hosts
Edit port numbers in cRIO_ports.conf to match the port numbers on your
actual robot.