Frequently Asked Questions

Factor Graphs: why not just filter?

Why can't I just filter, or what is the connection with FGs? See the "Principles" section in the documentation.

Why worry about non-Gaussian Probabilities

The non-Gaussian/multimodal section in the docs is dedicated to precisely this question.

Why Julia

The JuliaLang and (JuliaPro) is an open-source Just-In-Time (JIT) & optionally precompiled, strongly-typed, and high-performance programming language. The algorithmic code is implemented in Julia for many reasons, such as agile development, high level syntax, performance, type safety, multiple dispatch replacement for object oriented which exhibits several emergent properties, parallel computing, dynamic development, cross compilable (with gcc and clang) and foundational cross-platform (LLVM) technologies. See JuliaCon2018 highlights video. Julia can be thought of as either {C+, Mex (done right), or as a modern Fortran replacement}.

Current Julia version?

Caesar.jl and packages are currently targeting Julia version as per the local install page.

Just-In-Time Compiling (i.e. why are first runs slow?)

Julia uses just-in-time compilation (unless already pre-compiled) which takes additional time the first time a new function is called. Additional calls to a cached function are fast from the second call onwards since the static binary code is now cached and ready for use.

How does garbage collection work?

A short description of Julia's garbage collection is described in Discourse here.


Garbage collection can be influenced in a few ways to allow more certainty about operational outcome, see the Julia Docs Garbage Collection Internal functions like enable, preserve, safepoint, etc.

Using Julia in real-time systems?

See the JuliaCon presentation by rdeits here.

Can Caesar.jl be used in other languages beyond Julia? Yes.

The Caesar.jl project is expressly focused on making this algorithmic code available to C/Fortran/C++/C#/Python/Java/JS. Julia itself offers many additional interops. ZMQ and HTTP/WebSockets are the standardized interfaces of choice, please see details at the multi-language section). Consider opening issues or getting in touch for more information.

Static, Shared Object .so Compilation

Packages are already compiled to static objects (.ji files), but can also be compiled to more common .so files. See this AOT vs JIT compiling blog post for a deeper discussion. Also see this Julia Binaries Blog. See recent dedicated issue tracker here. Initial work is for system image is described in the docs here.


recent developments announced on discourse.. Also see new brute force sysimg work at Fezzik.jl.

Can Julia be Embedded into C/C++

Yes, see the Julia embedding documentation page.

ROS Integration

ROS and ZMQ interfaces are closely related. Please see the ROS Integration Page for details on using ROS with Caesar.jl.

Why ZMQ Middleware Layer (multilang)?

Zero Message Queue (ZMQ) is a widely used data transport layer used to build various other multiprocess middleware with wide support among other programming languages. Caesar.jl has on been used with a direct ZMQ type link, which is similar to a ROS workflow. Contributions are welcome for binding ZMQ endpoints for a non-ROS messaging interface.

Note ZMQ work has been happening on and off based on behind the main priority on resolving abstractions with the DistributedFactorGraphs.jl framework. See ongoing work for the ZMQ interface.

What is supersolve?

When multiple numerical values/solutions exists for the (or nearly) same factor graph – then solutions, including a reference solution (ground truth) can just be stacked in that variable. See and comment on a few cases here.

Variable Scope in For loop Error

Julia wants you to be specific about global variables, and variables packed in a development script at top level are created as globals. Globals can be accessed using the global varname at the start of the context. When writing for loops (using Julia versions 0.7 through 1.3) stricter rules on global scoping applied. The purest way to ensure scope of variables are properly managed in the REPL or Juno script Main context is using the let syntax (not required post Julia 1.4).

fg = ...
tree, smt, hist = solveTree!(fg)
# and then a loop here:
let tree=tree, fg=fg
for i 2:100
   # global tree, fg # forcing globals is the alternative
   # add variables and stuff
   # want to solve again
   tree, smt, hist = solveTree!(fg, tree)
   # more stuff
end # let block

See Stack overflow on let or the Julia docs page on scoping. Also note it is good practice to use local scope (i.e. inside a function) variables for performance reasons.


This behaviour is going to change in Julia 1.5 back to what Julia 0.6 was in interactive cases, and therefore likely less of a problem in future versions. See Julia 1.5 Change Notes, ([#28789], [#33864]).

How to Enable @debug Logging.jl

How does JSON-Schema work?

Caesar.jl intends to follow, see step-by-step guide here.

How to get Julia memory allocation points?

See discourse discussion.

Increase Linux Open File Limit?

If you see the error "Open Files Limit", please follow these intructions on your local system. This is likely to happen when debug code and a large number of files are stored in the general solution specific logpath.