Go to Post Changing lives as a key volunteer is not a right reserved for the "elite" among us anymore. - HurdFIRST [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-01-2017, 22:34
lobrien lobrien is offline
Registered User
FRC #3880
Team Role: Mentor
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Kailua Kona, Hawaii
Posts: 7
lobrien is an unknown quantity at this point
RoboRio + Labview: Is it possible to _also_ run python code on RoboRio?

We are using LabVIEW to program the main robot, but are using Python for our CV / targeting subsystem. Am I correct in thinking that if LabVIEW for driving, then we are out of luck _also_ deploying Python on the RoboRIO? (We are definitely using Python on a daughterboard.)

That is, do I understand correctly that the choice of programming language on the RoboRIO is exclusive: we cannot deploy _both_ some amount of LabVIEW code _AND_ some amount of Python code on the RoboRIO?
Reply With Quote
  #2   Spotlight this post!  
Unread 13-01-2017, 23:13
nickbrickmaster's Avatar
nickbrickmaster nickbrickmaster is online now
Not Allowed Near Power Tools
AKA: Nick Schatz
FRC #3184 (Blaze Robotics)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Eagan MN
Posts: 162
nickbrickmaster is an unknown quantity at this point
Re: RoboRio + Labview: Is it possible to _also_ run python code on RoboRio?

You can deploy as much code as you want, but you need to do some custom linux-ing, moving code around and running it manually, etc.

If you're running Python on a coprocessor and just want to access the data, you can use pynetworktables to publish that data, and not need to run Python on the RIO.
__________________
I have approximate knowledge of many things.

FRC 3184: 2014-, FTC 10648: 2015-
Reply With Quote
  #3   Spotlight this post!  
Unread 13-01-2017, 23:23
Jonathan L. Jonathan L. is offline
Programmer alumnus, mentor, and CSA
FRC #1094 (Channel Cats)
 
Join Date: Jan 2013
Rookie Year: 2011
Location: St. Louis MO
Posts: 79
Jonathan L. is a jewel in the roughJonathan L. is a jewel in the roughJonathan L. is a jewel in the roughJonathan L. is a jewel in the rough
Re: RoboRio + Labview: Is it possible to _also_ run python code on RoboRio?

For running both programming languages on the roboRIO I think you should be able to run LabVIEW as your main language and use a "Call Library Function Node" in LabVIEW to call python code. I have never done this, but I think that is what the Call Library Function Node is for.
Reply With Quote
  #4   Spotlight this post!  
Unread 14-01-2017, 00: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,086
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: RoboRio + Labview: Is it possible to _also_ run python code on RoboRio?

It's just linux, there's nothing stopping you from doing both at the same time. The tricky bit would be getting the python code to launch and deploying it (this is just normal linux system administration stuff). You might be able to call it from LabVIEW too.

You probably wouldn't be able to use "Call Library Function Node" as that would require a C/C++ shared library... but, google "call python from labview" and you'll find some stuff.

At the moment, I don't have OpenCV/Python for RoboRIO compiled, but I do have numpy. I'll probably work on it either tomorrow night or Sunday night.
__________________
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

Last edited by virtuald : 14-01-2017 at 00:11.
Reply With Quote
  #5   Spotlight this post!  
Unread 14-01-2017, 00:10
lobrien lobrien is offline
Registered User
FRC #3880
Team Role: Mentor
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Kailua Kona, Hawaii
Posts: 7
lobrien is an unknown quantity at this point
Re: RoboRio + Labview: Is it possible to _also_ run python code on RoboRio?

Quote:
Originally Posted by nickbrickmaster View Post
If you're running Python on a coprocessor and just want to access the data, you can use pynetworktables to publish that data, and not need to run Python on the RIO.
See my question at https://www.chiefdelphi.com/forums/s...hreadid=153615 :-) !
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 23:51.

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