Go to Post ummm who is John V Neun....? - Korbin [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-08-2009, 15:18
Lord Byron's Avatar
Lord Byron Lord Byron is offline
Registered User
AKA: Tim Sebek
FRC #0538 (Dragon Slayers)
Team Role: Programmer
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Alabama
Posts: 33
Lord Byron is an unknown quantity at this point
Programing with Python

Does anyone know if it would be possible to program the NI CRIO using Python programming language? (www.python.org) I personally am a fan of labview, but many other memebers of the team prefer text-based programming. Of the different text-based programming languages avalible, Python is a favorite, and it's wide range of use and extension modules have led us to believe that programming our robot with it would be possible. Assuming it's possible, are there any already made Python modules for FRC?
__________________
You have a ramen doctor in your secret ramen base!?!
  #2   Spotlight this post!  
Unread 25-08-2009, 15:27
Andrew Schreiber Andrew Schreiber is offline
Joining the 900 Meme Team
FRC #0079
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Misplaced Michigander
Posts: 4,062
Andrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond repute
Re: Programing with Python

Short answer, No

Long answer, NOOOOOOOOOOOOOOO


Best bet would be to learn C++ and program the robot that way.

Middle Bet, write a library that makes programming similar to Python.

Longer bet would be write a way of compiling Python code to the C++ code then running it through the compiler that the C++ code uses.

Longest answer, write a compiler to compile to the CRIO assembly language...


Me? Id just learn C++.
__________________




.
  #3   Spotlight this post!  
Unread 25-08-2009, 16:42
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Programing with Python

Quote:
Originally Posted by Lord Byron View Post
Does anyone know if it would be possible to program the NI CRIO using Python programming language? (www.python.org) I personally am a fan of labview, but many other memebers of the team prefer text-based programming. Of the different text-based programming languages avalible, Python is a favorite, and it's wide range of use and extension modules have led us to believe that programming our robot with it would be possible. Assuming it's possible, are there any already made Python modules for FRC?
There is currently no support in place for a python user.

To the best of my knowledge, there is no legal or technical reason that would preclude you from doing so. However, it would certainly require some doing and would require extensive C++ and python experience. If you are looking to do this because python is 'easier', turn back now. If you are doing this to score major geek points, be warned that upon success you will be overwhelmed with the downsides of awesomeness: Prepare yourself to fend off the fan(boy/girl)s.

The Java and C++ (and LV??) environments make calls into a unified block that handles the 'sacred' stuff, such as FPGA and field comm. Broadly (and slightly incorrectly) speaking, you could consider this unified block to be a dll or driver. Your python library would need to "simply" hook into this. No "cRIO assembly" required !

My secret hope is that the community will develop a (e.g.) python environment next summer. It isn't that I think python is better or worse than any of the other options, it is that I think it would be an amazing project with lots of community enhancing hidden benefits.
  #4   Spotlight this post!  
Unread 25-08-2009, 20:12
daltore's Avatar
daltore daltore is offline
Electronics/programming/design
AKA: Aaron Osmer
FRC #3529 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: San Antonio, TX
Posts: 272
daltore has a spectacular aura aboutdaltore has a spectacular aura aboutdaltore has a spectacular aura about
Send a message via AIM to daltore Send a message via MSN to daltore Send a message via Yahoo to daltore
Re: Programing with Python

The point of python is to be extensible. Any way you could write it into a block inside a C++ program? You could possibly create macros/variables from C++, and then "do something" with them in the Python block. If you can interject the Python code into the C++ file, you should be able to "just" compile it, assuming the WindRiver compiler contains support for the Python wrapper. I'm not very familiar with the process of embedding languages, most I've really dealt with to any extent is wrapping assembly into C, so please forgive me if I'm way off.
  #5   Spotlight this post!  
Unread 25-08-2009, 22:03
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,567
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Programing with Python

The first thing you would have to do is port Python to vxworks on a power pc. A quick Google search shows several people asking about it, and there was even a patch set for a 10 year old version of python to a 10 year old version of vxworks, but that likely isn't good anymore, not to mention the link is broken. I didn't see anything from the last 5 years.

Once you've done that, they you can start on the things that Eric pointed out.

If the main reason you were looking at python is because you wanted a text based language, C++ or Java would sure be a lot simpler.
  #6   Spotlight this post!  
Unread 25-08-2009, 22:26
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: Programing with Python

I'm not sure how much of the Java API is supported in the cRIO version, but you may want to look at Jython, which allows Python programs to be compiled to Java bytecode, and allows you to directly import existing Java classes into your Python code, which means you could use the cRIO's Java API directly.

Disclaimer: I've never tried this, but this came to mind in reading your question and the previous responses as a possible course of action. Would probably be much easier than trying to cross compile the entire Python runtime using WindRiver

Good luck, and let us know of any results.

--Ryan
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
programing motor with axis frcchile Programming 1 16-02-2009 08:30
Programing with camera? excel2474 Programming 3 14-02-2009 08:08
Help with programing Tank Drive in Lab View zackcool123 NI LabVIEW 3 18-01-2009 19:49
NEED PROGRAMMER TO HELP WITH PROGRAMING Reaper40 Programming 4 02-02-2007 17:31
help with programing banner senor. incognito_NICK Programming 2 17-11-2004 06:51


All times are GMT -5. The time now is 01:07.

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