Your choice of OS is not very suitable for determining the limitations of a "humanoid robot", there is no specific "humanoid robot", and, of course, no OS will be determined by how high such a robot is! ;-)! Critical factors:
- real-time restrictions (for controlling the movement of the PID update, response time of the sensor / actuator, etc.)
- processor architecture
- system architecture (e.g. distributed processing , multisymmetric processing )
Other factors may be important, for example:
- Communication and I / O requirements (e.g. Ethernet, TCP / IP, USB, WiFi).
- File system support.
although in all cases they are not necessarily an integral part of the OS, since in many cases platform-independent libraries are available, but where you need them, integration with the OS can be useful, since it allows you to avoid thread safety and blocking resources.
None of the proposed options are likely to be on my list.
Any Linux server will require an MMU (unless you use uCLinux or its derivatives, but MMU support is one of the few good reasons for using Linux in an embedded system). Linux is not designed to work in real time, and any real-time support it has is largely conceived and rarely will be as deterministic as real RTOS. Any Linux will also require significant memory resources just to boot, expect at least 4 MB of RAM for something useful, while RTOS kernels such as FreeRTOS and uC / OS-II only require about 4 KB - here you compare the chalk and cheese. However, they do not have the utility of a Linux-based OS such as file systems or network support (although they can be added as stand-alone libraries).
If you intend to perform motion control and sensor / actuator control functions on the same processor as your cognitive functions, then you definitely need deterministic RTOS. If, however, the platform is a distributed system with separate processors that use motion control and other input / output sensors / actuators in real time, then you can leave with a simple RTOS kernel or not have an OS in the input / output processors (which can also be smaller, less powerful processors) and GPOS in cognitive (decision making and planning).
I recently rated FreeRTOS, it is minimalistic, simple and small, providing only the basic mechanisms of flows, time and IPC and a little more. It works, but there are so many other more attractive options, both commercial and non-commercial. I compared it with the Keil RTX kernel ( included in the MDK-ARM toolkit) and the commercial Segger embOS . It has a significantly slower context switching time than the other two candidates (although they are still in microseconds at 72 MHz Cortex-M3 and faster than anything you are likely to achieve with Linux).
uC / OS-II is well designed and documented (in a book by Jean Labros), and is great if you are aiming to see how RTOS works. His biggest failure is a very strict priority planning scheme that is effective for very small goals, but maybe not as flexible as you like. Each thread must be assigned a separate priority level, so it does not support cyclic scheduling, which is useful for background tasks that are not related to real time. uC / OS-III corrects this shortcoming, but again makes many other options.
If your target processor has an MMU, I highly recommend using an OS that supports it so that every thread or process is protected from any other, the system will be much more reliable and easier to debug, especially when designed as a team. In such an OS, an erroneous task that would otherwise stomp on some other thread resources with non-deterministic and it is usually difficult to debug the results will instead throw an exception and stop right where the error occurred, and not, perhaps, sometime later, when corrupted data b.
You probably do not need to limit yourself to a free or open source OS; many vendors allow free use for training and evaluation. I highly recommend you consider QNX Neutrino , it's free for non-commercial and academic use , and has the most reliable internal MMU support available in any real-time OS and all the development tools you need, including the Eclipse-based Momentics, included. This is more than just a planning core, including support for all the services you expect from a full OS. It works on ARM, x86, SH-4 PowerPC, and MIPS architectures. Working on x86 is especially useful, as it means that you can test and evaluate it and even develop most of your code in a VM running on your desktop .
Another alternative that is truly tough in real time, supported by OS services, in addition to simple scheduling and IPC, is eCos . It has its own, POSIX and uITRON API, standard drivers for CAN, ADC, SPI, I2C, FLASH, PCI, Serial, Filesystems, USB and PCI, etc. And includes support for TCP / IP networks. In this sense, it is a complete OS, but unlike Linux it is not monolithic; it is scalable and statically linked to your application code, so features that you don’t use are simply not included in the runtime binary. It works on ARM, CalmRISC, Cortex-M, FR-V, FR30, H8, IA32, 68K / ColdFire, Matsushita AM3x, MIPS, NEC V8xx, PowerPC, SPARC and SuperH. Again, theoretically, you can run the IA32 (x86) port on a PC virtual machine for testing and developing high-level code, although you will have to make it work, not like QNX, out of the box.
Added:
We know very little about operating systems in general. Do we need to know about them first? If so, what good, short primer for the topic?
This may not be the time to start exploring Linux (although it has the benefits of a wide acquaintance and community support, it will not need much, and many available support resources will not be familiar with real-time applications.
Chapter 2 of the Labrosse uC / OS-II book provides an overview of RTOS concepts such as scheduling, synchronization, and IPC that apply to most RTOS, not just uC / OS-II. Similar material is presented in a recent RTOS Fundamentals course at EETimes (it looks like it is sponsored by Mircium and uses uC / OS-II as an example, but for the most part it is common).
My decision to quickly start on any issue is Google with the topic “101” after it (general introductory course in academia). "RTOS 101" will provide you with several starting points, admittedly of varying quality - check the source’s reputation, if this is a company, they can be selling a specific product, if it is an amateur, they may have some understanding, but perhaps a narrow idea (often related to a particular favorite equipment) and may not have the rigor of a scientific article.
Added in relation to CONFIG_PREMPT_RT:
It does not provide Linux with a hard real-time OS. It may be suitable for some applications. If you are controlling the movement of the PID controller (instead of using a dedicated controller or a separate processor) or any closed loop feedback control, this patch will not enable it, at least not reliably. I found this: Comparing Linux approaches in real time . It discusses a number of approaches to using Linux in real-time applications, including CONFIG_PREMPT_RT. He discusses them in detail in part C.