Any help with programming?

The last two years we have used c++ for programming our robot. We have always had help with doing that, and this year we no longer have that help, and we’re not sure we can do it. So, we had heard LabView was possibly an easier option. So if anyone has some tips and could help us out in any way it would be greatly appreciated.

So you have 2 years of robot programming experience with C++, but presumably lost a programming mentor, and now you want to switch to a language you have no experience with (and still presumably no programming mentor)?

I’m assuming you have your last 2 years of C++ code. That can be used as a reference for this year. There aren’t any major changes.

Why do you think you can’t be successful with C++ this year?

Note: I’m not trying to turn you away from LabView, just curious as to why you would switch from something you have experience with, to something new. (Of course, learning new things is always a great thing!)

We struggle with LabView every year because we can never find any mentor that knows it. However we find them every year with C++ so look around more for one and don’t switch. That’s obviously my opinion.

We contemplated switching this year to C++ but decided to switch after competitions are over, even though we have a C++ mentor now.

We would like to stay with C++ but we don’t have a C++ mentor anymore, and we had heard that LabView was easier, and we might be able to get by on our own.
I am a sophomore, and barely have experience with C++, we also have a freshman who has some experience with it, but all of our seniors who did it in the past have left, and our programming mentor can no longer help us.
We really don’t know what to do…

Shoot me an email at (my username above) @usfirst.org

I can connect you with some people in MN who know LabView and will be able to help you.

Evan

It can be hard to do any programming (this applies to C++ or LabView) without experience… either an experienced mentor or an experienced student. I agree with the nighterfighter that you should not ignore the student experience and the existing source code from past years as good resources.

The best case scenario would be to find a mentor that can share some insight in C++ since that is where your current experience lies. Maybe inquire to some of the parents, if they do not have programming experience maybe a co-worker or somewhat more extended family member could help out. Or ask your sponsors if they might be able to help to find a programming mentor. Or maybe a local team that can share some insight too. You might be surprised that there are people out there waiting to be asked.

I am the programming mentor for our team and we do C++. Unfortunately we are not particularly local (we are in CT) but I would be happy to look at any code you are having trouble with and provide insight and direction if that will help. Feel free to pm me if I can help.

The bottom line is that you will have to make choices that work best for your individual team situation but don’t forget to ask because the answer might be around the corner.

Good Luck!

Its not really the code that we are having trouble with (although we still arent that good at it), we dont really know how to get started on C++, so we thought we would try LabView, because I agree with nighterfighter in that we would just use our old code and modify it… we just need some help…

To get started with C++:

Install Eclipse, and the FRC tools, and the update suite (https://wpilib.screenstepslive.com/s/4485/m/13810/l/145002-installing-eclipse-c-java)

The majority of your code will work the same this year as it did last year.

Could you post your code from last year? My guess is that all of it will work the same (except maybe some camera code, and any Dashboard sending code).

Drive code, joystick code, speed controllers (Talon, Jag, Victor, etc.) are all the same. I believe a few of the CAN features changed a little bit.

Here is a link for the porting from 2014 to 2015: (https://wpilib.screenstepslive.com/s/4485/m/13810/l/292213-c-java-porting-guide-2014-to-2015)

And also here is a complete list of the C++ WPILib documentation:
(http://first.wpi.edu/FRC/roborio/release/docs/cpp/)

If you need more help, let us know.

To start with, (assuming you have a chassis already built, even the kitbot is fine), I would recommend that you get 2 Talons/Jags/Victors hooked up using CAN or PWM, and get tank drive working (or arcade if you use that). Then slowly add a few things, such as a Spike Relay, and have a joystick control the different modes of the Spike (Forward, Reverse, Off). Then add a few sensors, like an encoder for example, and get some C++ code to do something with the encoder.

Labview is extremely easy to get started in, and there’s lots of FRC-specific documentation available to help you, such as Team 358’s website.

However, it’s much more desirable to use Eclipse this year because of the majority of teams are using C++/Java and you’ll have a lot more peer to peer help as well as mentor help.

Is this true?

Several years ago, WPILib was instrumented to help keep track of how teams were programming their robots. This data influenced the I/O numbers in the RFP from FIRST for the new control system. It also gave accurate measures of language usage and other feature usage.

Due to field configuration issues, this data was not captured last year.

The last time it was measured, in 2013, I believe a little over 50% of the teams used LV and Java was more common than C++. The only data collected last year was self-reported at events running the support site. My estimate was that last year, no language was over 50%. Java grew, LabVIEW shrank a bit and C++ shrank quite a bit.

So was the statement true for 2014? Truly, nobody knows. Will it be true for 2015? Time will tell. I can tell you in a few months, but not now.

As for the original post. You have support from CD with any tool you pick. Personally, just compiling last year’s code is not taking advantage of the opportunity that FRC is offering the students on the team. You should understand the code and mechanisms on your robot regardless of the tool or language you pick. If you are like most programming teams, you probably have about a week longer to explore your options, make a decision, and fully commit yourself to learning the tool, libraries, and sample code. Personally, I’d put the deadline at the end of the week at the school week.

Greg McKaskle

If you do decide to switch to LabView you can shoot me a PM if you ever need help. I’ve been using it for several years.

My team (originally 3288) actually switched from c++ to LabVIEW a few years ago and that original team and the one I mentor now (3937) have found LabVIEW to be much easier. (I’ve also been certified as an associate develepor)
If you make the switch, and you can’t find something in the documentation, shoot me an email at [email protected] and I’ll try to help you out.

Minnesota based teams are pretty evenly divided 1/3-1/3-1/3 between LabView and the curly brace languages.

That said, we’ve had trouble getting adequate LabView help at the MN regionals for teams.

Does anyone on your team know anyone at one of the companies listed at the link below? They might be a good source for help.

http://business.visitdetroitlakes.com/list/ql/computers-telecommunications-6

I’ve been a CSA at several competition events, and I try to keep track of what languages are being used. The first couple of years with the cRIO, they seemed about evenly spread, with Java trailing by a small amount. In the next few years, on average, LabVIEW and Java were each represented near 40%, with C++ teams making up the remaining 20%. Recently, Java seems to be increasing in popularity, at the expense of both of the other languages.

My impression is that C++ is much more popular among the “elite/powerhouse” teams. LabVIEW tends to be the language of choice for teams lacking either strong programming mentorship or school computer science courses. Java is used in Project Lead The Way, and that’s what I think is driving its increased adoption.

For the kind of group programming we end up doing on the TechnoKats, I prefer LabVIEW. I find that it’s much easier for people to get a sense for what the code is doing when they can “see” it instead of having to “read” it. The inherent parallel processing makes it less complicated to keep things modular, and there’s a big win in keeping simple typographical errors from being an issue.

The comprehensive example code and tutorials included with LabVIEW for FRC are also a big factor in making it the programming environment I would suggest for a team without an experienced C++ or Java mentor.

Sorry, the majority of teams at my local competition used C++/Java. Of course YMMV but that’s just what I’ve observed.

if you really are determined on changing languages, then i suggest LabView. its easy to use and in a string formal rather than line.

Alan - Thanks for your insight on this topic. This is a great description of the who and why of FRC programming languages.

I would also suggest looking closely before shifting from where your experience lies. If you have anyone on the team that has any understanding of previous year’s code, then I would suggest staying with C++. If you don’t, then you basically have a rookie programming team and you need to look to them to pick the language because they’ll have to do the work.
From my perspective - although >I< really dislike LabView - I have found that the kids seem to pick it up fairly well, and the online tutorials, etc. are good enough. Without a strong mentor and / or capable kids, any elaborate programming is out of the question, but drive train + basic control of specialty devices should be possible with at least one or two dedicated students.

i honestly dont like the new labveiw so if your using c++ dont switch