Go to Post I love the smell of burnt motors in the morning! - Mike Betts [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

 
View Poll Results: Which Programming Language Does Your Team Use?
LabView 94 35.61%
Java 106 40.15%
C/C++ 59 22.35%
Python 4 1.52%
Other (Pleas comment with language name) 1 0.38%
Voters: 264. You may not vote on this poll

Closed Thread
Thread Tools Rate Thread Display Modes
  #46   Spotlight this post!  
Unread 17-03-2013, 15:24
mlbernardoni mlbernardoni is offline
Registered User
FRC #2704
 
Join Date: Mar 2011
Location: Batavia, IL
Posts: 11
mlbernardoni is on a distinguished road
Re: Which programming language does your team use?

Labview vs C++ responsiveness

Team 2704 has historically used Labview. This year we programmed both Labview and C++. We found C++ much more responsive.

To clarify, we started this year with a simple drive train (we always build the drive train first). It is a 4 wheel design, front wheel drive, omni's in the back. We did a very simple program in Labview, tank drive, 1 joystick on a Game Pad to one drive wheel, the other joystick on the Game Pad to the second drive wheel.

It acted just as we historically expected from our years of using Labview.

We duplicated the simple program in C++ (1 joystick to 1 powered wheel; 2nd joystick to 2nd powered wheel). There was a night and day difference. Like moving up to a Ferrari. The drive team never realized the lag they had gotten use to with Labview. We will have a hard time getting the drive team to go back to Labview.

I don't know what overhead Labview puts on the program. But every student who drives the robot will tell you that there is a big difference, and it was obvious from watching the robot drive.

Same robot, same CRIO, same communications, official 2013 versions of labview and windriver, both very simple programs (1 joystick to 1 motor etc.). The only way to put it, moving the joysick to motor movement on the robot, c++ is much more responsive.
  #47   Spotlight this post!  
Unread 17-03-2013, 15:37
connor.worley's Avatar
connor.worley connor.worley is offline
Registered User
FRC #0973 (Greybots)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Berkeley/San Diego
Posts: 601
connor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond repute
Re: Which programming language does your team use?

Quote:
Originally Posted by mlbernardoni View Post
Labview vs C++ responsiveness

Team 2704 has historically used Labview. This year we programmed both Labview and C++. We found C++ much more responsive.

To clarify, we started this year with a simple drive train (we always build the drive train first). It is a 4 wheel design, front wheel drive, omni's in the back. We did a very simple program in Labview, tank drive, 1 joystick on a Game Pad to one drive wheel, the other joystick on the Game Pad to the second drive wheel.

It acted just as we historically expected from our years of using Labview.

We duplicated the simple program in C++ (1 joystick to 1 powered wheel; 2nd joystick to 2nd powered wheel). There was a night and day difference. Like moving up to a Ferrari. The drive team never realized the lag they had gotten use to with Labview. We will have a hard time getting the drive team to go back to Labview.

I don't know what overhead Labview puts on the program. But every student who drives the robot will tell you that there is a big difference, and it was obvious from watching the robot drive.

Same robot, same CRIO, same communications, official 2013 versions of labview and windriver, both very simple programs (1 joystick to 1 motor etc.). The only way to put it, moving the joysick to motor movement on the robot, c++ is much more responsive.
This seems very unlikely. Are you using the correct speed controller classes in LabVIEW?
__________________
Team 973 (2016-???)
Team 5499 (2015-2016)
Team 254 (2014-2015)

Team 1538 (2011-2014)
2014 Driver (25W 17L 1T)
日本語でOK
  #48   Spotlight this post!  
Unread 17-03-2013, 15:39
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Which programming language does your team use?

This still makes no sense. I have never seen the lag you describe. Are you running control tasks too slowly or running up on 100% CPU usage?

Please quantitatively describe the lag and root-cause it before blaming it all on the programming language. The language itself is not a cause for lag, many other factors such as code execution speed and CPU load can result in lag but those are not caused by the programming language.

You can measure robot CPU load in LabVIEW using the RT Get CPU Loads block. I suspect you are running at or near 100% and missing tasks resulting in lag. I am not sure how to measure CPU loads in C++ but I suspect it is possible.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #49   Spotlight this post!  
Unread 17-03-2013, 15:47
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Which programming language does your team use?

Quote:
Originally Posted by mlbernardoni View Post
I don't know what overhead Labview puts on the program. But every student who drives the robot will tell you that there is a big difference, and it was obvious from watching the robot drive.

Same robot, same CRIO, same communications, official 2013 versions of labview and windriver, both very simple programs (1 joystick to 1 motor etc.). The only way to put it, moving the joysick to motor movement on the robot, c++ is much more responsive.
Having seen LabVIEW used for very precise control by many teams over many years, I'm not convinced that your experience indicates anything about LabVIEW in general. If you can post your simple programs, I'd like to see if you've done anything that might be causing the LabVIEW one to misbehave. (For example, there could be some simple error in your code which results in a cascade of diagnostic messages to the Driver Station, and those messages are quite capable of interfering with timely communication and control.)
  #50   Spotlight this post!  
Unread 17-03-2013, 16:10
mlbernardoni mlbernardoni is offline
Registered User
FRC #2704
 
Join Date: Mar 2011
Location: Batavia, IL
Posts: 11
mlbernardoni is on a distinguished road
Re: Which programming language does your team use?

That is the point, the programs were very simple and as close to identical as we could possibly program using Labview and C++ FRC required libraries.

We use Victors, all classes in the labview program are based upon the victor motor control block and all classes in C++ are based on the Victor base class in the WPI C++ library. (The victors on the robot go all the way from Red to Green, full power range with each program.)

The CRIO speed is what is set in the WPI base classes. We did not program for that with either C++ or Labview. (As I said, very simple programs using the foundations supplied by FRC and WPI.)

We used the same iterations per second in our C++ code as Labview uses.

Labview was completely compiled and downloaded to the CRIO, no extra communications. And we did not see any errors while running these simple programs.

We did not measure the CPU load, but I find it hard to believe the CPU was pegged with such a simple program.

But I agree with your objection, it comes down to the compiled code on the CPU. I do not know what overhead Labview adds (or for that mater the WPI library), but it is very noticeable on our robot.

We had 2 very very simple programs using the FRC required foundation for C++ and Labview.

As for teams not noticing any lag. Neither did we for the past 5 years. We are not saying that there is any error in Labview. We have successfully used Labview for years. And I will say we have had very complex programs that functioned very well.
  #51   Spotlight this post!  
Unread 17-03-2013, 19:05
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,766
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: Which programming language does your team use?

What people are pointing out is that your conclusion seems unlikely. If the code runs once every 20ms and uses the correct encoding for the motor controllers, there shouldn't be any measurable difference in driving. If you can think of other causes, then those too can be measured to determine if they differ and contribute to a difference in responsiveness.

Greg McKaskle
  #52   Spotlight this post!  
Unread 17-03-2013, 19:13
mlbernardoni mlbernardoni is offline
Registered User
FRC #2704
 
Join Date: Mar 2011
Location: Batavia, IL
Posts: 11
mlbernardoni is on a distinguished road
Re: Which programming language does your team use?

Try it out yourself and post any different result. As I said, the programs are very simple.
  #53   Spotlight this post!  
Unread 17-03-2013, 19:29
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,766
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: Which programming language does your team use?

The only explanation is that something was wrong with the LV code or something else changed, like the battery, or driving on linoleum instead of carpet, or another environmental issue.

If you post your LV code, I can easily run it to see what speed it is running at and verify that the speed controllers are being updated properly. Doing my own experiment will convince me, but will it really convince you, or others? It certainly won't if I fail to publish my data and my measurement methods.

Greg McKaskle
  #54   Spotlight this post!  
Unread 17-03-2013, 21:44
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Which programming language does your team use?

Quote:
Originally Posted by mlbernardoni View Post
Try it out yourself and post any different result. As I said, the programs are very simple.
I've written and run "very simple" tank drive FRC robot programs in both C and LabVIEW. I saw absolutely no difference in performance between them. You'll need to show us the program that you say has poor responsiveness, so we can try it ourselves and try to understand what's wrong with it.

Until I see what you're referring to, I'm not going to guess at what might be at the root of the problem. What I will do is point out something you said that confuses me:

Quote:
Originally Posted by mlbernardoni View Post
all classes in the labview program are based upon the victor motor control block
LabVIEW classes are not a typical tool used by FRC teams, they certainly wouldn't be used in a "very simple" program, and I'm not sure you could even base one on the Motor functions. Perhaps you meant something else?
  #55   Spotlight this post!  
Unread 18-03-2013, 10:04
mlbernardoni mlbernardoni is offline
Registered User
FRC #2704
 
Join Date: Mar 2011
Location: Batavia, IL
Posts: 11
mlbernardoni is on a distinguished road
Re: Which programming language does your team use?

Had to check with the team. The sample drive train programs from week 2 of the season are no longer available. We are competing next week and the week after, so too busy to re-create at the moment. Hopefully we will re-create after that.
  #56   Spotlight this post!  
Unread 18-03-2013, 17:17
brennonbrimhall brennonbrimhall is offline
Free Agent
AKA: Brennon Brimhall
no team
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Clifton Park, NY
Posts: 222
brennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to all
Re: Which programming language does your team use?

Java is taught at our school in AP Computer Science, but we also have sponsors that use LabView in robotics applications (GlobalFoundries for their AMHS system).

All three languages are very professional. Bad code will always be bad code no matter what/how/why you program – hence why awesome mentor support is so awesome .
__________________
Team 20, 2012-2014: 4 blue banners, 5 medals, and 9 team awards.
Church of Jesus Christ of Latter-day Saints, 2014-2016: Missionary, Colorado Denver South Mission.
  #57   Spotlight this post!  
Unread 08-04-2013, 18:44
davidzz123's Avatar
davidzz123 davidzz123 is offline
3478 Team Member
FRC #3748 (Lambot)
Team Role: Programmer
 
Join Date: Apr 2013
Rookie Year: 2012
Location: Mexico
Posts: 3
davidzz123 is an unknown quantity at this point
Re: Which programming language does your team use?

My team has used LabView since its foundation. We like the simplicity and the support that First gives to the teams.

We want to learn how to programm the robot in Java.
__________________
David Shugert
Programmer of Team Lambot 3478

Website:
teamlambot3478.com
Twitter:
twitter.com/TeamLamBot3478
Facebook:
facebook.com/TeamLamBot3478

Last edited by davidzz123 : 08-04-2013 at 18:47.
  #58   Spotlight this post!  
Unread 08-04-2013, 20:36
bulbajackel's Avatar
bulbajackel bulbajackel is offline
Programmin fo dayz
AKA: Chuck
FRC #2408 (Shrapnel Sergeants)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2011
Location: United States
Posts: 22
bulbajackel is an unknown quantity at this point
Re: Which programming language does your team use?

Quote:
Originally Posted by brennonbrimhall View Post
Java is taught at our school in AP Computer Science, but we also have sponsors that use LabView in robotics applications (GlobalFoundries for their AMHS system).
COMPUTER SCIENCE IN SCHOOL?!?!?! AWESOME! We use Labview though
__________________


"It's the programmer's fault"
  #59   Spotlight this post!  
Unread 08-04-2013, 20:41
bs7280 bs7280 is offline
Registered User
FRC #3734
Team Role: Leadership
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Lake Forest
Posts: 80
bs7280 has a spectacular aura aboutbs7280 has a spectacular aura aboutbs7280 has a spectacular aura about
Re: Which programming language does your team use?

Assembly, because thinks aren't complicated enough.

Just kidding, Java because it is more powerful than labview at times.
  #60   Spotlight this post!  
Unread 08-04-2013, 22:25
tcjinaz tcjinaz is offline
Tim
FRC #3853
Team Role: Mentor
 
Join Date: May 2011
Rookie Year: 2011
Location: Arizona
Posts: 206
tcjinaz has a spectacular aura abouttcjinaz has a spectacular aura about
Re: Which programming language does your team use?

Quote:
Originally Posted by bs7280 View Post
Assembly, because thinks aren't complicated enough.

Just kidding, Java because it is more powerful than labview at times.
Let's just start from bare metal. None of this froo froo HLL library-based stuff.
__________________
Software Mentor
3853 Pridetronics[

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 13:25.

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