![]() |
Help uploading RobotPy code
My team was considering using Python for a few projects during the off-season. I downloaded RobotPy-2012.2 from First Forge, and I'm slightly confused about which files I'm suppose to use to upload the code.
0) We should start by flashing our cRIO to C++, correct? 1) I'm assuming I start by adding a main robot code file called "robot.py" to the directory "./robot/py". Am I correct? 2) I looked into the utilities directory and I saw two install scripts. One is called install.py, and the other is called team_upload.py. Which one am I suppose to use? Or are we suppose to use both? 3) For each install script that you are suppose to use, could you tell me which directory I'm suppose to call it from? I don't think we're suppose to run the install script from the utilities directory 4) My team tried to use python earlier this year, but when we uploaded code (through Filezilla), our DS said we had communication, but no robot code. Are there any possible explanations for this? Thanks for any help you can give us! |
Re: Help uploading RobotPy code
Quote:
1) For your own code, create an empty folder in the location of your choosing and create a robot.py file inside of it. You can copy and edit the team_upload.py script to this directory to make it easier to upload your code, although you can also use Windows Explorer or FileZilla to FTP (ftp://10.xx.yy.2/py/), so it's not required. 2) You need to run install.py only once (for a given RoboyPy release). It is the equivalent of the imaging tool for RobotPy, and installs the interpreter and libraries to the robot. If you reimage your cRio you'll also need to rerun it. Ideally someday we might get slightly more official support and have an option in the official imaging tool for Python. You can also FTP it yourself if you don't have python installed on Windows. 3) install.py should be in the robot directory of the distribution, and that's also where it should be run from. As mentioned above, team_upload.py should be copied to where you are writing your code. 4) Either you didn't install the interpreter/libraries as described in (2), or your code had an error and raised an exception. Enable NetConsole in the imaging tool and run NetConsole on your laptop (it's on the start menu) to see what error messages you might be getting. |
Re: Help uploading RobotPy code
Thanks for your reply! I'll be sure to try uploading the code as soon as I am able to (hopefully tomorrow).
|
| All times are GMT -5. The time now is 19:53. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi