Comments by "Vitaly L" (@vitalyl1327) on "Ask a Roboticist: Meet Fifi | Boston Dynamics" video.
-
3
-
3
-
1
-
@conorstewart2214 of course, if you can use an MCU or an FPGA, you should use them. But if you need more compute power, then a beefier ARM or even an x86 is unavoidable. In this case Linux is perfect - you can isolate one or more CPU cores, set nohz_full for them, disable RCU interrupts on those cores, and then any Linux process running on such a core exclusively, avoiding any system calls (i.e., no context switches) will be suitable for real-time, the only variable timing will be memory access then.
Even better if you're using a heterogenous SOC (such as Xilinx UltraScale+) - you'll get a real-time MCU there, an FPGA, and Linux-capable ARM cores, so you can easily mix and match hard real-time and soft real-time and not-real-time-at-all loads on the same device, all driven conveniently by Linux.
1
-
1
-
@conorstewart2214 MCUs are also not ideal for real-time (even Cortex-R line) - thanks to sequential execution and interrupts that many peripherals insist on using.
A Linux process running on an overpowered device, with zero interrupts, solely using DMA for communicating with devices, will have better results than an MCU trying to do more than one thing.
Same reason why MPSoCs are so useful, you do not waste tiime on communication and communication between system components is guaranteed to be real-time (which is not the case with the usual suspects like CAN).
Also, control in robotics is a real-time problem on all levels. Not just the hard real-time things that MCUs can do, such as FoC, but higher levels - gait control, if it's a legged robot, VSLAM for any mobile robot - it's all real-time, and most of the pipeline is too computationally intensive to run on even the beefiest MCU. Good luck doing computer vision processing for 4 stereo camera feeds on an MCU. So, you need a more general purpose compute device, and, as a consequence, an OS running on it. And this is my point - Linux is perfect as such an OS, and there is no need to use specialised real-time OSes, thanks to the isolation I described previously.
Also note that the same approach is very common not only in robotics, but in the other hard real-time areas, including high-frequency trading.
1