3 minute read

“You would need Ansible for this”

Introduction

Realtime-ness is getting discussed a lot in recent years for “software defined vehicles”. It all starts with a fear that current driver assistant systems would not be capable to process the amount of information that generated by the increasing amount of sensors. However, recent academic studies and industry practices hinted this fear is no longer of a key concern.

Moreover, the industry is seeing a trend which companies are increasingly moving from hard-realtime systems to a softer and much versatile system for more advanced features such as autonomous driving. The use of such systems(no matter it is AutoSar or ROS-like), brings the idea of predictability to people’s attention. Nowadays, it would even be appropriate to say the future of a safer autonomous driving system depends on a more predictable system rather than a hard-realtime framework.

Realtime-ness

Here the realtime-ness refers to the hard realtime guarantee that a piece of information would arrive to the recipients in a given amount of time. Otherwise, the system would, in the most extreme cases, coredump and reset itself. This has been the standard practice for latency demanding systems for at least 30 years. But now, as the emergence of autonomous driving, the hard-realtime solution is struggling to catch up with the trend. Currently, neither AutoSar nor ROS offers traditional hard-realtime solutions yet these are the most popular two frameworks for autonomous driving. One autonomous driving framework that do offer hard-realtime feature is Baidu’s Apollo. Unlike other systems, it is effectively the classic system(similar to AutoSar CP at least from what I know) but with modern APIs that one can use for more advanced features.

Speaking of compare and contrast, almost every single developer hates the hard-realtime system. The reasons are quite obvious, they are hard to program, even harder to program correctly and is the hardest to debug what went wrong in the program. For the return, one could get a system that is not fail-aware and no need to mention fail-tolerate. What makes things worse is modern autonomous driving solutions can not meet hard-realtime constrains by default. Imagine the system load and processing power required when driving on a busy city road and on an empty highway. These differences ultimately rendered the hard-realtime systems obsolete.

Predictability

Predictability on the other hand was only considered as a second choice for latency demanding systems. But they are increasingly becoming the go-to choice for more complicated systems. This shift is primarily dur to the fact that a predictable system has proved itself in terms of the stability and safety in industry. With a systematic approach, people can now achieve a similar level of system stability and durability which was only offered by the hard-realtime approach. And with the flexibility and usability improvements, the industry is now able to what was only in dreams into productions that are road ready. And all of this can happen with only half the time that would normally would require to develop a hard-realtime system. And in our humble opinion, this trend would continue for at least another decade until we can develop something that could code hardcore embedded systems faster.

However, it is the most important to realize that predictable system does not offer the exact same level of guarantee that hard-realtime system does. And even to achieve a similar level of performance, a more complicated systematic approach needs to be adopted. This requires a strong vertical integration capability which seems to be lacking in many traditional automakers. One interesting thing is that a well established company that has last for more than a century just could not handle such challenges. A complete integration test of their autonomous driving demo would require ~100 people from all over the world and two weeks. In contrast, we do the same thing twice a week, requiring two people and three hours, and this is because the test route requires 3 hours to drive.

Conclusion

In this post, a brief discussion on realtime-ness vs predictability is presented. To summarize, try a predictable system first before diving into the mess of hard realtime-ness.

“Hail the Omnissiah! He is the God in the Machine, the Source of All Knowledge.”


Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.