Go to Post I used to be a FIRST Robotics mentor...then I took a Frisbee to the knee. - Travis Hoffman [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 10-02-2010, 03:15
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,748
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: The increasing amount of pre-canned code

Quote:
That said, after spending 8+ hours debugging a firmware issue in the cRio this year (which turned out to be a problem in the 24vdc supply on the PD board), I would say that the cRio is definitely not as robust as the IFI system. While talking to the NI tech support, if they say "Ummm... That's Bad" then you know they must not have found that problem in their testing and aren't prepared to solve it. When a problem arises with this new system, there are so many more points of error that it's quite difficult to debug some times.

cRio boot times: They bug me. Waiting for the robot to boot is the most annoying thing there is. However, after talking to NI tech support for around 4 hours, he claims that the cRio itself boots in several seconds and then the FIRST code waits for FMS comm to timeout (25s) before loading the team code. Is this the case? If so, they could make the FMS timeout a little faster.
Sorry it took so long to debug.

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
Reply With Quote
  #17   Spotlight this post!  
Unread 10-02-2010, 03:35
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 800
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: The increasing amount of pre-canned code

Quote:
Originally Posted by apalrd View Post
However, after talking to NI tech support for around 4 hours, he claims that the cRio itself boots in several seconds and then the FIRST code waits for FMS comm to timeout (25s) before loading the team code. Is this the case?
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.
Reply With Quote
  #18   Spotlight this post!  
Unread 10-02-2010, 08:07
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: The increasing amount of pre-canned code

Quote:
Originally Posted by 1075guy View Post
Do you think the increasing amount of pre-canned code (in the form of WPILib and all its flavours) is helping or hurting the effectiveness of young teams?

I've seen quite a few teams this year, asking for help with LabVIEW, and specifically the Holonomic.vi. I think what has started to happen, is that these teams are seeing both the veterans, and the code that makes such drive systems seem easy, and jumping on the bandwagon before really understanding how these systems work.

A similar effect has happened with the cameras.

If you hand teams code on a silver platter, they often don't understand WHY it works. Which causes problems when something breaks and it stops working, because they can't know how to fix it if they don't understand how it works.
This is a pretty interesting topic. My post here may wander a bit, but I hope I'll get to the point before too long.

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.
__________________
-
An ounce of perception is worth a pound of obscure.

Last edited by Chris Hibner : 10-02-2010 at 08:09.
Reply With Quote
  #19   Spotlight this post!  
Unread 10-02-2010, 09:37
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: The increasing amount of pre-canned code

Quote:
Originally Posted by Chris Hibner View Post
<snip>
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.
This is exactly the point I was trying to get to and not quite sure how to get there.

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.
Reply With Quote
  #20   Spotlight this post!  
Unread 10-02-2010, 09:53
mswalker mswalker is offline
Mentor
FRC #2583 (Westwood Robotics)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 26
mswalker is on a distinguished road
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.
Reply With Quote
  #21   Spotlight this post!  
Unread 10-02-2010, 10:12
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
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.
Reply With Quote
  #22   Spotlight this post!  
Unread 10-02-2010, 10:58
synth3tk's Avatar
synth3tk synth3tk is offline
Volunteer / The Blue Alliance
AKA: David Thomas
no team
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Ohio
Posts: 2,005
synth3tk has a reputation beyond reputesynth3tk has a reputation beyond reputesynth3tk has a reputation beyond reputesynth3tk has a reputation beyond reputesynth3tk has a reputation beyond reputesynth3tk has a reputation beyond reputesynth3tk has a reputation beyond reputesynth3tk has a reputation beyond reputesynth3tk has a reputation beyond reputesynth3tk has a reputation beyond reputesynth3tk has a reputation beyond repute
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.
__________________
Quote:
The difference between theory and application is that in theory, theory and application are the same; In application, they are not.
Reply With Quote
  #23   Spotlight this post!  
Unread 11-02-2010, 12:34
pilum40 pilum40 is offline
Steve Miller-Coach-Team 3355
AKA: Steve Miller
FRC #3355 (Bigg Redd)
Team Role: Coach
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Arlington, Texas
Posts: 141
pilum40 has much to be proud ofpilum40 has much to be proud ofpilum40 has much to be proud ofpilum40 has much to be proud ofpilum40 has much to be proud ofpilum40 has much to be proud ofpilum40 has much to be proud ofpilum40 has much to be proud ofpilum40 has much to be proud of
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:
Originally Posted by apalrd View Post
I like the IFI processor, it worked well at its time.
The biggest advantages to me using the cRio are that I no longer have to write lookup tables for things, as I have the power to calculate them in real time.

Working in LAbVIEW: Some of the WPIlib is nice, like integrating gyros and counting encoder clicks. Some of it is not, such as the really really really annoying fact that you must set both the forward and reverse coils of a relay at the same Set (I actually wrote a vi to set them separately, based on copied code from that Set). I would totally agree with the fact that PID and Holonomic are probably going too far. Jim (Zondag) actually didn't tell us programmers that there was a PID library, and since we didn't find it until after writing the crab-drive code, we didn't use it.

The cRio: Being a first year programmer in 2009, I probably would have never been able to code the 4-wheel independent steering code without the trig power on the cRio. It was nice to have all of the power I needed. That said, after spending 8+ hours debugging a firmware issue in the cRio this year (which turned out to be a problem in the 24vdc supply on the PD board), I would say that the cRio is definitely not as robust as the IFI system. While talking to the NI tech support, if they say "Ummm... That's Bad" then you know they must not have found that problem in their testing and aren't prepared to solve it. When a problem arises with this new system, there are so many more points of error that it's quite difficult to debug some times.

cRio boot times: They bug me. Waiting for the robot to boot is the most annoying thing there is. However, after talking to NI tech support for around 4 hours, he claims that the cRio itself boots in several seconds and then the FIRST code waits for FMS comm to timeout (25s) before loading the team code. Is this the case? If so, they could make the FMS timeout a little faster.

PID and Holonomic: They are sitting unused in my WPIlib pallate. They will never be touched. As I teach the newbees (freshmen), they too will learn to leave them alone. At least they didn't give us crab-drive code. Debugging that is too much fun for them to just hand us.
Reply With Quote
  #24   Spotlight this post!  
Unread 11-02-2010, 13:17
bcieslak
 
Posts: n/a
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
Reply With Quote
  #25   Spotlight this post!  
Unread 11-02-2010, 15:15
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
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.
Reply With Quote
  #26   Spotlight this post!  
Unread 11-02-2010, 15:17
Akash Rastogi Akash Rastogi is offline
Jim Zondag is my Spirit Animal
FRC #2170 (Titanium Tomahawks)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Manchester, Connecticut
Posts: 7,003
Akash Rastogi has a reputation beyond reputeAkash Rastogi has a reputation beyond reputeAkash Rastogi has a reputation beyond reputeAkash Rastogi has a reputation beyond reputeAkash Rastogi has a reputation beyond reputeAkash Rastogi has a reputation beyond reputeAkash Rastogi has a reputation beyond reputeAkash Rastogi has a reputation beyond reputeAkash Rastogi has a reputation beyond reputeAkash Rastogi has a reputation beyond reputeAkash Rastogi has a reputation beyond repute
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?
__________________
My posts and opinions do not necessarily reflect those of my affiliated team.
['16-'xx]: Mentor FRC 2170 | ['11-'13]: Co-Founder/Mentor FRC 3929 | ['06-'10]: Student FRC 11 - MORT | ['08-'12]: Founder - EWCP (OG)
Reply With Quote
  #27   Spotlight this post!  
Unread 11-02-2010, 15:46
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
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.
Reply With Quote
  #28   Spotlight this post!  
Unread 12-02-2010, 13:52
bcieslak
 
Posts: n/a
Re: The increasing amount of pre-canned code

Quote:
Originally Posted by 1075guy View Post
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.
I should have emphasized when will 'good' code be available. This season has been spent developing work arounds for the WPILib code.

BC
Reply With Quote
  #29   Spotlight this post!  
Unread 12-02-2010, 13:56
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
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.
Reply With Quote
  #30   Spotlight this post!  
Unread 12-02-2010, 15:23
Kims Robot's Avatar Unsung FIRST Hero
Kims Robot Kims Robot is offline
Onto a New Chapter...
AKA: Kim O'Toole Eckhardt
no team
 
Join Date: Aug 2004
Rookie Year: 1996
Location: Framingham, MA
Posts: 1,467
Kims Robot has a reputation beyond reputeKims Robot has a reputation beyond reputeKims Robot has a reputation beyond reputeKims Robot has a reputation beyond reputeKims Robot has a reputation beyond reputeKims Robot has a reputation beyond reputeKims Robot has a reputation beyond reputeKims Robot has a reputation beyond reputeKims Robot has a reputation beyond reputeKims Robot has a reputation beyond reputeKims Robot has a reputation beyond repute
Send a message via AIM to Kims Robot
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
__________________
~kim~
Kimberly O'Toole Eckhardt <3
Principal Systems Engineer & Program Manager
History - Team 176, Team 229, Team 1511, FIRST Volunteer!!
My new FIRST Photography Hobby & Angry Eric's Fan Page
Excellence - is the result of caring more than others think is wise, risking more than others think is safe, dreaming more than others think is practical, and expecting more than others think is possible.
Reply With Quote
Reply


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
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


All times are GMT -5. The time now is 23:50.

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