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, 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.

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.

Note

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.

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.

ROS Integration

ROS integration is a priority for this project and will accompany the so-called 'prime time' release of the code. ROS and ZMQ interfaces are closely related.

Note the present focus (2018Q3-2019Q2) is to stabilize the ZMQ interface.

Voice Please add your voice of support or suggestions on ROS integration here.

WIP Please see work on an initial PoC (still using PyCall) via our wiki developer docs here.

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
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.

Note

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

https://stackoverflow.com/questions/53548681/how-to-enable-debugging-messages-in-juno-julia-editor

How does JSON-Schema work?

Caesar.jl intends to follow json-schema.org, 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.