![]() |
Re: The increasing amount of pre-canned code
Quote:
Since the cRIO and many of the other control system are off the shelf, not specially designed for this competition, their interactions, especially when one of them is failing, is indeed something not that many people have seen. Also, the AEs are mostly new to this system too. They are familiar with NI products in normal usage. As for the boot time. The cRIO FPGA is booted very quickly. The PPC typically boots in about ten. The bridge and other elements, the FRC specific tasks all take a bit longer. But the boot time isn't waiting for any particular element such as FMS to timeout -- no magic bullet. Greg McKaskle |
Re: The increasing amount of pre-canned code
Quote:
|
Re: The increasing amount of pre-canned code
Quote:
From a standpoint of simulating what a real-world controls/embedded software engineer experiences, having the WPI Library make the FIRST experience much more real-world-like. While at some point each company has to start from scratch, that work has usually been done and incorporated into the company software library many years ago. It's the job of each engineer to utilize the tried and true library and not to reinvent the wheel. While at first glance using a library seems too easy, libraries present of a lot of challenges of their own. The post that started this topic brought up a lot of good points. I just started a new job recently (I'm a controls engineer working with embedded software), and getting up to speed on all of the library code is quite a challenge. Like 1075guy pointed out, you really should know what the library is doing before using it, or else you may not know how to fix some problems. As someone else pointed out, it can often be difficult to figure out what some libraries are actually doing. As software becomes more complex, deciphering what the software engineer was trying to do can be difficult at times. I'll admit that there have been times where I said to myself, "I can re-write this to do the same thing in less time than it would take for me to figure out what going on in this code." However, actually re-writing it is usually a pretty bad idea since there are usually a lot of lessons learned in the code that you're looking through, and you probably don't know all of them. That being said, it's often very helpful just to give it a go re-writing it. After that exercise, you can usually get through the library code pretty easily since you went through the thought process yourself. (Just be sure not to use your own code - you'll probably get fired. :) ) I said I'd get to the point eventually, so here it goes. In the real world, you're more likely to faced with a problem like we have now in FIRST. You have a new challenge and you have some good code on the bookshelf. You have to determine how to make the best use of the library code and then fill in the gaps. But just keep in mind that if you use code that you don't understand, you're playing with fire - and don't expect the insurance company to bail you out if you burn down your house playing with fire. |
Re: The increasing amount of pre-canned code
Quote:
I remember in 2009, my team reached the Waterloo Regional, and had to reflash our cRIO and update workbench, and so forth. From the version of WPILib we'd been using in testing, to the version that got flashed there, the Library had changed. They changed the timer code from returning something in seconds to returning in microseconds, or vice versa, I can't remember exactly. This caused our steering code to stop working as it used a timer, and the numbers were now different by a factor of 1 million. I tracked it down fairly quickly, but making changes like that to precanned code could cause problems that less experienced programmers might not track down as quickly. Admittedly, we should have updated before ship, but I hadn't thought of it, and I certainly wasn't expecting a change that changed the outward functionality of the black-box that is WPILib. I'm not really griping about the new system. I actually rather like it. The object-oriented approach to coding the robot is so much more logical. I just sort of feel like, particularly for the C++ last year that WPILib was poorly documented, and somewhat unfinished at time of release. Perhaps it could have been handled better, or perhaps they could have documented changes like the above change better in some sort of changelog. Maybe they did and I just didn't see it. |
Re: The increasing amount of pre-canned code
I would like to add a vote for encouraging systems level design instead of low level programming. I believe this does more to inspire interest in science and technology than learning how to interface with a sensor. With the LabView and WPILib tools the teams can do cool things that might encourage them to pursue technology as a career. (And maybe then learn the details of how semiconductor gyros work.)
We might also be giving the libraries too much credit. Our team is using mecanum wheels this year for the first time. I don't think anyone said, "Hey, there is a holonomic.vi, let's go holonomic!" The team looked at the game requirements and decided that omnidirectional movement was important and besides, they always wanted to try mecanum wheels. No one mentioned the software, after all it's just a "simple matter of programming" to run the wheels. We have a pretty lean team so our programmers are builders too. Having high level libraries allows us to try new sensors and equipment without learning the low level coding. Without those resources we would have to prioritize the work which would probably mean just getting a drive and kicker to work. Knowing that, we probably wouldn't even bother with the other sensors and thus miss the learning of how such devices might be employed in the robotic system. I believe the cRIO and LabVIEW have allowed at least our team to get to the next level of design and understanding. |
Re: The increasing amount of pre-canned code
I'm not so much advocating teams building their own low-level code so much as suggesting that the more advanced libraries might be causing teams to get in over their heads, and trying more advanced stuff before they've had a chance to build more simple things, like a tank drive.
|
Re: The increasing amount of pre-canned code
This year, we were blessed to have our school continue the team with leftover funds that we happened to have found, just a month before kick-off. We didn't really have time to recruit new members like we wanted, so we ended up with no student programmers. That left myself, who is great with web programming, but completely lost with C++/Java. We ended up using Java, and the pre-canned code was a Godsend.
I think it just helps newer teams or teams with fewer resources than most to get something working, and in the case of Java, it's documented pretty well, so we can easily fix the code if we need to. I'm the type of person that learns by editing others' code, not starting from scratch. That's how I learned PHP, Smarty, MySQL, etc. |
Re: The increasing amount of pre-canned code
I respectfully disagree. The pre-canned code actually helped us stay on build schedule as rookies. We're still having issues with how to make the autonomous work (it doesn't work at all), but getting the bot up, running and able to go under the tunnel/over the hump is major for us since we're majority 9th-10th graders. We'll take time to re-learn code from scratch when we're not pressed for time.:)
Quote:
|
Re: The increasing amount of pre-canned code
I am all for good pre-canned code for FIRST robotics...When do you think it will be available???
BC |
Re: The increasing amount of pre-canned code
It already is, in large quantities, as part of WPILib.
This discussion was about whether or not the amount included is not enough, too much, or just right. |
Re: The increasing amount of pre-canned code
Are you also referring to code that teams open-source to others? Or just the NI and Labview libraries?
|
Re: The increasing amount of pre-canned code
To a lesser extent, yes Akash. But I'm mostly referring to WPILib. I'm torn, I think its a good thing, but I also think it encourages teams to try more advanced things before they've gotten a handle on the simple stuff, which could lead to problems down the road.
|
Re: The increasing amount of pre-canned code
Quote:
BC |
Re: The increasing amount of pre-canned code
Theres nothing wrong with the WPILib code that I'm aware of... It all works exactly as advertised.
|
Re: The increasing amount of pre-canned code
I'm seeing the original point was more about trying fancier mechanical things than teams are capable of, and less about how much code you write...?
As was already alluded to FIRST has come a LONG way. Teams now have the option to try crazy things like meccanum drive because they dont have to design their own gearboxes with parts out of the small parts catalog and program in PBasic (yup thats what I programmed my first robot in! Ever try to implement your OWN random number generator??? UGH!). Anyways, FIRST has a struggle to keep the old veteran teams excited, interested and the kids attempting newer challenges every year, while allowing rookies to compete at a reasonable level with them. The ONLY way to do that in my mind is to make sure everyone can start with something. Back in 1997 it was common to see a robot that couldnt drive... there WAS no Kitbot drivetrain... that revolution was huge!! That kitbot allowed 1511 to come up with something fun the first year - a 6WD center traction corner omni that could drive circles around some of the veterans... that was because we already had a frame and gearboxes in our kit, so we could play with some more advanced features. Had we had to design our own gearbox, we never would have tried it. And you guessed it when the gearbox failed, we took it apart, figured out what was failing and put it back together. it was a struggle, but we learned how a gearbox worked AND got a fancy drivetrain. I also am very much of the opinion that you learn MUCH more when you fail than when you succeed. If everything is easy, you arent trying hard enough or challenging yourself enough. Starting with the black box gives you somewhere to get running, when something stops working, you start poking around at the edges and tweaking the interfaces... when you wonder why the box does xyz instead of yza, you open up the box and look inside, and work from the outside in until you understand it. Thats called reverse engineering and its done all of the time and its how many of us gain knowledge we might never have had. And I agree with Chris, as long as teams arent turning around and pointing the finger at FIRST for making things too hard, or "giving" them failed code, then we are all on the right track. When you start blaming someone for a "gift", you are wrong. So what if the gift causes you to struggle a little bit, if you can try to do so much more because of it, even if you fail, if you learn from your failures, you HAVE succeeded. In short, I'm all for anything that makes teams get creative, think outside the box and do things they might never have done before... kitbot or code-wise :) |
| All times are GMT -5. The time now is 23:50. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi