Go to Post We're not all autonomous robots who are preprogrammed to always follow rules blindly regardless of what they are. - Ryan Dognaux [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 07-05-2016, 10:26
s5511's Avatar
s5511 s5511 is offline
Registered User
FRC #5511
 
Join Date: Jan 2016
Location: Cary, NC
Posts: 58
s5511 is an unknown quantity at this point
Java vs Labview

My team is thinking about switching our robot code from Labview to Java. For the past two seasons, we have used Labview, and we have found it very appealing because of its ease of use. So far, we have used the navX gyro, encoders, limit switches, and PID control for our shooter and drivetrain. Another reason we have enjoyed using Labview over past seasons is that is very easy to learn and allows programmers to quickly modify and make changes to code. Over the summer, we want to experiment with vision processing and motion profiling. I should also mention that we have a small programming team, only 2-3 members.

What are the major advantages of using Java over Labview?
Does it take longer to program the same robot in Java than it would take within Labview?
__________________


NC Rookie All Star, Rookie Highest Seed 2015
NC THOR Winner 2015
NC Guilford County Winner and Creativity Award 2016
Reply With Quote
  #2   Spotlight this post!  
Unread 07-05-2016, 11:00
Spillertb Spillertb is offline
Registered User
FRC #5752
 
Join Date: Feb 2016
Location: Beverly
Posts: 11
Spillertb is an unknown quantity at this point
Re: Java vs Labview

I have never used Labview so this is probably kinda biased. But being the only programmer (yes the only one) on our team I think java works perfectly.

I use command based, and it has worked perfectly for me. I am quite experienced with java though so it may have been easier for me, but its not to heard to learn. We have NavX MXP on the roborio, and it is super easy to use once you add the right plugins, we also use limit switches easily. I haven't personally used pid or encoders just because we haven't ever had to. The main advantage for me is that I know the code absolutely inside out, so if the driver all of a sudden screams at me from half way across the pits to add in a button that would make it spin around in circles for 19 seconds or some other random thing, I could add that in under a few minutes, command based also helps with this. I tried to add vision processing this year, but it totally didn't work for different reasons, though it isn't that hard to do. We also used mecanum wheels this year fyi.

Heres the github of my code: https://github.com/FRC-5752/FRC-5752-2016

Last edited by Spillertb : 07-05-2016 at 11:05.
Reply With Quote
  #3   Spotlight this post!  
Unread 07-05-2016, 11:08
Hitchhiker 42's Avatar
Hitchhiker 42 Hitchhiker 42 is offline
Roboter
AKA: Mark Lavrentyev
FRC #4557 (FullMetal Falcons)
Team Role: Programmer
 
Join Date: Oct 2015
Rookie Year: 2015
Location: Cromwell, CT
Posts: 502
Hitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to behold
Re: Java vs Labview

I'll offer a biased point of view from the LabVIEW side. From what I have done, implementing vision is easy in LabVIEW. In addition to that, I would suggest staying with LV because of how simple it is to understand. It is easy to find mistakes and fix them, and just as easy to add extra controls, etc. as in java.

The main argument for LV is that it is capable of doing what C++ and Java are, but in a more easy-to-understand and new-to-programming-teachable way. Think about new members.

Our programming team on 4557 also consists of 2-3 members.
__________________



2016 - NE District Championship Entrepreneurship Award
2016 - Hartford District Industrial Design Award
2016 - Waterbury District Engineering Inspiration Award
Reply With Quote
  #4   Spotlight this post!  
Unread 07-05-2016, 11:33
rich2202 rich2202 is online now
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,206
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: Java vs Labview

We use C++, but are thinking of switching to Java for the following reasons:

1) AP Computer Science is Java based. Some kids will come in with Java knowledge. I am sure there are great things about Labview. But, if you don't have to teach the students the basics, you are that much ahead.

2) Mentors don't know Labview. It is easier to get a Mentor involved (and productively supervising the students) if they don't have to learn something new.
__________________


Last edited by rich2202 : 07-05-2016 at 11:37.
Reply With Quote
  #5   Spotlight this post!  
Unread 07-05-2016, 12:10
s5511's Avatar
s5511 s5511 is offline
Registered User
FRC #5511
 
Join Date: Jan 2016
Location: Cary, NC
Posts: 58
s5511 is an unknown quantity at this point
Re: Java vs Labview

Yes, 2 of our students have taken APCS.

I was also wondering if there is anything that is significantly easier to program in Java, or that Labview cannot accomplish functionality wise.
__________________


NC Rookie All Star, Rookie Highest Seed 2015
NC THOR Winner 2015
NC Guilford County Winner and Creativity Award 2016
Reply With Quote
  #6   Spotlight this post!  
Unread 07-05-2016, 12:38
DubstepLion1's Avatar
DubstepLion1 DubstepLion1 is offline
Registered User
FRC #5518 (Techno Wolves)
Team Role: Leadership
 
Join Date: Feb 2015
Rookie Year: 2015
Location: United States
Posts: 15
DubstepLion1 is an unknown quantity at this point
Re: Java vs Labview

I don't know if LabView can achieve this, but this year we used Java to call a script on the roboRIO via command line to initialize mjpg-streamer to stream the cam to the Driver Station.

There are other reasons to use Java, too. I would argue better support with WPILIB being open sourced and the ability to use outside libraries which can aid in easier implementations for vision or motion profiling,
Reply With Quote
  #7   Spotlight this post!  
Unread 07-05-2016, 12:41
Hitchhiker 42's Avatar
Hitchhiker 42 Hitchhiker 42 is offline
Roboter
AKA: Mark Lavrentyev
FRC #4557 (FullMetal Falcons)
Team Role: Programmer
 
Join Date: Oct 2015
Rookie Year: 2015
Location: Cromwell, CT
Posts: 502
Hitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to behold
Re: Java vs Labview

Quote:
Originally Posted by DubstepLion1 View Post
I don't know if LabView can achieve this, but this year we used Java to call a script on the roboRIO via command line to initialize mjpg-streamer to stream the cam to the Driver Station.
Labview most certainly can stream the camera to the dashboard. In fact, our drivers relied on it heavily this year.

Quote:
Originally Posted by rich2202 View Post
2) Mentors don't know Labview. It is easier to get a Mentor involved (and productively supervising the students) if they don't have to learn something new.
I would certainly argue with that. Our team's programming mentor knew LabVIEW prior to joining our team.
__________________



2016 - NE District Championship Entrepreneurship Award
2016 - Hartford District Industrial Design Award
2016 - Waterbury District Engineering Inspiration Award
Reply With Quote
  #8   Spotlight this post!  
Unread 07-05-2016, 13:29
Monochron's Avatar
Monochron Monochron is offline
Engineering Mentor
AKA: Brian O'Sullivan
FRC #4561 (TerrorBytes)
Team Role: Engineer
 
Join Date: Feb 2007
Rookie Year: 2002
Location: Research Triangle Park, NC
Posts: 905
Monochron has a reputation beyond reputeMonochron has a reputation beyond reputeMonochron has a reputation beyond reputeMonochron has a reputation beyond reputeMonochron has a reputation beyond reputeMonochron has a reputation beyond reputeMonochron has a reputation beyond reputeMonochron has a reputation beyond reputeMonochron has a reputation beyond reputeMonochron has a reputation beyond reputeMonochron has a reputation beyond repute
Re: Java vs Labview

For what its worth, we would definitely help you guys with the switch to Java if thats what yo u decide to do. We have been using Java for a couple of years now and really like it. Our programming team would be glad to head across the street and hold some sessions with your programming guys. Or you could come to the programming sessions we hold in the Fall.

It would also give me an excuse to get a better look at your robot
__________________


2016 | Innovation In Controls, Industrial Design, Quality Award, NC District - 4th Seed
Reply With Quote
  #9   Spotlight this post!  
Unread 07-05-2016, 13:30
414cnewq 414cnewq is offline
Registered User
FRC #3844 (Kentucky Wildbots)
Team Role: Alumni
 
Join Date: Jul 2014
Rookie Year: 2014
Location: KY
Posts: 86
414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of414cnewq has much to be proud of
Re: Java vs Labview

Java will give you a faster compile than LabView (20 s as compared to 1 min). Command Based programing allows more distribution among programmers, and even when its just a single programmer, RobotBuilder simplifies things. There is no registration code for Eclipse as there is for LabView, so at home set up is easier for sans-cd computers.
Reply With Quote
  #10   Spotlight this post!  
Unread 07-05-2016, 14:20
Bell-Inequaliy's Avatar
Bell-Inequaliy Bell-Inequaliy is offline
Registered User
AKA: Josh
FRC #5332 (Toaster Tech)
Team Role: Programmer
 
Join Date: Mar 2015
Rookie Year: 2013
Location: Georgia
Posts: 4
Bell-Inequaliy is an unknown quantity at this point
Re: Java vs Labview

It really depends on your taste. Java is object oriented and LabVIEW is data-flow paradigm.

In LabVIEW, data is generated by predefined functions based on the inputs of the function, or by pulling data from some other input. This data is sent along data paths and operated on by other functions. The data is then either stored or sent out. The advantages of this is that it is a simple graphical programming interface, and that data processing is easy. The disadvantage is that routines and objects are more difficult to handle in state machines, e.x building a complex autonomous from simpler behaviors is more difficult than in Java.

In Java, data is either given by the programmer as a type or is pulled from some other input. This data is treated as an object, and is therefore defaultly stored as an object. Retrieving and handling this data is more difficult as a method is typically require to get or give data. Building routines and simple behavior to create complex behavior is easier in Java, at least in my opinion and having used both languages. It is a text based program as well, which means your data flow can be a bit harder to track.

I suggest you read more about each type of language as I have highly simplified the two paradigms and only overviewed them. Having used both languages independently and alongside each other, I can say I personally prefer Java and I assure you if you know what you are doing it does not take much longer to program a robot in Java, and it is easier to collaborate and set up multiple development environments in Java than in LabVIEW.
Reply With Quote
  #11   Spotlight this post!  
Unread 07-05-2016, 18:24
Pault's Avatar
Pault Pault is offline
Registered User
FRC #0246 (Overclocked)
Team Role: College Student
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Boston
Posts: 618
Pault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond repute
Re: Java vs Labview

Having used both, my experience is that LABVIEW makes it a lot easier to write functional robot code. However, as your code gets more advanced and complex, it becomes a lot harder to keep your code from becoming spaghetti. Java is much more suited to larger projects.

Overall, based on what you said about your programming team, I think you could go either way. Java is going to require a big commitment in the offseason, but can be a worthwhile investment because it makes it easier for your team to grow. However, it is certainly possible to do motion profiling in LabVIEW, it is just harder to code it well.

YMMV. Another huge factor that I have seen come in to play is that people who already know object-oriented, text based programming are much more resistant to LabVIEW.

EDIT: I should also mention that this is a heavy simplification of your decision, and there are a lot more factors that can come in to play.
Reply With Quote
  #12   Spotlight this post!  
Unread 08-05-2016, 08:41
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,752
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: Java vs Labview

The FIRST offseason is a great place to learn new tools and to learn how to better use familiar tools.

If you think you have time. I'd suggest you take your robot that should be pretty stable, and reprogram it from scratch -- as a group or in small groups. I think you'll find that it goes smoother the second time, no matter what language you use, and you can identify some of the info that makes this possible. This is also a great time to delegate some stuff and let new students learn the ropes.

Use this as a time to learn Java and the framework. You may also find it useful when you find something confusing or new to look back at LV and look for it there.

If you really like the command-based programming, you can also look at using the new LV command & control framework.

If you are familiar with both, then when next year's game rolls around, you will be well prepared to use either language. You will also be able to help that many more teams or students if they have issues.

Greg McKaskle
Reply With Quote
  #13   Spotlight this post!  
Unread 08-05-2016, 09:36
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,752
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: Java vs Labview

Oh. Forgot to add that to invoke a command,you use the System Exec node. This is in fact how the Java and C++ apps are launched -- from LV using system exec.

So if you wanna launch another process, that is all it takes. But of course communicating to it is another matter, which is why it is much more common to simply have a parallel loop in LV that does the other thing instead of parallel processes doing it. There are cases for another process, but for LV FRC, I'd generally go for another loop.

Greg McKaskle
Reply With Quote
  #14   Spotlight this post!  
Unread 08-05-2016, 09:49
techhelpbb's Avatar
techhelpbb techhelpbb is offline
Registered User
FRC #0011 (MORT - Team 11)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 1997
Location: New Jersey
Posts: 1,622
techhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond repute
Re: Java vs Labview

This is not a dig against LabView but:
There is no LabView at my financial institution.

You walk out of high school knowing Java/Python with some practice you could write software worth huge sums of money to support your future.

You walk out of high school knowing C++ as an embedded engineer or OS contributor you are in good shape. If you easily exchange that knowledge for C# you broaden your future more on the .NET bandwagon.

I can certainly see the value in LabView for engineering and automation professionally and everywhere I have used it was for that purpose.

So teach what you will, LabView can run your robot for FRC, but as far as I am concerned LabView is not positioned to be a core skillset for most people in the market. Now that I have my own robots: I fully intend to increasingly improve my LabView skills to make me a better CSA and Mentor. It may be a FIRST thing but you guys are the lot I am in with so it is a good investment.

FRC11 uses Java and from that experience, even before Mount Olive High School seriously taught programming as they do now, we sent students places after graduation with those skills as part of their toolbox.

Last edited by techhelpbb : 08-05-2016 at 09:52.
Reply With Quote
  #15   Spotlight this post!  
Unread 08-05-2016, 10:12
MrRoboSteve MrRoboSteve is offline
Mentor
AKA: Steve Peterson
FRC #3081 (Kennedy RoboEagles)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2011
Location: Bloomington, MN
Posts: 578
MrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond repute
Re: Java vs Labview

The most important factor in selecting the language used by your team is the language your mentor knows.

You can build an effective, winning robot program in any of the three supported languages. If you have great mentor support, you can even use Python.

I personally would find Labview skill a plus when interviewing CSci grads. It provides a different experience than the curly brace languages that everyone learns.
__________________
2016-17 events: 10000 Lakes Regional, Northern Lights Regional, FTC Burnsville Qualifying Tournament

2011 - present · FRC 3081 Kennedy RoboEagles mentor
2013 - present · event volunteer at 10000 Lakes Regional, Northern Lights Regional, North Star Regional, Lake Superior Regional, Minnesota State Tournament, PNW District 4 Glacier Peak, MN FTC, CMP
http://twitter.com/MrRoboSteve · www.linkedin.com/in/speterson
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 15:18.

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