Go to Post "Needless to say, my Roomba will be making my toast from now on" -Colbert - artK [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 31-01-2016, 19:54
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
N00B question: Are other languages not *allowed* or not *supported*?

I am brand new to FRC this year and am trying to help with the programming aspect. Since I literally walked in to volunteer last Tuesday and the first competition is in just a few weeks, time is of the essence...

As I understand it, C++, Java, and LabView are "supported" languages and I took this to mean that other languages were not *allowed*. But it seems to me that there is (at least) some kind of Python-based community and I saw some threads about people using IKVM to allow C# components, etc.

Can someone clarify what is *allowed*? Specifically, I work for Xamarin (mono sponsors). Are we allowed to develop a mono-based solution? Or, if Java is allowed, can we use *any* language that runs on the JVM?

I'm sorry if this is covered in a FAQ somewhere, but my Google-fu hasn't proved sufficient to get me an answer. (P.S. Any link to a software development rules/restriction FAQ would be highly appreciated!)

Last edited by lobrien : 31-01-2016 at 19:56.
  #2   Spotlight this post!  
Unread 31-01-2016, 20:00
joelg236 joelg236 is offline
4334 Retired Mentor & Alumni
AKA: Joel Gallant
no team
Team Role: Mentor
 
Join Date: Dec 2011
Rookie Year: 2012
Location: Calgary
Posts: 733
joelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond repute
Re: N00B question: Are other languages not *allowed* or not *supported*?

The answer to your question is basically yes, but please do not try to do anything out of the ordinary, if you are starting now. There's a huge amount of libraries for FRC robots that takes care of communications, timings, sensors, etc.
__________________
All opinions are my own.
  #3   Spotlight this post!  
Unread 31-01-2016, 20:00
nickbrickmaster's Avatar
nickbrickmaster nickbrickmaster is offline
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: 165
nickbrickmaster is an unknown quantity at this point
Re: N00B question: Are other languages not *allowed* or not *supported*?

Nothing is disallowed per the rules. However, Java, C++, and LabVIEW all have official implementations of WPILIB. Python has a community created implementation, and many teams use that. I haven't seen anyone using C#, but I believe you that there are. It's all about getting the language support. If you want to port WPILIB to your language of choice, go ahead. Can C#/other C-ish languages use C++ libraries?

The game manual (at a cursory search) says nothing about code or language restrictions. The other thing to be aware of is that if you need help at a competition with your code, and you are using Assembly to code your robot, nobody will be able to help you.
__________________
I have approximate knowledge of many things.

FRC 3184: 2014-, FTC 10648: 2015-
  #4   Spotlight this post!  
Unread 31-01-2016, 20:03
Cel Skeggs Cel Skeggs is offline
Robot Software Manager Alumnus
AKA: Previously known as Colby
FRC #1540 (The Flaming Chickens)
Team Role: Alumni
 
Join Date: Feb 2013
Rookie Year: 2009
Location: Portland, Oregon, USA
Posts: 107
Cel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of light
Re: N00B question: Are other languages not *allowed* or not *supported*?

As I understand it, you are allowed to use whatever you want, as long as you use the official firmware, images, and network communication daemon.

So yes, I'm pretty sure that you can use a mono-based solution. I don't know how the ecosystem around mono works, but perhaps RobotDotNet might be useful? If not, you'll probably need to put in a lot of work to support actually controlling the robot - you'd have to bind to the C interface of the HAL.

(I develop a Java alternative to WPILibJ, but even with reusing the official JNI bindings to access the HAL, it takes a significant amount of work. So don't do something really weird unless you're willing to put in a lot of effort.)

If you wanted to create something new for next season, I'd be happy to help - I've worked with WPILib and the HAL extensively. Just shoot me a PM.
__________________
Software manager alumnus. Developer of the CCRE, a powerful robot code framework based on dataflow and composibility.
Refer to as she/her/hers. Years of FRC: 2012, 2013, 2014, 2015, 2016. FLL for a few years beforehand.
Team 1540: The Flaming Chickens | Portland, Oregon | Twitter | Facebook

Last edited by Cel Skeggs : 31-01-2016 at 20:06.
  #5   Spotlight this post!  
Unread 31-01-2016, 20:03
Thad House Thad House is online now
Volunteer, WPILib Contributor
no team (Waiting for 2021)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Thousand Oaks, California
Posts: 1,107
Thad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond repute
Re: N00B question: Are other languages not *allowed* or not *supported*?

Quote:
Originally Posted by lobrien View Post
I am brand new to FRC this year and am trying to help with the programming aspect. Since I literally walked in to volunteer last Tuesday and the first competition is in just a few weeks, time is of the essence...

As I understand it, C++, Java, and LabView are "supported" languages and I took this to mean that other languages were not *allowed*. But it seems to me that there is (at least) some kind of Python-based community and I saw some threads about people using IKVM to allow C# components, etc.

Can someone clarify what is *allowed*? Specifically, I work for Xamarin (mono sponsors) and am most productive in CLR-based languages such as F# and C#. Are we allowed to develop a mono-based solution? Or, if Java is allowed, can we use Scala or another language that runs on the JVM?

I'm sorry if this is covered in a FAQ somewhere, but my Google-fu hasn't proved sufficient to get me an answer. (P.S. Any link to a software development rules/restriction FAQ would be highly appreciated!)
There are no rules in FRC stating that only the officially supported languages can be used. The rules for the robots can be found here, and the only restriction is that the RoboRIO must use the official image, which only includes the FPGA code, which any language can build on top of. There exists both a Python port and a DotNet port of the FIRST provided libraries to support these platforms on the RoboRIO.

The big gotcha with the unsupported languages is that they are unsupported. If you run into an issue at competition, field staff may not know how to help you. However, both ports are almost direct ports from the official libraries, and their creators use them in competition, so any issues will most likely be fixed early. In addition, if issues are found, we don't have to wait for FIRST and WPI to fix them, and can fix them on a much quicker timeline.

Getting Mono to run on the RoboRIO was actually fairly easy. NI's tools had a way to cross compile it without any issues. After that, it was just getting the libraries ported and the HAL interface working, which actually wasn't too difficult. This summer, we are actually going to try and port .NETCore to the RIO, and potentially get rid of all mono requirements, although we likely would still keep them as a backup.

As for Java, if it runs on the JVM and can access Java libraries, you should be able to get it to run on the RoboRIO. Same with the DotNet port. As long as you can access a DotNet library, you can use any language that will build on top of the CLR. VB has been minimally tested but does work, and F# should work too without much hastle. The only issue with F# is that the WPILibs are not written with functional programming in mind, and would probably be difficult to work with.

If you have any questions, please feel free to PM me and I can try and answer them the best I can.
__________________
All statements made are my own and not the feelings of any of my affiliated teams.
Teams 1510 and 2898 - Student 2010-2012
Team 4488 - Mentor 2013-2016
Co-developer of RobotDotNet, a .NET port of the WPILib.

Last edited by Thad House : 31-01-2016 at 20:13.
  #6   Spotlight this post!  
Unread 31-01-2016, 20:08
marshall's Avatar
marshall marshall is offline
My pants are louder than yours.
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,337
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: N00B question: Are other languages not *allowed* or not *supported*?

We're programming our robot this year in Rexx and Eiffel.
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
  #7   Spotlight this post!  
Unread 31-01-2016, 20:30
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,102
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: N00B question: Are other languages not *allowed* or not *supported*?

The information in this thread is correct. I'll add this statement from the RobotPy FAQ:

"...we’ve found that most problems teams run into are problems with WPILib itself, and not RobotPy."

RobotPy and RobotDotNet implement the same WPILib interface that the official languages use. Often, the problems people run into at competitions tend to be in figuring out the right logic to accomplish a task, as opposed to actual bugs with the language itself -- and any team can help you with that, regardless of language.

RobotPy has had good off-robot testing and simulation support for many years, whereas the official libraries are still not completely there yet.
__________________
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
  #8   Spotlight this post!  
Unread 31-01-2016, 20:57
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,756
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: N00B question: Are other languages not *allowed* or not *supported*?

Congrats for becoming a mentor. The rules allow you to use any language and use the roboRIO resources in many many ways. You need to keep it safe, and that means using the roboRIO in charge of outputs and keep the DS protocol in place.

Beyond that, I'd recommend having a conversation with the team. You know the mono tools and probably a number of others. The team may have some preference or experience as well. FRC is an opportunity for both to show what they know and explore something new.

Greg McKaskle
  #9   Spotlight this post!  
Unread 31-01-2016, 21:32
Foster Foster is offline
Engineering Program Management
VRC #8081 (STEMRobotics)
Team Role: Mentor
 
Join Date: Jul 2007
Rookie Year: 2005
Location: Delaware
Posts: 1,394
Foster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond repute
Re: N00B question: Are other languages not *allowed* or not *supported*?

Quote:
Originally Posted by marshall View Post
We're programming our robot this year in Rexx and Eiffel.
Wow, I have not programmed Rexx since my OS/2 days. There was a package called Visual Rexx that let you build a GUI interface with Rexx. Fun times.

Back on topic, there was a few teams that were using Lua, I don't know if they are still supporting those efforts.
__________________
Foster - VEX Delaware - 17 teams -- Chief Roboteer STEMRobotics.org
2010 - Mentor of the Year - VEX Clean Sweep World Championship
2006-2016, a decade of doing VEX, time really flies while having fun
Downingtown Area Robotics Web site and VEXMen Team Site come see what we can do for you.
  #10   Spotlight this post!  
Unread 31-01-2016, 21:35
Doug Frisk's Avatar
Doug Frisk Doug Frisk is offline
Keeping Score
AKA: Doug Frisk
no team
 
Join Date: Mar 2014
Rookie Year: 2011
Location: Behind the FMS
Posts: 352
Doug Frisk has a reputation beyond reputeDoug Frisk has a reputation beyond reputeDoug Frisk has a reputation beyond reputeDoug Frisk has a reputation beyond reputeDoug Frisk has a reputation beyond reputeDoug Frisk has a reputation beyond reputeDoug Frisk has a reputation beyond reputeDoug Frisk has a reputation beyond reputeDoug Frisk has a reputation beyond reputeDoug Frisk has a reputation beyond reputeDoug Frisk has a reputation beyond repute
Re: N00B question: Are other languages not *allowed* or not *supported*?

While you are not required to use any specific language, if you need help resolving code issues from a CSA or someone else at your event it can be helpful if you are using a supported language. If you're confident that you can provide any needed support at an event "in house" then it's not an issue.
  #11   Spotlight this post!  
Unread 31-01-2016, 23:36
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,723
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: N00B question: Are other languages not *allowed* or not *supported*?

I concur with the general consensus that switching to a non-supported language halfway through build season is not a good idea.

Another big question here regards team dynamics. If your team is at the "mentor-driven" end of the spectrum, switching based on mentor preference may make sense. If your team is in the middle or towards the "student-driven" end of the FRC spectrum, any changes to accommodate a specific mentor's skills or style should have been hashed out long before build season started.

For the record, we run (as we understand it) a bit on the student side of the middle. We start each summer with a largely mentor-run off-season build, with the understanding that we hand off responsibility to students as they demonstrate that they can handle it. By the end of the first week of build season, we have mentors suggesting ideas and even vetoing a few ideas, but the control shifts increasingly to the students according to their drive and abilities. We have not had an adult drive coach since about halfway through our first regional of our rookie year. On the other hand, I was using the drill press in my garage this afternoon to make some prototype bits of hardware to test out during tomorrow's build session. Even if the idea works out, the parts I drilled today will not be on the competition robot; our internal goal is that every piece on the competitive robot is either made in house by a student or out-sourced to NASA (and we have a limited machine budget there).
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
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


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

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