Go to Post sheesh, how much more of a nerd can I be? - Libby K [more]
Home
Go Back   Chief Delphi > Technical > Programming > Python
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-04-2012, 21:00
nyaculak nyaculak is offline
Registered User
FRC #0053 (Area 53)
Team Role: Programmer
 
Join Date: Oct 2011
Rookie Year: 2011
Location: Maryland
Posts: 28
nyaculak will become famous soon enough
Exclamation 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!
__________________
2013 MUC DC 3rd Place, FRC DC Regional, FRC Chesapeake Regional
2012 FRC DC Regional, FRC Chesapeake Regional
ERHS Robotics Club
- FRC Team 53 "Area 53"
www.erhsroboticsclub.org
Reply With Quote
  #2   Spotlight this post!  
Unread 08-04-2012, 12:32
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 247
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: Help uploading RobotPy code

Quote:
Originally Posted by nyaculak View Post
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!
0) Correct. Also make sure you check the box to enable NetConsole, as all Python error messages as well as all print statements in your code go to the cRio console.
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.
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
Reply With Quote
  #3   Spotlight this post!  
Unread 09-04-2012, 16:28
nyaculak nyaculak is offline
Registered User
FRC #0053 (Area 53)
Team Role: Programmer
 
Join Date: Oct 2011
Rookie Year: 2011
Location: Maryland
Posts: 28
nyaculak will become famous soon enough
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).
__________________
2013 MUC DC 3rd Place, FRC DC Regional, FRC Chesapeake Regional
2012 FRC DC Regional, FRC Chesapeake Regional
ERHS Robotics Club
- FRC Team 53 "Area 53"
www.erhsroboticsclub.org
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:28.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi