Skip to content

Commit

Permalink
rm IIF dependency and examples from docs until DFG v1
Browse files Browse the repository at this point in the history
  • Loading branch information
Affie committed Nov 1, 2024
1 parent b75b90b commit 59c7d40
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
1 change: 0 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Compose = "a81c6b42-2e10-5240-aca2-a61377ecd94b"
DistributedFactorGraphs = "b5cc3c7e-6572-11e9-2517-99fb8daf2f04"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
GraphPlot = "a2cc645c-3eea-5389-862e-a155d0052231"
IncrementalInference = "904591bb-b899-562f-9e6f-b8df64c7d480"

[compat]
Documenter = "1"
14 changes: 7 additions & 7 deletions docs/src/BuildingGraphs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

In this section constructing DFG graphs will be discussed. To start, bring DistributedFactorGraphs into your workspace:

```@example buildingGraphs; continued = true
```julia
using DistributedFactorGraphs
```

Expand All @@ -14,7 +14,7 @@ So for the following examples, IncrementalInference will be used to create the v
using Pkg
Pkg.add("IncrementalInference")
```
```@example buildingGraphs; continued = true
```julia
using IncrementalInference
```

Expand All @@ -30,7 +30,7 @@ To continue the example, run one of the following to create a DFG driver:

### Creating a GraphsDFG Graph

```@example buildingGraphs; continued = true
```julia
# Create a DFG with default solver parameters using the Graphs.jl driver.
dfg = GraphsDFG{SolverParams}(solverParams=SolverParams())
```
Expand All @@ -54,7 +54,7 @@ In addition, the following optional parameters are provided:

Three variables are added:

```@example buildingGraphs; continued = true
```julia
v1 = addVariable!(dfg, :x0, ContinuousScalar, tags = [:POSE], solvable=1)
v2 = addVariable!(dfg, :x1, ContinuousScalar, tags = [:POSE], solvable=1)
v3 = addVariable!(dfg, :l0, ContinuousScalar, tags = [:LANDMARK], solvable=1)
Expand All @@ -73,7 +73,7 @@ Additionally, the solvable flag is also set to indicate that the factor can be u

Four factors are added: a prior, a linear conditional relationship with a normal distribution between x0 and x1, and a pair of linear conditional relationships between each pose and the landmark.

```@example buildingGraphs; continued = true
```julia
prior = addFactor!(dfg, [:x0], Prior(Normal(0,1)))
f1 = addFactor!(dfg, [:x0; :x1], LinearRelative(Normal(50.0,2.0)), solvable=1)
f1 = addFactor!(dfg, [:l0; :x0], LinearRelative(Normal(40.0,5.0)), solvable=1)
Expand All @@ -97,12 +97,12 @@ variable and factor labels can be retrieved with the [`ls`](@ref)/[`listVariable
[`lsf`](@ref)/[`listFactors`](@ref) functions:

For example listing the variables in the graph we created above:
```@example buildingGraphs
```julia
ls(dfg)
```

Or listing the factors:
```@example buildingGraphs
```julia
lsf(dfg)
```

Expand Down
10 changes: 5 additions & 5 deletions docs/src/DrawingGraphs.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ Pkg.add("GraphPlot")

Then bring `GraphPlot` in before DFG:

```@example plots; continued = true
```julia
using GraphPlot
using DistributedFactorGraphs
```

Any factor graph can then be drawn by calling [`plotDFG`](@ref):

```@example plots
```julia
using Cairo # hide
# Construct graph using IIF
using IncrementalInference
Expand All @@ -42,7 +42,7 @@ plotDFG(dfg)

The graph can be rendered to PDF, SVG or JPG in the following way by including compose:

```@example plots
```julia
using Compose
# lets add another variable and factor and plot it
dfg.solverParams.graphinit = false # hide
Expand All @@ -52,7 +52,7 @@ addFactor!(dfg, [:x1; :x2], LinearRelative(Normal(50.0,2.0)));
draw(SVG("graph.svg", 10cm, 10cm), plotDFG(dfg));
nothing # hide
```
![](graph.svg)
FIXME show graph.svg


### More Information
Expand All @@ -67,7 +67,7 @@ and can be drawn by either:
- Calling [`toDot`](@ref) on any graph to produce a string of the graph
- Calling [`toDotFile`](@ref) on any graph to save it directly to a dotfile

```@example
```julia
using DistributedFactorGraphs
# Construct graph using IIF
using IncrementalInference
Expand Down

0 comments on commit 59c7d40

Please sign in to comment.