Log in

View Full Version : Why Windriver?


davidthefat
19-01-2011, 02:15
Why? I want to know why FIRST chose Windriver. Is it because of marketing deals? It's restricted by licensing agreements. Why can't aren't 3rd party IDEs like CodeBlocks officially supported? CodeBlocks is flexible; it supports lots of compilers from GCC to TurboC++. I don't see a problem having the specific compiler for the cRio to work with CodeBlocks. I believe that the Open Source softwares are better fit for FIRST's mission than a company that owns proprietary software. NetBeans is open source, which is good. One reason why my team is not using C++ is the fact that WindRiver is a pain. Same goes for LabView... I personally think this competition needs to step away from specific companies to a wide variety of companies. Like having an option for an ARM based processor instead of cRio, or an AVR based. Yes I know the issue of "standardization" and "safely communicating". They can go the extra mile to support other hardware. Its not that radical of an idea.

Edit: Also why not Linux in replacement for VxWorks?


Oh I will be releasing our source code online later in the season.

sjspry
19-01-2011, 02:59
Yeah, it kinda bugs me I can't program the cRIO from my Linux computer with C++ (I have to use Java, which I guess isn't that bad).


FIRST probably doesn't have a good reason for the choice. When FIRST was created or as it progressed, companies would jump at the chance to get people -- not working for a profit -- to use their products. There's also some people who actually believe anything 3rd party is not to be trusted.

I think part of your question, though, deals with what the cRIO can be... er... fundamentally programmed(?) with. I just tried looking really quick, but it seems like VxWorks is what is locked on there as per National Instruments. This is probably the big stumbling block on the road to using other compilers, as it would make sense to believe there's a few libraries that need to be linked in (you could probably get it working, though, it might just be "illegal").

I do not, however, assume FIRST and the competition could be possible without the cRIO. I haven't found a good platform to substitute in for it, and as long as we're using the cRIO, provided by National Instruments, we're probably going to have to use a whole lot of other proprietary software.

On a personal note, I myself am rather irked by how closed the cRIO and the general development process seems. I've had a hell of a time getting around NIVision (and had to end up connecting the Camera to the bridge to get anything done...).

gvarndell
19-01-2011, 06:20
Why? I want to know why FIRST chose Windriver.

Wind River is providing a complete, highly integrated, software development, runtime, and debug environment.
At NO cost to FIRST teams.
And you simply dismiss it because you can't use your latest gee-whiz-this-is-so-cool 'free' IDE of the week?

When your brain feels full, that doesn't mean you know everything.

ebarker
19-01-2011, 07:56
Edit: Also why not Linux in replacement for VxWorks?

FIRST is not in the software business. They have a different mission and vision.

If you are passionate about open source then you can help the community by not complaining but creating an alternate development environment.

You personally will have to pick up the torch and do the job. That is the way the open source environment works. Open source, volunteer driven, and you can lead the way.

Most of the work is already done for you, all you have to do is integrate it and support it. Under the hood the compilers are gcc cross compilers for power pc. You can download these build environments from many sources for free and host it on linux, windows, or mac boxes.

If you choose you can use an old style Make file for use an integrated IDE like eclipse, or another of your choosing.

enjoy

davidalln
19-01-2011, 08:50
I've had very little trouble with Windriver once it is set up. I think people are too quick to jump on software just because its trendy and open source. Proprietary software has its place. Here, Windriver works because of how closely integrated it is with vxWorks, which allows us students to work with an operating system that is easy to learn but, at the same time, is used in the real world. Also, it makes sure that any bugs in the system will be promptly solved by paid employees, as opposed to asking an open source community with no tangible stake in the development.

Plus, Windriver itself is an extension of Eclipse, the notable open source IDE. So almost all of the source of Windriver is online for anybody to see.

Greg McKaskle
19-01-2011, 08:50
Wow. Where to start.

WindRiver is the supplied C++ tool because VxWorks is the realtime OS that has been used on the cRIO for the last ten years. Targeting a piece of HW is a bit harder than choosing how you type text and where the compile button is located. The libraries and drivers for supporting the hardware have been engineered by WindRiver to be far more realtime than what you will find on desktop OSes. This is a huge investment, and is why VxWorks is highly regarded as a realtime OS vendor. The landscape is constantly changing, but NI chose to use VxWorks because it made our customers happy and allowed the cRIO perform tasks it otherwise couldn't.

It is possible to use other code tools to target the VxWorks environment, and at NI, many of the developers subset the IDE, using only the command line or using the IDE for source, but not the debugger, etc. It is a matter of preference and efficiency. When your paycheck and your coworker's paycheck depend on getting the job done, you need to learn to evaluate what each element brings to the table. What are the good and bad aspects of different tools, etc. If something irks you, but works well, more than likely, you change your habits rather than the tool. Also, it is an ongoing evaluation. You always look around for the thing that will let you do more, do it better, or do it faster.

Is OpenSource an option? Absolutely. If you go to ni.com/linux, you will see a listing of products we offer. Also, some open source libs are amazing and are incorporated into NI products. LV extended and has shipped the Mesa OpenGL engine for twelve or so years, as an example. But again, choosing an OS is a bit more complicated, and isn't a static decision. Linux is evolving and it may be an option in the future. I used free and open SW before GPL and other licensing manifestos came about, and I have to say that I preferred it without the strings. I'm not sure I understand how they made things better.

As for using more HW, you have options. FIRST lets you use coprocessors and circuits to enhance your robot. FIRST is also trying to make things a bit easier and a great deal safer, so elements such as the battery, motors, and safety are top priority. If/when there is a way to do that with other products, I suspect you'll see it. In the meantime, this is just part of the game -- same for all.

As for open source, I'm curious why open source tools are any better for FIRST than proprietary ones? Does gimp sponsor your regional? Does Linus Torvalds sponsor your team? It'd be cool if they did, but do you see my point? FIRST is one of the most effective organizations I've ever seen at organizing volunteers and getting things done for free, and I suspect they do things this way for a reason. Meanwhile, if you look into the licensing agreements of the tools in the kit, you will see the influence of open source. It is a real factor in the market today, but not in the "I will isolate myself and only use open source" sort of way.

Finally, as for LV, my guess is that you still haven't even tried it. If you are interested in computer science, I'll once again encourage you to take full advantage of the kit. Learn how to use generics in C++, objects in Java, and wires in LV. Also, learn how to use a multimeter, put on a chain, prove an algorithm, model the forces on an arm. Learn how to lose an argument without going to forums to complain about your team and mentors. Learn how to teach and be taught. Keep asking why, but make sure that you do it in a nice way.

Greg McKaskle

Roger
19-01-2011, 09:02
And Robo-COBOL! Why no Robo-COBOL? The punchcards (http://upload.wikimedia.org/wikipedia/commons/2/23/Punch-card-cobol.jpg) alone made it C:cool::cool:L!

So is it safe to say, "if you want it go ahead and write it -- the cRIO will take it"?

I had more, but everybody typed faster than me. :)

ebarker
19-01-2011, 09:05
Wow. Where to start.


Wow. What a great post. Really !! Ought to be sticky'ed.

Alan Anderson
19-01-2011, 09:12
...take full advantage of the kit. Learn...learn... Learn... Learn...in a nice way.

I'll add one more suggestion: avoid posting at 2:15 in the morning. It's too easy to lose one's grace at that hour.

Joe Ross
19-01-2011, 12:18
The I in FIRST stands for Inspiration. What is more inspiring, using a free IDE and compiler and a $50 AVR board that anybody can access, or using real tools that are used in industry? At my company, we use both LabVIEW and Windriver/vxworks extensively. While you might get exposure to one of those in college, FIRST is probably the only way for a high school student to be exposed to these professional tools.

You might be interested in Wikipedia's Notable Products using VxWorks (http://en.wikipedia.org/wiki/VxWorks#Notable_products_using_VxWorks), for example, the Boeing 787, Honda's ASIMO, and the Spirit and Opportunity Mars Rovers.

tonystark_23
19-01-2011, 12:40
Greg McKaskle, I salute you! And I for one thank National Instruments tremendously for all that they provide to FIRST (for free). FIRST wouldn't be the amazing program it is without you guys.

andreboos
19-01-2011, 13:00
Yeah, it kinda bugs me I can't program the cRIO from my Linux computer with C++ (I have to use Java, which I guess isn't that bad)


I've extended another user's toolchain (can't find the post) for compiling, linking, and deploying code to the cRIO on Linux (including WPILib). It's not polished, user-friendly, or advanced enough from the original toolchain (works with 2011 WPILib though) enough to seem worth posting to CD as a separate release, but if you're interested I can link you to our repository.

davidthefat
19-01-2011, 18:34
Wow. Where to start.

WindRiver is the supplied C++ tool because VxWorks is the realtime OS that has been used on the cRIO for the last ten years. Targeting a piece of HW is a bit harder than choosing how you type text and where the compile button is located. The libraries and drivers for supporting the hardware have been engineered by WindRiver to be far more realtime than what you will find on desktop OSes. This is a huge investment, and is why VxWorks is highly regarded as a realtime OS vendor. The landscape is constantly changing, but NI chose to use VxWorks because it made our customers happy and allowed the cRIO perform tasks it otherwise couldn't.

It is possible to use other code tools to target the VxWorks environment, and at NI, many of the developers subset the IDE, using only the command line or using the IDE for source, but not the debugger, etc. It is a matter of preference and efficiency. When your paycheck and your coworker's paycheck depend on getting the job done, you need to learn to evaluate what each element brings to the table. What are the good and bad aspects of different tools, etc. If something irks you, but works well, more than likely, you change your habits rather than the tool. Also, it is an ongoing evaluation. You always look around for the thing that will let you do more, do it better, or do it faster.

Is OpenSource an option? Absolutely. If you go to ni.com/linux, you will see a listing of products we offer. Also, some open source libs are amazing and are incorporated into NI products. LV extended and has shipped the Mesa OpenGL engine for twelve or so years, as an example. But again, choosing an OS is a bit more complicated, and isn't a static decision. Linux is evolving and it may be an option in the future. I used free and open SW before GPL and other licensing manifestos came about, and I have to say that I preferred it without the strings. I'm not sure I understand how they made things better.

As for using more HW, you have options. FIRST lets you use coprocessors and circuits to enhance your robot. FIRST is also trying to make things a bit easier and a great deal safer, so elements such as the battery, motors, and safety are top priority. If/when there is a way to do that with other products, I suspect you'll see it. In the meantime, this is just part of the game -- same for all.

As for open source, I'm curious why open source tools are any better for FIRST than proprietary ones? Does gimp sponsor your regional? Does Linus Torvalds sponsor your team? It'd be cool if they did, but do you see my point? FIRST is one of the most effective organizations I've ever seen at organizing volunteers and getting things done for free, and I suspect they do things this way for a reason. Meanwhile, if you look into the licensing agreements of the tools in the kit, you will see the influence of open source. It is a real factor in the market today, but not in the "I will isolate myself and only use open source" sort of way.

Finally, as for LV, my guess is that you still haven't even tried it. If you are interested in computer science, I'll once again encourage you to take full advantage of the kit. Learn how to use generics in C++, objects in Java, and wires in LV. Also, learn how to use a multimeter, put on a chain, prove an algorithm, model the forces on an arm. Learn how to lose an argument without going to forums to complain about your team and mentors. Learn how to teach and be taught. Keep asking why, but make sure that you do it in a nice way.

Greg McKaskle

Ok where I was coming from is why must FIRST distribute a software with a license? The license expires soon after the competition. How can one practice if they do not even have access to the software? That is what troubles me. I rather have a pure command line interface that I can use anytime than a limited GUI IDE that I can use for only 3 months. I like how Netbeans does not need a license and that you can use it 365 days a year without any activation of any sort. I believe I miscommunicated my point. Sure I do have bold opinions and some of you are getting annoyed by it. Like I said before, I rather have kids question than follow with ignorance. Asking questions is the first step to new discoveries and if you withhold asking questions, you are stifling innovation and discovery.

ebarker
19-01-2011, 19:14
FIRST does not issue or manage the licenses. The licenses are held and manages by the IP owner. The licenses for WindRiver and Labview are for the full calendar year. Labview is a year plus a few days. A broad suite of professional grade software products is provided to FIRST students. The licenses are valid for a full year and in some cases three years.

Students can and do use these products the full calendar year without issue. These products are not limited but are fully capable and well beyond the capacity of most students and mentors knowledge and capability.

If you would take the time to install the products and actually read the license agreement then you will be much better prepared to make your point, whatever your point is.

If you will take the time to research the issue you will find a ton of professional grade titles available free or at a very reduced cost, for both high school AND college students. What is available today is stunning compared to 30 or even 10 years ago. You have an opportunity here to learn things that most of the population of the world has never had in history. Like Greg said, take advantage of these opportunities and learn all that you can about the products and about product design.

Asking questions is ok. Doing your research before asking the question is much better and will allow you to ask much more productive questions. It's much easier to ask a bold question if you have thoroughly researched your topic, otherwise it makes one look a little silly.

StevenB
20-01-2011, 00:08
Sure, if I was designing the FRC control system from the ground up with no restrictions, there are a lot of things I would do differently. But if an industry leader came to me and offered millions of dollars worth of hardware and software - hardware and software which is used by professional engineers in numerous settings - I'd find a way to make it work. And I believe that's what FIRST has done. It would be easy to criticize FIRST and suggest that they've sold out to NI or WindRiver, but the reality is that this kind of partnership is exactly their mission. Their goal is not to create an awesome robot control system, but rather to show high school students that engineering is an exciting and attainable career. If that includes using proprietary tools common in industry, then so be it.

I'm a big fan of open source. I run Linux on my desktop and use it almost exclusively. I've even helped write code for open-source projects. But I'm also a big fan of some proprietary software, including LabVIEW - and there's no way I would have gotten this experience apart from FIRST.

To take a quick example: In my university's electronics lab, we've got a set of standard lab equipment (Agilent multimeter, power supply, and waveform generator, Tektronix scope) with PCs running LabVIEW. Because I've been using LabVIEW since my FLL days eleven years ago, it was a simple matter to connect the equipment to the PC and create some cool VIs for my lab work. I can characterize motors, create Bode plots, test transistors, and a thousand other things - just by writing a simple VI. None of my classmates know how to do this; in fact, none of my professors know how to do this.

How many college students can say they've been using LabVIEW for eleven years?

ebarker
20-01-2011, 20:58
How many college students can say they've been using LabVIEW for eleven years?

That is a stunning statement. That a student can have 11 years of exposure to Labview or any language before they graduate.

Back in the day...being able to easily do what you just described was a pipe dream, a fantasy.

Over 25 years ago I worked for a company and was charged with developing our in-house version of a product similiar to Labview. After spending many man-years worth of corporate wealth we released this product and about a week later Labview 1.0 came out.

Many people do not really understand what a gift to students Labview, PTC, Autodesk, and others have provided.

jhersh
20-01-2011, 21:12
To take a quick example: In my university's electronics lab, we've got a set of standard lab equipment (Agilent multimeter, power supply, and waveform generator, Tektronix scope) with PCs running LabVIEW. Because I've been using LabVIEW since my FLL days eleven years ago, it was a simple matter to connect the equipment to the PC and create some cool VIs for my lab work. I can characterize motors, create Bode plots, test transistors, and a thousand other things - just by writing a simple VI. None of my classmates know how to do this; in fact, none of my professors know how to do this.

How many college students can say they've been using LabVIEW for eleven years?

That's very cool!

davidthefat
21-01-2011, 00:37
I am on the other side of the spectrum when it comes to career choice. I want to be working on research and creating computer architectures and then creating the OS and compilers, assemblers and stuff like that. I want to work on stuff like supercomputers and distributed computing systems, quantum computers and cool biz like that. I actually want to make robots that use a distributed memory computing systems. Now this is not a farfetched goal. By the time I graduate college and go into grad school, it would be the norm if the pace is the way it is now. So these tools would be invalid to me because I would be creating similar software. I like open source because I can look at the source and learn.

Then after all that, I want to be a professor. Now seems like a very strange life, but it appeals to me. It is the equivalent to playing in the NFL, but for computer geeks.

That is the reason why I was pretty disappointed with the FRC. I wanted to learn how to do all that low level stuff. I thought it was literally get a bunch of electrical components and soldering them together and making everything from scratch. Its not what I was looking for, but hey, beggars can't be choosers.
By the time I graduate college, I would have had 10 years of C++ experience under my belt... But will that experience help in the world of super low level programming?

davidalln
21-01-2011, 00:57
But will that experience help in the world of super low level programming?

Your statement above is akin to joining the football team, and being disappointed that you didn't end the season a basketball star. There are many different subsections in computer science; FRC focuses on robotic manipulation, computer sensing, and HCI. All of these are rich fields that I have found are able to be explored through my experience working with the bot.

I'm confused on why you think because FIRST uses proprietary software for its control system you feel restricted in your ability to learn about OS architecture and compilers. There are plenty of books, journals, and online resources available to explore these topics. Use them! Write your own compiler for fun! FIRST isn't stopping you, and neither is its lack of open source software. Plus, if you really want to get into those subjects, poke around in the lower level workings of vxWorks. Mess with multithreading and optimization! FIRST hasn't supplied some dumbed down OS designed just for the competition. Interested in compilers? Windriver compiles using gcc, the most widely used completely open source C compiler out there. In fact, here's the link to the source! (http://gcc.gnu.org/viewcvs/trunk/) Poke around to your heart's content!

I'm with you. My interests don't exactly align with what FIRST offers. When I enter college next year, I hope to focus on computational theory and artificial intelligence. These subjects are why CS appeals to me. But I've found that FIRST teaches way more than simply a programming-based skillset. I've learned way more about working with a team and under extreme pressure than I have about CS, per se. And along the way, I've learned tons about robotics that I would not have had the opportunity to explore otherwise, and have enjoyed some of the greatest experiences of my life.

This isn't a open source/closed source argument. I just think you're missing the point.

sjspry
21-01-2011, 01:35
I seem to be the only person that agrees with davidthefat on this issue. I don't believe many people here have tried to do anything they "weren't supposed to" yet.


Your statement above is akin to joining the football team, and being disappointed that you didn't end the season a basketball star. There are many different subsections in computer science; FRC focuses on robotic manipulation, computer sensing, and HCI. All of these are rich fields that I have found are able to be explored through my experience working with the bot.


I think you are reading too far into his response (although, true, it's the only thing we have to go on) and trying to disregard the problem of closed source, albeit widely used, systems on the cRIO. If I know where he's coming from, that is the most logical train of thought to tell people (not saying this isn't what he actually wants to do); in essence, however, no matter how "open" VxWorks is supposed to be, it's still rather limited.

Example: I wanted to bypass NIVision and skip the hassle of trying to train it to work in variable conditions (having it actually recognize something here, and then at the competition, are two different things) and substitute in a much simpler, static algorithm. On the presumption I can access raw images received from the camera, I start looking at the dashboard code to see if I can markup the image and send a modified one.

I come to find out I can't directly access the image sent to the dashboard (and what I wish to do is more than draw boxes on it), so I put a custom dashboard in the back of my mind as something I needed to do. I can live without the feed for now.

Right, next step, getting the image. After a day and a half of looking, I come to find out I can't actually bypass NIVision's access to the image. I looked around a while and found out the new radio is a combo bridge/access point. I plug the camera into the router instead of the cRIO and access it as such. After searching for a JPEG decoding routine, it turns out to be too slow (the cRIO doesn't use a very current VM at all).

I end up moving all the image processing to the computer, and am developing from there. Anyway, this was all a really fun process, the cRIO is totally open and accessible!


Mess with multithreading and optimization!


Those are considered rather high-level concepts. Optimization can take place in machine code, but it is usually done at the source level (and the only application I can see of optimization to FRC is source-level). The implementations of these concepts, however, are what he mentions, and there is no way to implement either (or need to) for the FRC.


FIRST hasn't supplied some dumbed down OS designed just for the competition. Interested in compilers? Windriver compiles using gcc, the most widely used completely open source C compiler out there.


Arguably, they have. There is no way to access the internals of anything (should you so desire). You are also not free to see how they do it.

I'm assuming the second part about compilers is a separate thought, but either way, it's still a tenuous link at best.


Too long; didn't read it? "It just bugs me."

@davidthefat: Hope my presumptions about you don't offend, I'll explain them in more detail if you want. Personally, the only thing I can tell people (that makes sense to them) when asked about why I want to know how something works is similar response to your own.

davidalln
21-01-2011, 02:45
@sjspry I think you misunderstood the purpose of my post (although perhaps I was not clear, my writing tends to be long-winded and confusing). I wrote it in direct response to davidthefat's most recent post, in which he seemed concerned that FIRST has limited his ability to immerse himself in the categories of Computer Science he finds most interesting. I was questioning what this had to do with the closed source/open source argument, and offered my own insights on how to use the tools FIRST gives to study the lower levels of computers.

It's funny that you mentioned the camera drawing, because I implemented something similar over the summer. I'm confused with how much trouble you had getting the JPEG image. I was able to find the solution fairly quickly. To do so, I looked at the WPILib C++ library for the Axis Camera (an open source library that can easily be browsed on FIRST Forge), and saw that all it did was use vxWorks's socket library to pool the server set up on the Axis Camera and stream the JPEG into a buffer which gets sent to the DS. Now, editing the image is a different problem, but there are plenty of open source drawing libraries that can assist in that. I've found that, in this certain instance, the openness of FIRST has allowed me to solve the problem without any interference or barriers.

In response to your comments on optimization, yes, it is written at the highest level. However, you need a deep understanding of how vxWorks processes and prioritizes all the work necessary to complete the program to successfully create the fastest code possible. There are plenty of ways you can implement this, as well as multithreading, in FIRST again utilizing the power of the well documented vxWorks operating itself. Just because its not laid out nicely in WPILib or LabVIEW VIs doesn't mean its blocked off from accessing and impossible to implement.

I disagree with your comments on the OS. Personally, I don't find it unnecessarily limiting that you cannot openly access every part of the file system on the cRIO. FIRST needs to ensure some level of consistency across teams for competitions and field connectivity to run smoothly. There is absolutely no need to access this level of the cRIO and, although I would certainly find it interesting to dissect the internals of the field management system, it is for the greater good of the competition that this is left secure.

(the compiler statement was in response to his wish to work on and study compilers, to which I pointed out that FIRST uses an open source compiler if he wants to see how the inner workings of how one works).

And, if the opportunities FIRST has presented to you cannot satisfy what you're looking for, the option to place a computer on your robot this year can fulfill that gap. Look into using a Gumstix (http://www.gumstix.com) minicomputer (which by default has a flavor of ARM Linux installed), or building your own, to outsource some of your robot control system. Here you can get literally as low level as you want, even writing in pure machine code if you truly desire. Send data through ethernet back to the cRIO, and make your robot do sick things.

tl;dr "FIRST is more open than you think"

dtengineering
21-01-2011, 02:55
Generally I'm pretty pleased with FIRST. Pleased enough to have stuck around for seven or eight years. Last time I looked, no one was being forced to play the FRC game or use the FRC software. (Can you hear the "but..." coming?)

While I appreciate the donation of software, I also recognize that the support is a blend of philanthropy and shrewd marketing. Giving the software to students and teams that could never afford to buy it does not reduce the sales base for the software, comes at a very low marginal cost, and results in having your product exposed to thousands of people who might become familiar with it and then choose to purchase it a few years down the road. And that's just the students... having the mentors "forced" in to trying out your product is great marketing, too! So one could argue that the donation is a cynical plan to increase profits, or a mutually beneficial "win-win" scenario. I like to believe the latter.

What I don't appreciate, however, is having the licenses expire. After I left for a new job my former school was unable to find the mentors to carry on with FRC this year and... with the Labview license up... have what amounts to a very expensive piece of garbage as a control system.

I suppose they could sell the cRio and replace it... but it would be nice to have it around should they get back, or if another area school starts up an FRC team.

Of course now, with the licenses timed out, it's not like any students at the school are going to be picking up a laptop, firing up the robot, rewiring the code and saying "Hey, this is fun... let's do it again." (Just as an aside... the EasyC licenses for our VEX robots don't expire, and they're still programming and using the VEX kits.)

So it's great that the software is donated, and its great that its an industrial solution, and I'm sure that the FIRST board (who are a pretty bright group of people, after all) feels that it was the best solution for FIRST... but the best solution for FIRST isn't always necesarily the best solution for schools, teams, and students.


Jason

davidthefat
21-01-2011, 08:28
So majority of FIRST's purposes are just head fakes. Its not really to teach you how to build a robot, but more like learning to finish with deadlines. Not to teach you to program robots in the low level but to learn how to work with other departments efficiently.

edit:
What FRC feels like to me is "here is a bunch of lego pieces, make something cool with it" but I was looking for more of the "here is the lego making machine, make the lego pieces, as long as they fit, and make something cool with it". May be I'll have to wait for college for that type of experience.

Greg McKaskle
21-01-2011, 08:45
I wanted to learn how to do all that low level stuff. I thought it was literally get a bunch of electrical components and soldering them together and making everything from scratch.

Because the robots are big and fast, it is no longer safe to take this approach for the entire system. My understanding is that quite a few teams work at the circuit level for the driver console and for some custom circuits on the robot. Also, the skills, and perhaps the shop you use for FIRST can be used to tinker with lower level circuits. Please don't combine those circuits with half-horsepower motors with other people around.

As for the openness of the libraries, the vision libs have a number of calls to copy the data into a low level data type, or even to hand you the pointer to the vision data structure. For LV, the VIs are IMAQ ImageToArray and IMAQ ArrayToImage.

Taken from the NIVision for LabWindowsCVI Function Reference Manual, for C, the functions are


void* imaqImageToArray(const Image* image, Rect rect, int* columns, int* rows);

Purpose
Creates a two-dimensional array from an image.

and

int imaqArrayToImage(Image* image, const void* array, int numCols, int numRows);

Purpose
Sets the pixels of an image to the values in a given array. This function resizes the image to the size of the source array.

If you are wanting to do this in Java, you'll likely find that you need to write a wrapper first. Model it after the other vision wrappers or ask for help.

Another way to go low level is to read the jpg from the tcp port. You have the low-level jpg encoding, and you can use other libraries such as the JPEG consortium's open code to decode and get at the pixels. I've spoken with several teams who wrote their own camera communication's lib, so it has been done before and is not closed.

I'm not sure what any of this has to do with playing this year's game, but as long as you are doing that task as well and don't let down your teammates, these low-level side projects should be a fun diversion.

As for FIRSTs purpose -- read the web site. If FIRST was going to teach you to build a world-class robot, it would be a course or a degree, not a competition. You are exposed to many of the fundamental robotic topics, and hopefully are inspired to go further. If you accomplish a fraction of what you list and FIRST played a part, they met their goals. If you decide to do something totally different with your life, but recognize how important technical training and problem solving skills are, they have met their goals.

Greg McKaskle

ebarker
21-01-2011, 09:04
So majority of FIRST's purposes are just head fakes. Its not really to teach you how to build a robot, but more like learning to finish with deadlines. Not to teach you to program robots in the low level but to learn how to work with other departments efficiently.

FIRST is NOT an educational institution. They are not here to teach you !

FIRST has a vision and a mission - it is on their website.

FIRST is here to inspire you, to challenge you. Part of that process is giving you a task too hard, resources too little, people too many, time too short. It is microcosm of the real world experience.

You will almost never ever find a useful job where the customer spoon feeds you the answers and or give you unlimited resources to take the time to do whatever project pops into your mind. If you find that job you will be living in the "ivory tower".

What your "customer" (external, internal, private, public, etc) wants more than anything is a cost effective, relevant solution to their problem. That is the realm of applied engineering, and yes sometimes applied engineering has to do a lot of basic research.

If you want to be a professor and do applied or theoretical research you still will not live in an "Ivory Tower". Your work will be funded by someone. You have to convince them that it is important and should be funded.

Do not underestimate the importance of being able to motivate yourself learn, to meet deadlines, to work with other people and department, and to respond to their needs and requirements. If you can learn how to do these things you will be well prepared to work as an applied engineer, research engineer or scientist (professor), or many other things.

For a student that chooses to embrace the challenges FIRST offers, they will receive in return 'years' worth of practical experience that is valuable to both the employee and employer, well before college graduation.

JamesBrown
21-01-2011, 09:21
So majority of FIRST's purposes are just head fakes. It’s not really to teach you how to build a robot, but more like learning to finish with deadlines. Not to teach you to program robots in the low level but to learn how to work with other departments efficiently.



David, I like how passionate you are about the program and I like that you are looking to learn more than what FIRST is requiring you to learn. If you keep that attitude and follow through on your desire you will learn a lot and be an incredibly valuable employee in the future.

That being said I don't think you understand the how much work it is for you to do everything you have said you wanted to do.

1.) Building robot electronics by soldering components. It just isn't possible to build a complex system in 6 weeks by starting at the component level. This means you have to make a choice: a.) Build and design the circuit by hand and greatly reduce the complexity of the Robots, or b.) use existing components that have been engineered by other groups.

2.)You will also find that in industry there are very few times that you will use open source software. Sure, I have Dev C++ and Notepad++ on my computer for work but I cont use them nearly as often as I use Visual Studio, or any number of IDE's for various microcontrollers (many of which are built on Eclipse like WindRiver).

3.) VxWorks is a great RTOS and is common in industry. I just graduated from college and was interviewing for positions in the Embedded Software field, all the employers I talked to were impressed that I had VxWorks experience.

FIRST's software choices may not line up directly with your future goals, but they do line up with industry standards. FIRST's focus is Robotics, Automation, and Control, this lines up directly with my field and I can see great amounts of overlap in what I now do day to day, and what I did in FIRST. The software first gives you is Industry standard or equivalent. In day to day work you can always use an open source editor and create your own makefiles but it takes longer, and time is a company’s most valuable resource.

sjspry
23-01-2011, 23:18
I disagree with your comments on the OS. Personally, I don't find it unnecessarily limiting that you cannot openly access every part of the file system on the cRIO. FIRST needs to ensure some level of consistency across teams for competitions and field connectivity to run smoothly. There is absolutely no need to access this level of the cRIO and, although I would certainly find it interesting to dissect the internals of the field management system, it is for the greater good of the competition that this is left secure.


I see where you're coming from, but they don't actually mandate you keep the VxWorks software on the cRIO, ergo they aren't really concerned in this respect. As long as you use the official "Driver Station" software, you can have your robot and hardware do whatever. I'm sure the system is already open enough you could spoof commands if you wanted, last year we had our router out for testing purposes and it was sucking robots into it until they asked us to turn it off. Just add some ARP spoofing, and presto, they wouldn't notice.

Thanks for the tips btw. What I ended up doing before was hitting <ip>/axis-cgi/jpg/image.cgi?resolution=320x240 a few times a second. Way more responsive than the premade dash.


@Greg I skipped writing a wrapper library for several reasons, the main one being I wished to write my own recognition routines (I'm sure NIVision is good at what it does, but it could turn out problematic based on the differing circumstances of our testing area and the playing field. My idea was something much simpler with just some blob detecting, where I just need to find a color range for, example, the pole or the tape.). After realizing I wouldn't be able to do anything quickly within Java, I just ended up moving all the recognition code to the computer so I could stick with Java. Much easier in my opinion than having to write everything in C++. The libraries on the cRIO are so limited I'd much rather be doing it on the computer anyway, and I'll be using Java simply because of the large standard library.

Greg McKaskle
24-01-2011, 08:26
they don't actually mandate you keep the VxWorks software on the cRIO

Actually, it is required. You can do whatever you want for the offseason, but for FIRST events, the FPGA image and communications code on the cRIO are essentially agents of the FMS, ensuring that the robot is controllable by the field.

As for the dashboard, all of the camera users are using the cgi requests to the camera. There is a bmp, a jpg, and an mjpg that you can use. The default dashboard goes through the cRIO, but if you move the camera, your laptop can directly talk to the camera.

If you'd rather use the laptop to learn about image processing, that sounds like a fine initial approach. But it would be a good idea to learn how to use other people's libraries, like NIVision -- Color conversions, color thresholds, blob measurements, all in there. Additionally, when you find things that aren't in there, the libraries can be extended. Deciding that you have to do everything over again, in the language you choose can be a tough requirement on any project. But if you are making progress and helping the team build a better robot, power to you, let me know if you have any questions.

Greg McKaskle