# Anyone using Julia for drones (or other embedded)? Any forseen problems?

**URL:** <https://discourse.julialang.org/t/anyone-using-julia-for-drones-or-other-embedded-any-forseen-problems/18755>\
**Category:** General Usage\
**Created:** [December 17, 2018, 5:28pm UTC](https://discourse.julialang.org/t/anyone-using-julia-for-drones-or-other-embedded-any-forseen-problems/18755 "2018-12-17T17:28:16Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![tkoolen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkoolen/32/1603_2.png) [@tkoolen](https://discourse.julialang.org/u/tkoolen)\
**Post date:** [December 17, 2018, 8:02pm UTC](https://discourse.julialang.org/t/anyone-using-julia-for-drones-or-other-embedded-any-forseen-problems/18755/3 "2018-12-17T20:02:46Z")

</div>

You should _easily_ be able to hit 1000 Hz for an EKF-based state estimator, _as long as you don’t allocate_, as you’ve noted from our case study, since

```julia
julia> using BenchmarkTools

julia> @btime GC.gc()
  46.261 ms (0 allocations: 0 bytes)

```

Over at [QPControl.jl](https://github.com/tkoolen/QPControl.jl), @rdeits and I implemented a basic QP-based controller for a humanoid robot that doesn’t allocate and runs at about 1000 Hz. That controller performs various rigid body dynamics calculations, sets up a QP, and solves it within that millisecond, so I would definitely not expect any problems in terms of throughput for control and state estimation for a drone.

Despite the lack of allocation, we did observe somewhat significant jitter on a Linux machine without special precautions taken. Pegging the CPU frequency helps a bit: using a simple `BenchmarkTools` test, I’m getting times between 945 μs and 1385 μs right now. We haven’t had the chance to try this on a machine with the realtime kernel patch.

Avoiding allocations can be a hassle, and I’m hoping we’ll soon get new tools to help with this (😉@jeff.bezanson).

---

_[View the full topic](https://discourse.julialang.org/t/anyone-using-julia-for-drones-or-other-embedded-any-forseen-problems/18755)._
