Good videos, with context.
JuliaRobotics: Making robots walk with Julia | Robin Deits

JuliaRobotics: Making robots walk with Julia | Robin Deits

The Julia Programming Language
1 HN recommenders · discussed 2018–2021
Open YouTube ↗

About this video

Robin Deits presents the JuliaRobotics organization and shows how Julia is used to visualize, simulate and control a humanoid robot. The talk touches on real-time performance and composability across packages.

Why it appears in the archive

Julia fans point to it as a concrete example of Julia working for soft real-time robotics, especially when avoiding heap allocation.

AI-generated summary and labels from the source dataset; verify important details against the video. Source & credits.

From the Hacker News discussion

eigenspace · 2020-02 · rec

What does this have to do with garbage collection? If your concern is about latency in real time systems, Garbage collection isn't the problem, heap allocating memory is. Julia makes it easy to never allocate anything on the heap (unlike most garbage collected langauges). Check out this talk this discusses this in detail in the context of robotics: [VIDEO]

Read original comment ↗
eigenspace · 2021-06 · rec

Just because a GC exists doesn't mean you have to use it though. It's just another tool on your belt. There's various options depending on your problem. You could just hold firmly onto memory, preallocating all your buffers before the program starts and then don't allow them to be GC'd, you could also use stack allocated arrays like in StrideArrays.jl / StaticArrays.jl, or some combination of the above. You could also just manually use ccall to malloc and free memory as needed I guess. There's a nice talk here [1] about using julia in soft-real-time for robotics. I'd say the biggest impediment to real-time programming in julia currently is not the GC, but instead that the language has lots of optional optimizations that the compiler can choose to not perform if it thinks it'd be beneficial to do so, and those optimizations can change between minor versions. Hence, there's a lot of testing you'd need to do to make sure your code really is doing exactly what you want and you won't hit the GC or dynamic dispatch, and you'll need to redo that testing every time you update julia or any packages, which is obviously not ideal. [1] [VIDEO]

Read original comment ↗
ChrisRackauckas · 2018-08 · reference

Interesting to hear. This just isn't a thing I think is ever encountered in this kind of stuff. The author's previous struggle was to get to real-time. Getting below it wasn't something they really considered. Here's a talk they gave: [VIDEO]

Read original comment ↗
ChrisRackauckas · 2018-08 · reference

It's probably us that are using types in a weird way so it's my lack of explanation that's the issue. Types in Julia undergo multiple dispatch, so by passing a type into a generic function you can make the same generic algorithm run in different ways. So I use types to parallelize my code, calculate derivatives, propagate parameter uncertainties, and things like that. This talk from JuliaCon discusses a lot of the things for free that were developed by taking a type from one package and putting it into another: [VIDEO]

Read original comment ↗
fault1 · 2021-11 · critical

the problem with Julia in the use case of OP is really the fact that it is garbage collected (and perhaps also how its GC is tuned). You can work to eliminate allocations, but the memory determinism problem is more important in real time control and embedded systems. see for example, this video: [VIDEO] It's kind of why C is still king in this space.

Read original comment ↗