![]() |
How important is Linux?
There have been many discussions over the years about having Linux as a target operating system on the robot controller and I'm just curious if this is really what teams want, or is it just a few vocal members expressing their desire. What about VxWorks? QNX? Some other RTOS?
-Kevin |
Re: How important is Linux?
To avoid confusion, are you talking about having Linux having am official supported IDE and code loading OR are you talking about the controller running something like uClinux?
|
Re: How important is Linux?
Kevin,
That is a great question. No doubt there are some advocates pushing linux because it is linux. I think the better question is what is the best platform for this target audience? For many users the code is input->process->output. The input being external I/O or the telemetry stream and vicey versey. That is even true for the camera and such. What I trying to say is the most users don't deal with interrupt driven routines or 'hard real time' requirements. Momentarily ignoring things like interrupt driven pulse counters the user could write a plain old gnu app that interfaced to the external world via a kernel drive (supplied). One downside is the development environment just got a whole lot bigger (relative to MPLab) plus it is more difficult for this level of user to hook custom hardware to the software or to configure some I/O pins. I'm not sure that chasing an RTOS for this audience is a good idea. The linux idea has plus and minus points. I'm not too sure the plus'es outweigh the minuses primarily because of what it takes to get to the hardware. I write linux kernel drivers to do I/O to the world and it ain't trivial. (Kevin already knows this isn't trivial because he is Kevin). What say you world out there ? |
Re: How important is Linux?
Quote:
|
Re: How important is Linux?
I'm an Assembly/C guy... i feel like you have enough problems debugging your own code let alone the 10's or 100's of people's code you add in to the mix with an RTOS...
Plus, the FIRST controller as it sits doesn't have enough MIPS and memory to run much of an RTOS along with running the user's tasks at the same time... it's more than enough for Assembly/C/EasyC people to run wild but I'm not sure about a full blown RTOS... Just my 0.81 Rupees... -q |
Re: How important is Linux?
There is a small vocal crowd that would like linux as a platform
do develop their RC program, and other things, but running an OS on the robot controller itself is a bad idea. Having at least a 16 bit processor for the RC, with a clean implementation for the I-O, and most importantly, interrupts, would be great. One does not really need an OS running on the RC to get these things. The 8 bit addressing, the interrupt functionality that has suffered from gremlins since the 8722 was introduced and the arcane violations of the ANSI C standard to obtain more efficient execution on an 8 bit processor would most certainly be things to leave behind. Eugene |
Re: How important is Linux?
Outside of the technical details of actually implementing Linux on the RC the amount of very good and free development tools provided by GNU would be an incentive.
In addition the community and spirit of open source is highly compatible with FIRST and gracious professionalism. |
Re: How important is Linux?
Does an OS necessarily have to complicate things? I would think some example/default code could be provided that runs in a single thread, follows the input->process->output paradigm and in general behaves in much the same way as the current system. If more advanced users want to explore the extended feature set an RTOS has to offer they may do so. If you look at a PC running windows it is extremely complex, but you can still write a "hello world" program without understanding the many levels of abstraction below you.
|
Re: How important is Linux?
Over the years, I have read many discussions about using Linux or other favorite platforms to program on, but I think it is irrelevant what we program on. When I started programming, all I knew was a little bit of C and it took me a long time to grasp exactly how to get the robot running. I feel the most important thing is to have a system where over the period of maybe a year, even a student can understand what is going on. Even today I DO NOT understand most of the code Kevin Watson gracefully provides us. I have just learned to use it. Maybe what I'm asking for is something where I don't have to understand EVERYTHING about the controller and yet I will be able to write code to get the robot working. After that, if it has the infrastructure to support complex devices such as an SD card, LCD screen, etc etc, then that might be fun to work with. If Linux can accomplish this, then I'm all for it.
|
Re: How important is Linux?
in my opinion, that would be a bit comlex. i'm a relatively new programmer, and i have no clue about anything like that. personally i'm for pretty much what we have now. also, we have to remember the new teams who might not know even how to program with mplab. i know it's relatively easy, but it's still difficult enough that new teams/programmers could experience trouble just getting their robots running..... jyst my 2 cents...
|
Re: How important is Linux?
I dont think that we need a full blown OS, I'm just all for totally open sourcing the current RC..
|
Re: How important is Linux?
As a programmer, part of me would love the possibilities opened up by going to Linux, or some other full blown OS on the controller. As a CS teacher, however, I think it would serve to increase the gap between the teams with lots of programming skill (and extra people in order to use that skill) and those without.
I do think squirrel is right about choosing an OS because it is not one that you dislike. I spend an awful lot of time with my students telling them that if they want to be good at development, they have to learn the difference between "I don't like xxx" and "xxx is a terrible operating system/program/whatever." |
Re: How important is Linux?
I think the use of an RTOS on the RC would be very beneficial to the forward progress of the FIRST program. Is it absolutely necessary? No, not at all. But, with the size/cost ratio of computing power going down by the day, we should really try to pack as much punch into our controllers as possible.
I think a problem with our current RC architecture is there is a real cap on innovation. Without interfacing to an external controller, there really isn't too much you can do with the standard hardware. Bringing an RTOS to the RC would open the door to networking, file systems, threading, and a multitude of other features. We could start using a modular, service based back end to handle I/O data. And with cool stuff like this floating around on the net, there's only more incentive to use an RTOS which can interpret anything that can be compiled to run on it. Whether or not the controller uses an RTOS, I think it is very important that the development environment be freed up. Windows only software like the C18 compiler has got to go. There are a multitude of users who would like to run another operating system and are left in the cold without installing C18 in WINE. Yuck! |
Re: How important is Linux?
Quote:
Quote:
I think it will be a big step to get over the "that seems too hard" barrier. We are used to writing C code to run on an embedded controller in real time... not an easy task for a high school freshman! But, there are tools to help facilitate in this process (default code, EasyC). These tools make it possible for people with absolutely no knowledge of C to program a robot to do basic functions with a very shallow learning curve. There is no reason why using an OS on the robot should be any different. If anything, it makes it easier because we can interface standards that most people are familiar with, instead of trying to teach them something entirely foreign. |
Re: How important is Linux?
Quote:
-Kevin |
Re: How important is Linux?
Quote:
I ask this question because it's been announced that we'll be getting a new controller in 2009 and I'm just curious what teams will want running on that controller in the hope that FIRST and their corporate sponsors will listen to us, the FRC community when these decisions are made. With this in mind, I strongly urge folks to take the time to fill out the RC survey. -Kevin |
Re: How important is Linux?
What about Windows Embedded instead of Linux? That would give students some exposure to something that they might be come across in industry. RTOS'S like QNX aren't free either.
Brian |
Re: How important is Linux?
Kevin,
My biggest concern for running a RTOS on the robot controller is the overhead and resources the RTOS will take. I wouldn't want to compromise the prossessing power just for the convienience of some available services in an RTOS. |
Re: How important is Linux?
Quote:
However, the cool thing about Windows XPe/CE is that they run the .NET MicroFramework .... which can run code from Microsoft Robotics Studio. For those of you who havent played with Robotics Studio it has a pretty neat system where you can target your code to an on-computer physical simulation of your robot then turn right around and target it to your MicroFramework compatible controller. It includes drivers for heavy hardware (like Sick scanners n such).... Really after writing this i think this is way too overkill for doing FIRST robotics. The controller's cost would get way out of hand to have enough hardware to run XPe... plus I think the simplicity and close proximity to the hardware that MCC provieds is a great experience for FIRST programmers. -q |
Re: How important is Linux?
I think it's assumed that if we're running an RTOS on the controller, then we'll have more than enough processing power left over to do many interesting things. Honestly, once you've made that decision, it's rather easy to get enough power to do whatever you want. Freescale has some 32-bit automotive processors (MAC7101) that run 50+MHz and could support 16 PWM channels on chip with no interrupts along with A/D, 2 SPI channels and a host of other nice features. Actually, after looking over that random processor I hunted up at Freescale, I'm almost drooling over the sorts of things that could be done with it. The real problem is just the development time to get something like that up and running. And even more importantly, making absolutely sure the users can't shoot themselves in the foot and get the controller into a completely unrecoverable state via bad programming. I think the amount of development and debugging necessary for something like this would be the primary hurdle to get over, but I have to say it'd probably make programming a lot easier in the long run.
|
Re: How important is Linux?
I personally don't see why you'd want Linux on a robot. For those in favor of it, can you please specify in more detail what specifically having Linux would do for you? I suspect many of the reasons (other than the "gee whiz" reasons) are possible with much simpler software.
If all you want is to run multiple tasks with some priority mechanisms, something like FreeRTOS would be much simpler and better. Don't forget that when you make things more complicated (like by adding an OS) you increase the difficulty of debugging. With the current system (which has no in-circuit debug capability), I would really not want to do anything involving multiple concurrent tasks, simply because we don't have good enough facilities to debug it. Debugging a multi-threaded real-time application is very tricky and is really beyond the capabilities of many teams. |
Re: How important is Linux?
Quote:
|
Re: How important is Linux?
Quote:
-Kevin |
Re: How important is Linux?
Moving from a microcontroller to a computer with an OS certainly has merit.
We just want to make sure that it doesn't take rocket science to interface to the hardware for those that have custom or unique sensors or controls. If the OS had the i/o support and built in telemetry and safety stuff then things can get real straightforward is all you have to do is drop an app inside. Ed |
Re: How important is Linux?
Being in the corporate business sector where you need to make the trade offs between "get the product out there yesterday" and the "do more with less" or "make it work on our existing systems without upgrading them" and the "Oh BTW the transaction has to be finished in 3 seconds or less" I find myself straddling the fence a little on the subject.
On one since of the fence: Having a RTOS running on the RC with the necessary and appropriate drivers for various hardware and sensors using standardized API calls for accessing and using said hardware is very much like todays methods of application development and programming. Most of the complex underlying programming of error handling, interrupt handling and so forth are hidden from the developer and the developer really doesn't need to know or care about them. It certainly does make code development easier and faster. The downside is you tend to get larger code with more overhead that functions less efficiently which in turn requires more RAM, bigger Hard Drives, faster CPU's to get the job done. While this is not always true, it is the case more often than not. On the other side of the fence: Not having a RTOS allows the developer to intimately learn the inner workings of the system and hardware they are using. It does take A LOT longer to program and develop applications, but you generally can write more efficient code that will need less hard drive space require less RAM, less CPU cycles. This side of the fence in my opinion provides the students the opportunity to gain a greater depth of knowledge and understanding of computing at both the hardware level and the software level. So the key question in my mind is which side of fence will the students benefit the most from? In my personal opinion, not having a RTOS would serve well, but I'll be honest and say that my view is slanted for 2 reasons. 1) I was the taught program/develop code in that way myself. 2) Currently one of my professional roles is application and overall system performance across the corporate enterprise. And believe me, the less the programmer understands of the inner workings the tougher my job is. Just food for thought. |
Re: How important is Linux?
Quote:
/end sarcasm Microsoft Robotics studio is actually pretty cool. I've programmed in MpLab a lot and it wasn't necessarily hard, I just didn't like how constrained it was. The MS studio isn't the most open thing out there, but it definitely has the support behind it to make it grow and work. |
Re: How important is Linux?
After doing some quick research, it would definitely be a better decision for the RC to run a commercial RTOS (I really liked VxWorks and QNX) than an open source implementation of RTLinux. It seems like the commercial options were built from the ground up to run in real time, while the latter is just a way to de-prioritize the linux kernel to keep important threads running in real time.
|
Re: How important is Linux?
I like the closeness to the hardware of the current non-OS setup. The main input,process,output loop, idle task, and some interrupt processing is able to handle what most teams want to do. Our current default program doesn't isolate the low levels of the system well enough and confuses many first time users but that can be improved. A more capable processor, better access to hardware, better communication schemes, more reliable wiring methods are much more important to me than an operating system.
I do see how a simple RTOS would help. It could isolate the various layers of software and make life easier for the majority of users. It could provide decent timer functions and separate tasks for things like serial port drivers, etc. However, even the most simple OSes can have a steep learning curve and can run into difficult to debug issues like stack overflow and resource contention. I've seen this even with experienced software engineers using a commercial OSEK compliant operating system. If we go to an OS, a well documented system with decent training materials is a must. I suspect that many of the Linux fans might be disappointed to find that using a version of linux suitable for a robot controller will not feel much like the Linux they use on their desktop computers. It would be nice if the programming tools are available on multiple OSes, but running linux on the controller is overkill in my opinion. Products like Microsoft XPe/CE and others concern me because the tools often are extremely bloated and difficult to load on the hand-me down laptops many of our teams use. Even worse is attempting to install on multiple computers on a secured, locked down, five year old school network. |
Re: How important is Linux?
Quote:
-Kevin |
Re: How important is Linux?
Here's a thought on the abstraction vs. bare metal programming split. I think it works out exactly like anything else on the robot. For a transmission you can either design your own from the ground up, cookbook one up out of a DeWalt, or buy one from AndyMark. These are sorted by decreasing time and effort and increasing knowledge of the nuts and bolts of the systems. Each of these approaches has its place in the mechanical design of the robot, and I fail to see why they shouldn't all have a place in the programming of the robot. There will be times when bare metal programming is the best or only way to accomplish something, but should we really force every team to build everything from scratch? I think the teams should really have the option of piecing together all three kinds of code as best suits them. Near as I can tell at the moment, the only options are either an entire AndyMark robot (EasyC) or an entire cookbooked and from scratch robot.
|
Re: How important is Linux?
To get more people involved with programming robots from their personal computer , FIRST must have a robot simulator. Microsoft Robotics Studio or Player/Stage are easy to interface if you have a x86 controller for a robot (or another commonly used micro-architecture). I think teams should have the option to include an RTOS controller. The development can actually start as a plug-in to the existing IFI Robot Controller. AdamBots FRC#245 has put together a great guide to integrating a Co-processor to your FIRST robot.
|
Re: How important is Linux?
Quote:
While the .NET Framework would be a nice solution, as you said it would be overkill for the task at hand. And what I think is more important, the .NET Framework is only available for Windows XP, 2003, and Vista. All the school computers in Team 228's high school still run Windows 2000 Professional; our team owns three iMacs and one desktop PC running XP. And it's not uncommon to see Ubuntu running on our programmers' laptops. The ideal new control system would be one which is programmable from any of these operating systems, especially since the number of people using Linux and Mac OS X has only been growing. (If MSRS was cross-platform compatible, then I'd support it.) |
Re: How important is Linux?
I personally want Linux (old UNIX hacker) as a development environment (GNUtools mainly) but as the system running on the robot - no.
If you had a small well documented RTOS running on the RC that'd be great - as long as we can learn and understand it all in the six weeks. That's the main barrier - new programmers with no prior experience have to be able to pick up the language/OS, understand the RC, learn how to modify it etc. The default program goes a long way to making the current RC easy to work with but be very careful about increasing the complexity. There's no guarantee that people from last year are on this years team. |
Re: How important is Linux?
Making a coprocessor running Linux easier to integrate would be a bonus for those teams that want to go that way.
|
Re: How important is Linux?
Everything I've ever heard in programming advice is "don't start with .NET." I did start with .NET (thanks to my high school for that one), and the advice is right.
While .NET is a valuable tool for adhoc programming, particularly by non-programmers, it's a sledge hammer where you often need a chisel. Rather than being tailored to what you need, .NET simply gives you everything you might need. Not only is this resource intensive for even the simplest applications, it also leaves you clueless about some of the things that .NET puts in the back-end. The result is easy to learn, but leaves you without basic coding practices that you'll need later in life. (This post is mostly about VB.NET. I know that some of it also applies to C#.NET. I don't know about VC.NET, ASP.NET, or any other .NET language, but I think my point holds for .NET in general.) That said, I know how much our programmers have to know just to write an autonomous mode (their voodoo amazes me), and it may be time for an easier platform. The real question is whether linux would even be easier. Most of the students with linux experience have desktop linux experience. The build of linux that they would find on a FIRST controller would be a whole different world, and they might find that just as difficult to work with as they find the current microcontroller, but as linux is a more complex system, there would be even more opportunity to get lost in it. |
Re: How important is Linux?
I'm still hard pressed to see how utilizing a RTOS increases complexity in programming. With multiple layers of abstraction, we can create a system that makes it extremely easy for novice programmers to get their bot up and running. In addition this allows more experienced developers to innovate beyond anything we could accomplish now, all without slow hardware interfaces.
|
Re: How important is Linux?
Quote:
Rationalizing the interrupt service code, and incorporating some of Kevin Watson's contributions (interrupt-driven A/D conversions, for example) could make it even easier. The past couple of years, we've taken the default code's "user" files apart and put them back together in a slightly different shape. The architectural philosophy of putting separate functionality in separate places, including keeping input and output processes detached from each other, seems to work very well. To bring this back to Ed's comment, having that detachment makes doing autonomous programming relatively simple. |
Re: How important is Linux?
Ignoring the whole "which RTOS?" discussion, here's my $.02.
The current generation of controllers just don't have a prayer of running an RTOS. Period. No easy multi-threading, inefficient indirect referencing, and a collection of other architecture issues make it pretty much impossible. One of the issues of using any RTOS is the complexity of developing code for a new device. While I have no experience with any RTOS, I know that if you miscode a kernel module (or w/e the term is for the RTOS of your choice), the debugging could be a real hassle. Even if you don't write code at a kernel level, you can still have issues with threading that just don't appear in current code. At this time, FIRST robots do not (generally) meet complexity requirements to justify an RTOS. |
Re: How important is Linux?
Quote:
Quote:
Quote:
Quote:
-Kevin |
Re: How important is Linux?
Quote:
|
Re: How important is Linux?
Quote:
I think many teams will expand their programming to fill the capabilities of the new system, whatever they may be. Also, I think we should all assume (as Kevin stated) that even with a RTOS running, teams have the option of coding in a very simple fashion without having to deal with the OS at all. |
Re: How important is Linux?
Before I start: I'm not well-qualified to comment. But that never stopped me.
Quote:
Quote:
Quote:
Quote:
All of the HS kids I met who demanded Linux for their devel system could not really give a good reason, other than "it's not MS" (Dave's point kinda). Arguments of stability or 'openness' don't fly with me. So, Linux as RTOS in the RC wouldn't make a lot of sense for these folks, as it would look foreign (Mark's point). The latter points are right on - FIRST robots are not sophisticated partly because the teams program to the current RCs capabilities. Increase capacity and you will see more sophisticated robots. So, the more power the better, IMHO. On the other hand, if we consider a FIRST robot a learning tool, I would rather see lower-level programming than higher-level. But, considering the range of capabilities out there, Easy C is pretty high level (or can be if you let it). And, it is needed. Conclusion: An RTOS might be great, it does not have to be Linux, the dev tools are what carry the greatest weight for me. Don PS: Quote:
|
Re: How important is Linux?
I started another thread - chicken or the egg - in the control section. Discussing a software programming environment with out knowing some details about the hardware design to me makes no sense. If First would give us a hint at the architecture they are considering, then we could go around and around discussing the advantages and disadvantages of every software platform discussed in this thread. With out some hardware details this thread can not lead to any meaningful discussion. First seams to intend to keep the new control system secret. When it is released we can revisit this thread and comment on they should have used Linux, Rtos would have been perfect, why didn't they use xyz system and on and on. Unless First opens up how can we debate the software. There are allot of smart people on this forum that could make meaningful comments on the platform direction. Don't think it's going to happen. Come on FIRST open up a little.
|
Re: How important is Linux?
Quote:
|
Re: How important is Linux?
Quote:
Using Linux on the other hand is too much work, for no gain. For one thing, it needs more than a PIC with 3KB of RAM, and 1KB of EEPROM. Secondly, interfacing with the hardware is too much work, and even if there was a nice API for it, it would again have too much overhead. Linux also adds another point of failure. What I would like to see are some Linux developer tools. MPLAB is WINE works, but its far from perfect. IMO, a good solution would to be to create a nice API in the default code for drive code, sensors, autonomous, and all the other things. Right now we don't have that and our team is working very hard to create one, but it is a big undertaking. When it comes down to it, this is what embedded programmers do. Embedded systems don't need preemptive multitasking kernels and CPU hot plugging. I think it's important for everyone to try programming on the bare metal of the controller as it's a good learning experience. |
Re: How important is Linux?
I just want to add a few words to this conversation.
I agree with all the comments on this topic regarding having an RTOS on a new controller that hail the benefits of being able to write higher level and complex code with less effort. Having well-defined high-level APIs for programming a system are an absolute must. Why should I have to know how to make the microcontroller do backflips in order to do something that any RTOS would provide to me by default? I'm all for learning about what makes the box tick, but in 6 weeks I refuse to perform open-heart surgery every time I want to do something new. Does Linux have to be that RTOS? Well, we should definitely have an RTOS that is suited to a particular hardware controller, and have good APIs for working with the hardware from the native development environments. I honestly don't care what RTOS is on the controller, so long as it's fairly well documented and supported - If I can't get an answer on why X does Y when I do Z in 48 hours or less, then it's junk to me. I do expect some growing pains during the first year while we're all trying to learn the new system, but a bank of somewhat-experts would be nice to consult with if such a group could be assembled. I am probably biased since I work on an RTOS for a living, but if *I* had to know everything about the hardware I am writing my RTOS for in 6 weeks then I'd be in a heap of trouble - I couldn't do it. Once you move away from hobby components and into more cutting-edge technology, you just can't know everything you need to know to perform direct programming NOR SHOULD YOU HAVE TO. -Danny |
Re: How important is Linux?
I'm not sure I see the benefits to the students in moving away from what we have now.
It seems to me that what we have now allows students to learn basic programming structure. Variables, arrays, lookup tables, the importance of good clean code, etc. You should see the looks on their faces when they begin to understand why order of operations is so important in integer math. It's a thrill to see. No offense to the many incredibly talented mentors out there - but everything you are throwing around seems to be more complicated than what we have now. I have my kids code in notepad for exactly that reason. Having them learning how to code in the most basic environment where they have to worry about syntax, manual spacing, capitalization and spelling teachs them what I consider the most important basic programming skills. You should see the victory dances when they write their first subroutine in notepad and it works, cleanly, the first time they compile it. I'm not sure what have an RTOS would really gain for the students in terms of learning, but I can see where it will definitely increase cost. |
Re: How important is Linux?
Quote:
|
Re: How important is Linux?
Quote:
Quote:
|
Re: How important is Linux?
Quote:
|
Re: How important is Linux?
Quote:
My dream would be a full industrial PC (PC 104 form factor???) that would allow teams to build expansion as needed. That said, I'm assuming that we'll get another microcontroller. And while there are microcontrollers capable of running modern a OS, most cannot handle the overhead, memory and interrupt requirements. |
Re: How important is Linux?
I am one(of the apparently few) saying that I would like to see Linux. Now this is not because oh snap its linux or i hate(MS/MAC) but because there are a few features that Linux is (as far as I know) the only one that supports it. If there is another simpler system out there that provides what I want, I'll take that.
One thing that drives me insane with the current system is the serial port programming, few laptops built recently have a serial port. Personally I'd like a controller I could connect remotely and program with in one of two ways. First is directly with a network and something like ssh/telnet. My reasoning is that almost every computer in the past 10 years has an internal network card so user hardware is not a problem. Also the compiler etc can be stored on the robot so that I can ask any person on the team if I can use their laptop real quick to ssh/telnet into the robot(with PuTTy in windows or typing ssh in the command line in mac/linux) both of which are programs already installed or only a few k to install on a computer. Also something such as sftp to send the text file or precompiled files to the robot directly if you prefer to compile on your laptop etc. Alternatively, removable media would be nice for uploading code. Simply write it onto a usb or sd card and pop it in the controller. That would also make swapping autonomous much easier. Another thing that I like about the use of Linux is easily logging robot actions errors etc into plain text that I can easily read later. I understand some peoples complaints about accessing hardware via some abstraction, but I'd personally take a layer of abstraction on a system with megabytes of ram and a few hundred megahertz processor over no abstraction on a 26ish mhz processor and only a few k of ram. There is also the complaint of difficulty. With a pic you need to code every little bit thankfully most of the stuff is provided by IFI/FIRST/Kevin currently. I seriously doubt that we would be given a system with no default code and told to have at it and figure out how to interface with the hardware. Examples and defaults would be given for most interfacing and Kevin would of course astound us with even better possibilities, interfaces etc. |
Re: How important is Linux?
It's been a while since I've posted on ChiefDelphi hasn't it?
I'll try and keep this one as short and sweet as possible (not likely). An RTOS on our future controller - absolutely. What people might be forgetting is we *almost* have one already with our controller's "Master Code." It manages all the lower level functions (radio, timeslicing, etc), and exposes an abstraction layer for us to access all the I/O on the RC. Some of the hardcore here will probably berate me for using an analogy like this, but I'm calling it as I see it. An RTOS is not a giant leap of faith, especially if we're going to get a significant microcontroller upgrade. To me, it's an evolution of something we're already doing, except it would be more well-defined, widely accepted, and extensible if we go with one of the more popular RTOSes. Do I think Linux should be that RTOS? How about QNX? VxWorks? LabView RealTime Embedded? Or any other RTOS? SHOULD I LOOK IN TO ECOS? It's a loaded question, as is my answer: As an FRC programmer, it doesn't matter at all, because we HAVE TO BE GIVEN another secured abstraction layer, in which we'll be limited to: accessing robot and OI related I/O, and executing sequential code. I'm on the fence if we programmers should even be able to spawn a thread. We SHOULDN'T ever see an interface with the RTOS directly, at least never in a competition environment. Regardless of the underlying RTOS, I'm pretty sure the abstraction layer presented to us FRC programmers could be made exactly the same - in fact, my money is that it will look very similar to the one we're given now through the current IFI headers / MPLAB toolchain. NOW, if you put me in the position of being the head honcho at FIRST who gets to call the shots on this project, my answer changes dramatically: 1) Who's on my dev team? Who can I get with significant experience with Arena Controllers/RCs/OIs (read: did I poach anyone from IFI =P)? What RTOSes do they already know? 2) What's my bottom line on each control unit? Can I afford licensing on a commercial RTOS? How much am I paying my developers? Can I afford to pay them to learn an open RTOS if they don't already know it? Does the licensing $ vs learning curve $ make sense? What about the support costs if/when something blows up during development, or god forbid, competition week 1? 3) Am I toying with any crazy ideas like putting all wireless communications on WiFi, or Bluetooth, or ZigBee? What's each RTOSs support for those stacks? and finally 4) Is any commercial RTOS developer willing to pony up the cash, support, and time for the privilege of putting their product into the hands of thousands of the world's best future embedded developers? At the end of the day, FRC programmers won't and shouldn't have any say in a decision like this. And that's not a knock on Kevin, or anyone else in this forum, but this is me with my business hat on, and I think I'm making a lot of sense on this one. :p Cheers, and I looking forward to what we end up with in 2009! -Shawn T. Lim... |
Re: How important is Linux?
I feel like I can (hopefully) provide a lot of insight into this debate as our team presently uses Linux to run our robot. The IFI chip is just an I/O slave between the radio, PWMs, Victors, etc, and our co-processor - which is running Linux. The coprocessor is a 400 mHz GUMSTIX embedded processor, and I think it's a fair equivalent to what could possibly be used on robots in the future. (Teams interested in reading more about this, feel free to visit our site - but be warned, in changing over to mediawiki we lost some stuff, so a lot of the information is outdated (ignore all things "modules"))
Anyway, here's some of the things that we noticed, day-to-day, that are very nice: * Easy access to a hardware timer. Seriously, how many threads are there about the sketchy interrupt timer and all of that, whatever happens, the new chip MUST have a clock. * No interrupt worries. It's really nice to have an 'unlimited' number of interrupts available and not have to worry about bogging down processing capabilities. In that same vein... * Far fewer efficiency concerns. This one's a double-edged sword; at one point last year our robot had 4 PID and 4 PI loops running simultaneously without any slowdown. Point being that you forget about programming efficiently, which is a useful skill IMO that's easy to let go of when presented with greater resources. Even as computers get stronger, everyone knows they do get bogged down from time-to-time, but efficiency is continually becoming less of an issue to all programmers - a dangerous trend IMO, but I digress * No flashing. This one's really nice, particularly for anyone who's had to tweak PID constants before. Even if the new controller had the most lightweight OS in the world just enough for a basic file system that would allow quick 'saves' and then a 'restart', the sometimes 2 minute flash process is unacceptable. * Floats. I know there are bit-shifting workarounds for the sometimes sketchy floating-point performance found in all things IFI they just become one less thing to think about and one less thing that could go wrong. The bigger things, that maybe not everyone will care about: * Language flexibility. Our code is written in Python. Even if interpreted languages are a little slower in run-time, I prefer it to compiling. Error handling and such are much more flexible too. * Threading. Sure, they aren't necessary, but they're nice. For instance, we ran each PID loop as its own thread and polled its state whenever we updated PWM values - why should the main program wait for this? This allows the very well optimized kernel to schedule work, not the inexperienced programmer. * Non-volatile run-time memory. A file system allows you to run simplistic programs whose only requirement allows you to save data between runs. The simplest being one that simply polls all pertinent variables, records time and state for each. Then parses the file into variable values with delta t's and can playback and pre-recorded run. It's still dead reckoning, and wouldn't have worked for the last few year's autons, but it's nice nonetheless. Random Cool Things That Also Become Possibilities: * Wireless Programming. This was really convenient for tweaking drive wheel PID constants. We replaced the GUMSTIX with a laptop running the same set of code (it's python, it'll go anywhere -- flexibility) and a wireless card. This allowed us to update PID constants on the fly over an ad-hoc nework with ssh from another laptop while the robot ran by radio on our practice field. It's as close to tweaking under real time situations as possible. If anyone has questions about our experiences, please feel free to PM me. Mostly, however, I encourage you to TRY IT. If you have a laptop with a serial port and python, you're good to go. I'll make an effort to update our site soon to make testing easier, but everything you need is there. You don't need to wonder about the future, try running your robot with Linux right now - adambots.com Pat |
Re: How important is Linux?
Quote:
|
Re: How important is Linux?
Quote:
I've followed the AdamBots system for the last few years and I think this is the initial step for all teams looking to get involved with Linux. Great Post Pat ! |
Re: How important is Linux?
To AdamBots:
How fast do you find the reaction time between setting a PWM on your co-processor to the speed controller actually reacting to it? Is there any delay or have you found it to be relatively responsive? |
Re: How important is Linux?
Quote:
Co-processors can only take in data (whether from the RC or from other sensors), process it, and send it back to the main RC. |
Re: How important is Linux?
Quote:
|
Re: How important is Linux?
Quote:
|
Re: How important is Linux?
More importantly, how much lag is between the joystick and the Victor?
I'd assume that it is at most 2 "cycles" of 20ish (26.4??) milliseconds. In other words, probably unnoticeable. Great work guys, I hope to see more of this sort of awesome in the future. |
Re: How important is Linux?
1 Attachment(s)
Sorry to revive an old thread, but I'd like to input my say.
Kevin, For the most part it is probably a small crowd. But, as the years go by more and more people are turning to Linux. It's about freedom of choice and flexibility. FIRST has a philosophy that everyone should have an equal footing. But, in a sense FIRST is inadvertently restricting the use of resources to teams by forcing teams to use proprietary software. For some that's fine, but for others it's a painstaking experience to find solutions to using it they way they want/need. It'd be nice to have an Open Source solution for ANYONE who does not want to use the current MPLAB from FIRST. It could be multi-platform, so it courd be used by Linux, Macs, or Windows users. With more freedom... Better talents and ideas can come though. |
Re: How important is Linux?
Keen101, go ahead and revive it! Don't know who may be listening, but the topic is still relevent.
For my part, I'd like to see a system based on a popular core, and NO required software for the user processor. Required tasks, yes! But I see no need for FIRST to require the use of proprietary libraries, or a dictated framework. A Master processor in the system, can always take hold of the user processor via hardware (NMI or hold the Reset) if they need to override. Just require us to answer the Master when it calls, within a specified time window, and pass appropriate data. If you use a popular core (ie: ARM), an advanced programmer could use Linux, or any other ported OS, instead of whatever framework FIRST wanted to supply. Likewise, they could have their choice of available IDE or compiler. The greatest issue for our team, is cost of the software. Programming isn't a curriculum item in our school district, so any instruction for new programmers has to come from the team. We can't afford licenses for the kids to take home and install, nor can we buy extra controllers. This year I started teaching C using a Zilog processor. The kit is only $50, and Zilog gives away (free on their site) the IDE >WITH< a FULLY FUNCTIONAL (read NO limitations, including Floaing Point and Trig functions) ANSI C Compiler. The IDE is very similar to MPLAB in look and feel. We've got more kids working on programming for this year than we heve ever had in the past. Yes, I like Zilog, but I'm not saying its the best choice. What I'm getting at, is we need to have a controller and programming tools that are redily available and inexpensive for students to have access, and work with outside of the Robo Room. No proprietary boot loader or programming hardware involved, so they can practice on something that doesn't cost $1500, but still work with an environment that can be used to program the real thing. We also need some self-contained subsystems. For a newbie programmer, trying to tune a PID loop operating across 3 processors (User, Master, and the Bit-Twiddler in a Victor), is a frustrating if near impossible task! Steve |
Re: How important is Linux?
OK, thanks Steve.
If anyone out there is listening... Hopefully FIRST, then please hear what I have to say. How important is Linux? I don't know. For the most part it probably does not affect many of the FIRST community, but it does effect some. It affects me. It is important to me. It's important to a group of people, who want everything in FIRST to be accessible. Without that freedom, it's inadvertently suppressing peoples creativity and ability to learn. Maybe I'm being over dramatic, but it almost seems like no one from FIRST or the community cares. |
Re: How important is Linux?
Quote:
That said, it would be nice to have a more powerful RC. Weather this means running a full blown operating system (go! linux! go!) or just having default code to match would be a non-issue to me as long as we still have open-ish access to low level operations. The last thing I want to request is true object orientation. I don't think I have to explain myself here, but weather its a move from C to Obj-C or from C to Java, Object orientation really does have its benefits. I feel, however, that a more pressing issue (for me) would be that of an IDE on linux/mac. FIRST Robotics is an organization of geeks (in an endearing way)! This means that of all the possible target audiences your software should apply to, this one has an abnormally high concentration of linux/mac users (half of our programming team does not use windows). There are so many ways to implement an IDE across all the platforms.. Why should I need to have 20GB of VmWare (or parallels) on my computer to run the supported IDE? This is probably for another thread though... p.s. I have been eyeing the Arduino project for a while. Its based on C and costs $34. Comes with USB onboard, open source, win/mac/linux, good documentation.. Not powerful enough for the next RC, but certainly to play with at home if you can't afford to risk breaking the team's RC! |
Re: How important is Linux?
From my point of view Parallel processing is the future, not sequential processing with an RTOS. To be able to acomplish 8 - 16 or 32 tasks, all at the same time and more if you add what you can do sequentially in the processors spare time. And programming would stay the same or possibly be simpler.
|
Re: How important is Linux?
I would say that Linux on the controller is not important unless the robot controller system can also have disk files, a much wider telemetry link to/from the OI, etc. I suspect using Linux would make the "level playing field" problem worse rather than better. I agree with one of the other posters to this thread - writing Linux drivers is no picnic. The system we come up with needs to be much easier to use than that. Maybe one of the real-time variants of Linux would work. (I'm not familiar with any.)
No doubt there are a number of good RTOS designs that we could borrow from to implement these or similar ideas once we have a processor that can support them. What we need is a basic RTOS that can provide one background "process" and provide an API that allows the programmer to hook up interrupt handlers. The one background process lets the programmer do compute-intensive tasks like navigation in a process that is not tied to the OI cycle. With the current framework such a process needs to be split into stages with such awkward constructs as switch statements. The worst part is writing the functions so that they can be called from the top each cycle. A background process in a RTOS does not need to be staged, or if coroutines are desired, a simple call to a RTOS function can be made to suspend the current coroutine so that another coroutine can be activated. The first coroutine then picks up at the spot where it left off next time it is activated through the coroutine interface. Coroutines don't require much API support (setjmp and longjmp are almost enough). One key is that the 26.2 ms OI cycle needs to be driven from an interrupt, and there needs to be more than one priority of interrupts, so that things like gear tooth sensors can interrupt the 26.2 ms OI cycle interrupt (to be counted) and return to it. I think a system like this would help with the level playing field problem by providing support for interrupts (takes most of the arcane mumbo-jumbo out of it, though your new framework does a pretty good job). Such an RTOS would not be complex (it could probably be written in less than 1000 lines of C code), but supporting it on our current processor would stretch it to the outer limits. I investigated the idea a couple of years ago and while I think it could be done, it is not practical. |
Re: How important is Linux?
This year we are using Linux via a desktop PC modified to fit within the rules. There is almost no latency if you use the programming port to communicate with the RC, and the only code we have on the RC is code to send input updates and receive output updates :p (only 5 lines of code :yikes: (and a lookup table (It's dang fast))).
I feel that Linux is very important due to ease of use, support, and no vendor lock in. You can figure out how to do just about anything on Linux with only a good understanding of google, and most of the code you need for anything is already written in just about any language under the sun. |
Re: How important is Linux?
Quote:
|
Re: How important is Linux?
Quote:
Hope that answers your questions. And then to explain. We do, as I said before, have a minimal amount of code on the PIC processor to forward input/output data between the robot controller and the Linux machine. |
Re: How important is Linux?
Quote:
Quote:
It *is* possible to have five lines of code if the robot isn't using ANY controller digital inputs or outputs and has no pnuematics or sensors of any kind attached to the robot controller. In this case you can just pass the data packet from the OI to the linux box and vice versa. If that is the case then such a setup isn't useful for most teams. |
Re: How important is Linux?
I think he has 5 lines of code that loop through the lookup table and send the data stored there back and forth. That would be pretty low line count and also give useful access to controls.
|
| All times are GMT -5. The time now is 20:02. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi