View Single Post
  #9   Spotlight this post!  
Unread 13-01-2015, 02:09
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,043
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Segmentation Fault with PuTTy

Quote:
Originally Posted by robotdna View Post
First off, how does one even use pyfrc? It seems like there is documentation on how to install pyfrc, but nothing on how to actually function with it.

Where do I type any of my commands? I installed pyfrc using pip(pip window comes up, I select "c:\python34\python.exe" as the interpreter, then typed "pip install pyfrc"

What do I do next from this? Your documentation has plenty on what commands to use, but no documentation on where to type them or how to use them.


Thanks again for all your help,
robotdna
I apologize that the documentation isn't as clear as it should be on this point. I'll try to fix it so future users aren't confused.

The way pyfrc works is it attached to some predefined hooks in the installed wpilib on your computer, such that when you execute your robot code directly, you can specify options to run the various pyfrc commands.

When you run your robot code, you can run it using whatever mechanism you would like (a script, via eclipse, via the terminal). Most people will use the terminal (or cmd on Windows) to execute their code.

So, to execute your robot code on Windows, you would open cmd, change directories to where your robot code is, and then run this:

Code:
py robot.py
On linux, you would execute the following from a terminal:

Code:
python3 robot.py
Of course, if you just execute robot.py, nothing happens -- you need to pass it some arguments. To see all the installed arguments execute this:

Code:
py robot.py --help
The various commands that the pyfrc documentation lists are commands that you append to the command line that you execute your robot with. For example, to deploy your robot to the roboRIO, you would do this:

Code:
py robot.py deploy
Eclipse plugins for robotpy are still in progress, and will make some of this a bit easier and you won't need to use the terminal anymore. Ideally they will be done by the end of week 3.. maybe even by this weekend.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote