Date: Sat, 22 Apr 2006 20:22:54 -0500 (CDT) Subject: real time in user space X-UID: 167 Content-Type: IMAGE/JPEG; name="design20060422.jpg" The robot is back together with what appears to be a stable control system. It is not perfect. But when it works, it seems to work well. And when it doesn't work well, then it either is completely inoperative or it is obvious that things are in a bad state. What I had thought to be new is really a very conventional approach. The Linux HOWTO for Yodaiken's RTLinux (now a commercial product) devotes a section to this technique. Here is what it looks like. user space process ----realtime FIFO----> special hard RT process What I'm doing is very similar. The difference is that all scheduling is soft real time and entirely in user space. Robert Love asserts that this is often sufficient. He wrote the pre-emptive kernel patch for Linux. This experience with the robot control system validates his assertion although I would add that significant system tuning and testing is an additional cost of this approach. The event processing loops and device I/O must be carefully managed in concert with process scheduling and priority in order to have good real time performance. This can be complicated. In a big system, it might be difficult or impossible to know that the system works in all situations. I'm prepared for driving the robot tomorrow morning. I want to be out there when the sun rises with a full night's sleep. I've learned my lesson from last week. If you have to rush and lack confidence that the system will work properly, hold off and spend more time sleeping, in development, or testing. The long command lines are now in shell scripts. So now it is much easier to get everything running. My hope tomorrow morning is to have a good run with sensor and control data logged against the same timebase with video. This will allow for better visualization of what is going on into the future. It is also a necessary first step for selecting image processing algorithms required for autonomous operation.