You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+51-2Lines changed: 51 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -15,9 +15,58 @@ DistributedFactorGraphs.jl provides a flexible factor graph API for use in the [
15
15
Please see the [documentation](http://juliarobotics.github.io/DistributedFactorGraphs.jl/latest/) and the [unit tests](https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/tree/master/test) for examples on using DistributedFactorGraphs.jl.
16
16
17
17
# Installation
18
-
DistributedFactorGraphs.jl has not been registered yet, and should be installed by cloning this repository:
18
+
DistributedFactorGraphs can be installed from Julia packages using:
19
+
```julia
20
+
add DistributedFactorGraphs
21
+
```
22
+
23
+
# Usage
24
+
DistributedFactorGraphs (DFG) currently supports two implementations:
25
+
* An in-memory factor graph based on Graphs.jl
26
+
* A Neo4j-based factor graph based on Neo4j.jl
27
+
28
+
The in-memory implementation is the default. The Neo4j driver can be enabled by importing Neo4j before DFG:
# To enable the Neo4j driver, import Neo4j.jl first
32
+
using Neo4j
33
+
using DistributedFactorGraphs
22
34
```
23
35
36
+
Both drivers support the same functions, so choose which you want to use when creating your initial DFG. For example:
37
+
38
+
```julia
39
+
# In-memory DFG
40
+
dfg =GraphsDFG{NoSolverParams}()
41
+
addVariable!(dfg, DFGVariable(:a))
42
+
addVariable!(dfg, DFGVariable(:b))
43
+
addFactor!(dfg, [v1, v2], DFGFactor{Int, :Symbol}(:f1)) # Rather use a RoME-type factor here (e.g. Pose2Pose2) rather than an Int, this is just for demonstrative purposes.
addFactor!(dfg, [v1, v2], DFGFactor{Int, :Symbol}(:f1)) # Rather use a RoME-type factor here (e.g. Pose2Pose2) rather than an Int, this is just for demonstrative purposes.
56
+
```
57
+
58
+
Please see the documentation for more information on interacting with the factor graph.
59
+
60
+
## Setting up a Quick Neo4j Database
61
+
The simplest way to set up a test database is with Docker.
62
+
63
+
To pull the Neo4j image:
64
+
```bash
65
+
docker pull neo4j
66
+
```
67
+
68
+
To run the image with user `neo4j` and password `test`:
69
+
70
+
```bash
71
+
docker run --publish=7474:7474 --publish=7687:7687 --env NEO4J_AUTH=neo4j/test neo4j
0 commit comments