|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: The increasing amount of pre-canned code
You can get a really good idea on what's taking so long to boot up by connecting up a serial cable to the cRio and booting it. The debugging that I've done using the serial port confirms Greg's claim that there is no magic bullet.
|
|
#2
|
|||
|
|||
|
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:
|
|
#3
|
|||||
|
|||||
|
Re: The increasing amount of pre-canned code
Quote:
Assets like WPILib, Kevin Watson's code, LabView, EasyC, etc. all help those dozen teams have a robot that they can drive around and actually do things with. But for that other one, open up the C++ or Java libraries and go code something cool. If you want to teach your programmers low level stuff, go buy a PIC, MSP430, AVR, etc. and teach them how to set it up. Maybe even put it on a Vex/FTC robot and have them drive it around using the alternative controller. |
|
#4
|
||||||
|
||||||
|
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. Last edited by Chris Hibner : 10-02-2010 at 08:09. |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
|||
|
|||
|
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. |
|
#7
|
|||
|
|||
|
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.
|
|
#8
|
|||||
|
|||||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Hartford Canned Goods Drive | easponge | General Forum | 0 | 24-03-2009 20:50 |
| pic: Canned Food Drive Flyer for NYC Regional | daryl | Extra Discussion | 9 | 06-03-2009 19:31 |
| can we control the amount of air to control the speed of the cylinder? | Team2339 | Pneumatics | 22 | 11-02-2009 15:33 |
| Friction-increasing substances | nayer247 | Technical Discussion | 15 | 29-01-2009 12:10 |
| Amount of Force to lift the bridge? | archiver | 2001 | 2 | 23-06-2002 23:21 |