Go to Post I implore you to not spend your mental energy on preparing your argument for the inspectors. We all have better things to be thinking about and working on. - mrnoble [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 04-09-2009, 14:24
Ivan Helmrich's Avatar
Ivan Helmrich Ivan Helmrich is offline
Registered User
FRC #1775 (Tigerbytes)
Team Role: Mentor
 
Join Date: Nov 2008
Rookie Year: 2006
Location: Kansas City, MO
Posts: 73
Ivan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to behold
LabView/C++ equally capable?

A while back, there was a thread about autonomous camera tracking.

http://www.chiefdelphi.com/forums/sh...threadid=76991

There seemed to be a consensus forming that teams who had success getting the camera to track well enough used C++ and not LabView. This got me thinking about why this might be and what it means for the future of LabView as a programming option in FRC.

First, was that consensus correct? If so, will we see teams that really want to make the most of their controller abandon LabView or will more effort be put in by the LabView developers to provide comparable capability?
__________________
“The knowledge of what is relevant, what is not and the skill to cleverly work around or approximate solutions is the essence of engineering.” - James C. King
  #2   Spotlight this post!  
Unread 04-09-2009, 16:22
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: LabView/C++ equally capable?

There is a correlation here, but not causation (in my opinion).

C/C++ is a far more universally taught and utilized language than LabView in education and industry (not to mention in FIRST prior to 2009). Thus more programming students and mentors will have a high level of understanding with C++ than with LabView.

The result? More experienced programmers, who are more likely to use C++ as that is where there expertise tends to fall, are more likely to get camera tracking working.

As far as capabilities, be it LabView or C++ (or Java), it all boils down to the same FPGA configuration and assembly language. I don't buy that any FRC language is more or less capable than any other.
  #3   Spotlight this post!  
Unread 04-09-2009, 16:47
Ivan Helmrich's Avatar
Ivan Helmrich Ivan Helmrich is offline
Registered User
FRC #1775 (Tigerbytes)
Team Role: Mentor
 
Join Date: Nov 2008
Rookie Year: 2006
Location: Kansas City, MO
Posts: 73
Ivan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to behold
Re: LabView/C++ equally capable?

Jared, good points. I had considered that it might be a matter of familiarity as you suggest but I would have expected at least some reported success with LabView. I agree that the actual language should not be the limiting factor.

I'm wondering if perhaps the readability of C++ vs. the "black box" nature of LabView has something to do with it. I tried to dig into the LV to see how the video was processed and got pretty discouraged pretty fast.

The question still stands though regardless of cause. Will the correlation drive a change in behavior regarding language selection? I guess my hope is that the video capability provided is adequate in all languages so that a team might concentrate on how to put the data to work controling a robot and not on how to get a basic functionality working.

Ivan
__________________
“The knowledge of what is relevant, what is not and the skill to cleverly work around or approximate solutions is the essence of engineering.” - James C. King
  #4   Spotlight this post!  
Unread 04-09-2009, 20:29
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: LabView/C++ equally capable?

Quote:
Originally Posted by Ivan Helmrich View Post
I'm wondering if perhaps the readability of C++ vs. the "black box" nature of LabView has something to do with it. I tried to dig into the LV to see how the video was processed and got pretty discouraged pretty fast.
I think this is part of it, too. There is something about engineers that makes us inherently suspicious of black boxes. Sometimes this is a good thing, but it also means that we can be stubborn to accept a good off the shelf solution to a problem. Case in point, you wouldn't believe the number of times a subcontractor on a software project has supplied me with their own implementation of a C++ "vector" class. And as much as I trust that my subs are competent, the odds of them writing a bug-free vector class faster than the Standard Template Library's implementation are very slim.

Quote:
Originally Posted by Ivan Helmrich View Post
Will the correlation drive a change in behavior regarding language selection?
I believe that in many cases, it already has. Our students learn C++ from experienced programming mentors who know C++. I generally encourage rookie teams to use C++ because if they have a problem, I will know how to help.
  #5   Spotlight this post!  
Unread 04-09-2009, 21: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,751
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: LabView/C++ equally capable?

Quote:
Originally Posted by Ivan Helmrich View Post
I'm wondering if perhaps the readability of C++ vs. the "black box" nature of LabView has something to do with it. I tried to dig into the LV to see how the video was processed and got pretty discouraged pretty fast.
The vision kernels are in fact a .out file, and are equally black box to all languages, as is the FPGA. If you'd like to ask questions about the LV or C++ image processing, I'll be happy to shine some light on them. I think very quickly, we'll rediscover that there are a few layers of user native language code, and below that you jump into a library. This is the case for all of WPILib.

Greg McKaskle
  #6   Spotlight this post!  
Unread 05-09-2009, 13:11
Eugene Fang's Avatar
Eugene Fang Eugene Fang is offline
The Blue Alliance
no team
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Bay Area, CA -> Pittsburgh, PA
Posts: 769
Eugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond repute
Re: LabView/C++ equally capable?

Quote:
Originally Posted by Ivan Helmrich View Post
Jared, good points. I had considered that it might be a matter of familiarity as you suggest but I would have expected at least some reported success with LabView.
Our team (604) used LabView this past year, and we were fairly successful at getting our turret to lock in on our target. We had a potentiometer on the turret, so the camera took a frame, figured out how many degrees right/left to turn, and we used the potentiometer to servo to the position.

We also can shoot in autonomous mode (http://www.youtube.com/watch?v=SmXBMmEgfbI)

However, we do not have any comparison to how fast other robots' turrets center on their target, etc., so I don't know how "successful" we actually were, compared to others.

Here is another video of a test chassis tracking the target with LabView to compare with other teams' speeds. Note that it was only a couple hours of work, so the tuning could have been better.
http://www.youtube.com/watch?v=M84hL57QUvg
__________________
Eugene Fang
2010 Silicon Valley Regional Dean's List Finalist

Various FLL Teams - Student (2000-2006), Mentor (2007-2010)
FRC Team 604 - Student (2007-2010), Mentor/Remote Advisor (2011-2015)
FRC Team 1323 - Mentor/Remote Advisor (2011-2014)

The Blue Alliance | TBA GameDay | TBA Android App

Last edited by Eugene Fang : 05-09-2009 at 13:13.
  #7   Spotlight this post!  
Unread 05-09-2009, 14:22
Kaushal.K's Avatar
Kaushal.K Kaushal.K is offline
Scouting & Things
AKA: kkaboose
FRC #1241 (THEORY 6)
Team Role: Mentor
 
Join Date: Dec 2006
Rookie Year: 2007
Location: Toronto, ON, Canada
Posts: 42
Kaushal.K is an unknown quantity at this point
Thumbs up Re: LabView/C++ equally capable?

Team 1241 used LV to program in Lunacy. We also were able to get the Camera to track the target, with a fair bit of success at FLR and GTR.

Thanks to Ben Zimmerman and Team 843, without whose teachings and assistance we would be at a great loss, and also to Greg McKaskle and everyone on CD who has provided us with so much help.
__________________
FRC Volunteer Coordinator (2015 - Present)
FRC Robot Inspector (2012 - Present)
FRC 1241 - Alumni & Mentor (2007-Present)

Last edited by Kaushal.K : 06-09-2009 at 00:07. Reason: spelling mistake
  #8   Spotlight this post!  
Unread 05-09-2009, 17:02
EricH's Avatar
EricH EricH is online now
New year, new team
FRC #1197 (Torbots)
Team Role: Engineer
 
Join Date: Jan 2005
Rookie Year: 2003
Location: SoCal
Posts: 19,789
EricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond repute
Re: LabView/C++ equally capable?

Different people prefer different tools and different methods with the same tool to do the same job. If they produce similar-quality work for similar prices, should we care which method they use, all other things being equal?
__________________
Past teams:
2003-2007: FRC0330 BeachBots
2008: FRC1135 Shmoebotics
2012: FRC4046 Schroedinger's Dragons

"Rockets are tricky..."--Elon Musk

  #9   Spotlight this post!  
Unread 06-09-2009, 17:53
rfolea's Avatar
rfolea rfolea is offline
Registered User
AKA: Rick Folea
no team (Forsyth Alliance)
Team Role: Mentor
 
Join Date: May 2005
Rookie Year: 2005
Location: US
Posts: 210
rfolea has a brilliant futurerfolea has a brilliant futurerfolea has a brilliant futurerfolea has a brilliant futurerfolea has a brilliant futurerfolea has a brilliant futurerfolea has a brilliant futurerfolea has a brilliant futurerfolea has a brilliant futurerfolea has a brilliant futurerfolea has a brilliant future
Re: LabView/C++ equally capable?

Use the tool that is most comfortable for you.

I believe that ALL of the teams that got the camera to work at the Peachtree Regional used Labview.

As a C++ die hard I was reluctant to use Labview. But when I saw how quickly the kids picked it up and how easy it was to teach, and how little trouble we had getting things up and running - I was sold.

We used to spend a LOT of time debugging missing semi colons, etc - so much so the kids would get bored and completely loose the point. Last year the kids were able to program the entire thing themselves with very little adult help. I've never had that experience with text based languages... They enjoyed it so much they even did some side projects.

Very pleased with the whole experience.

We'll be using LV again this year.
  #10   Spotlight this post!  
Unread 07-09-2009, 00:43
Ivan Helmrich's Avatar
Ivan Helmrich Ivan Helmrich is offline
Registered User
FRC #1775 (Tigerbytes)
Team Role: Mentor
 
Join Date: Nov 2008
Rookie Year: 2006
Location: Kansas City, MO
Posts: 73
Ivan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to behold
Re: LabView/C++ equally capable?

Thanks to all who replied, I wasn't looking forward to making a switch to C++ but thought it might be wise given what I read in the thread I referenced. I'll stick with the LV and see if I can get more out of it. Pretty much everything but the camera worked well for us last year so I know where to concentrate my efforts.
__________________
“The knowledge of what is relevant, what is not and the skill to cleverly work around or approximate solutions is the essence of engineering.” - James C. King
  #11   Spotlight this post!  
Unread 07-09-2009, 09: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,751
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: LabView/C++ equally capable?

Your initial question is a reasonable one. I suspect this will be a perennial topic aimed at identifying what will lead to more success, and a particular technology or approach is always an easy difference to gravitate towards -- similar to the wood vs aluminum, six wheels vs four discussions.

To make progress on improving vision, what part of the camera code worked, what didn't? Any questions that you want to ask?

Greg McKaskle
  #12   Spotlight this post!  
Unread 07-09-2009, 10:59
Ivan Helmrich's Avatar
Ivan Helmrich Ivan Helmrich is offline
Registered User
FRC #1775 (Tigerbytes)
Team Role: Mentor
 
Join Date: Nov 2008
Rookie Year: 2006
Location: Kansas City, MO
Posts: 73
Ivan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to beholdIvan Helmrich is a splendid one to behold
Re: LabView/C++ equally capable?

The problems I had with the vision code was frame rate and repeatable performance. Sometimes one color would be picked up, sometimes both. I tried the various changes in values that were suggested in a couple of threads here on CD but never got anything stable enough to rely on.

To be honest, we ended up bailing on trying to use vision for any automation about half way through the build. There were other, non-control issues that needed more attention. I had followed a couple of discussions on the camera but I couldn't dedicate the time to try all of the suggestions. Part of the reason for my original question was that I couldn't find anything in the LV implementation that that would have lead me to some of the methods people seemed to be talking about and so assumed, apparently wrongly, that the C++ code or perhaps comments was more descriptive of the process, less black box like, and that was part of the success some were having.

I was looking for a frame rate somewhere in the 20 fps range. I don't think we got out of single digits. The things I remember reading that should have helped are:
More light
Lower resolution
Turning off some things in the 2 color vi.
There was also some LV specific issue where the code would only process every other frame, I forget the specifics.

The purpose of the thread was to ask the question. If it will be instructive for many of us to change it to a discussion of how to get good camera performance, great. Since many teams are probably starting back up with the new school year, perhaps it is a good time to do this.

So, what really has to change in the 2 color demo to get the frame rate up? Once I can get that working, then I'll work on the reliability.

Thanks,

Ivan
__________________
“The knowledge of what is relevant, what is not and the skill to cleverly work around or approximate solutions is the essence of engineering.” - James C. King
  #13   Spotlight this post!  
Unread 07-09-2009, 13:17
Eugene Fang's Avatar
Eugene Fang Eugene Fang is offline
The Blue Alliance
no team
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Bay Area, CA -> Pittsburgh, PA
Posts: 769
Eugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond repute
Re: LabView/C++ equally capable?

Quote:
Originally Posted by Ivan Helmrich View Post
So, what really has to change in the 2 color demo to get the frame rate up? Once I can get that working, then I'll work on the reliability.
Well, the main things we changed were setting the resolution to 160x120 (set in Begin.vi if you're using the advanced framework, i believe) and disabling the "mask display" in the 2 color demo. These two should improve your FPS.

A tip on getting the lighting to work under various lighting conditions:
for the HSL values, define H (hue) as narrow as possible but keep the S and L values relatively wide and set the "brightness" control to automatic (in Begin.vi). That way if the lighting changes you will still be able to track. It's kind of a balance between tracking robustness and picking up extra noise (although the noise sholudnt be that big of an issue because its unlikely that you will have two large blobs of "noise" of green and pink one on top of the other)

During the season we had it set on a fixed brightness and very closely defined HSL values. At SVR it worked great because of the lighting consistency but at Atlanta, the semi-transparent roof cover screwed us up badly.

Hope this helps!
__________________
Eugene Fang
2010 Silicon Valley Regional Dean's List Finalist

Various FLL Teams - Student (2000-2006), Mentor (2007-2010)
FRC Team 604 - Student (2007-2010), Mentor/Remote Advisor (2011-2015)
FRC Team 1323 - Mentor/Remote Advisor (2011-2014)

The Blue Alliance | TBA GameDay | TBA Android App
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
Labview 8.5 vs. FRC Labview 8.5 pyr0b0y NI LabVIEW 0 01-02-2009 22:20
Labview tseres Programming 2 23-05-2007 00:27
can bots with omni wheels capable of going up robots? Tri_Lam Technical Discussion 12 13-01-2007 16:15
Is this hardware capable of balance? sanddrag Electrical 15 02-08-2005 15:36


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

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