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
SDK.py@v0.6.0 currently does not support creating new sessions from "guest", but variables and factors can be added to an existing session.
23
+
:::
19
24
20
-
The `addVariable` function with a label `"x0"` and type `:Pose2` adds that variable to to the factor graph.
25
+
Let's start with `addVariable`
26
+
```{eval-rst}
27
+
.. autofunction:: navability.services.addVariable
28
+
```
21
29
30
+
by adding a randomly named variable an existing graph. Here we call `addVariable` as type `VariableTypes.Pose2`. Pose2 here refers to position an orientation on a flat 2D plane -- i.e. the variable represents the estimation problem to find the state of variable with freedoms `[x,y,theta]`:
Note that asynchronous tasks are used to increase the upload performance. Each of these events are queued on the server for processing. While the variable is being created, let's also add a prior factor.
40
+
:::{tip}
41
+
Note that asynchronous tasks could increase client side upload performance. Each of these events are queued on the server for processing. While the variable is being created.
42
+
:::
43
+
44
+
## Adding Factors
45
+
46
+
Next, we can also add a factor. Have a look at the `addFactor` function followed by how a user defines the factor measurement and observation model in the next section.
27
47
28
48
```{eval-rst}
29
-
.. autofunction:: navability.services.addVariable
49
+
.. autofunction:: navability.services.addFactor
30
50
```
31
51
32
-
### And Zero-Prior
52
+
### A Zero-Prior
33
53
34
-
We now have a factor graph with one variable, but to solve it we need some additional information. In this example, we need the estimated starting point of our robot.
54
+
Let's first add a Prior. Priors are absolute information about variables.
55
+
:::{tip}
56
+
NavAbility factor graph solutions at this time require a gauge to exist for the graph being solved, hence enough prior information must be included in the graph to constrain the solution (bundles/orbits/locii) to a single solution. **Note** that this does not imply solutions are necessarily unimodal (Gaussian).
57
+
:::
58
+
59
+
In this example, we'll use the estimated starting point of our robot.
35
60
We use unary factors called priors to represent absolute information to be introduced. In this case we use `PriorPose2`, as our variable type is also `Pose2`.
36
61
Since factors represent a probabilistic interaction between variables, we need to specify the distribution our factor will represent. Here we use `FullNormal` which is a [multivariate normal distribution](https://en.wikipedia.org/wiki/Multivariate_normal_distribution).
37
62
38
63
Let's create a `PriorPose2` unary factor with zero mean and a covariance matrix of (`diagm([0.05,0.05,0.01].^2)`):
Copy file name to clipboardExpand all lines: docs/nvatutorials.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
# NavAbility Tutorials
2
2
3
3
These Tutorials can be read as static pages or be run live via Binder. Either of the options below should work.
4
-
## Run Via NavAbility App
4
+
<!--## Run Via NavAbility App
5
5
6
6
A free tier access to NavAbility servers is provided through the user `guest@navability.io`. To learn more about using the guest user, consider trying the [NavAbility Tutorials](https://app.navability.io/get-started/tutorials).
There is a handy alias familiar to Linux, `ls = listVariables`, e.g. `ls(fgclient)` returns all the variables in the graph.
42
+
:::
43
+
40
44
### Getting a Variable
41
45
42
46
The main purpose of using a factor graph is not only as data index but also to deeply connect with the mapping and localization problem. Variables in the factor graph represent the states to be estimated from the relevant measurement data. The numerical values for each variable are computed by any number of solver operations. The numerical results are primarily stored in a variables `solverData` field, such that either parametric or non-parametric inference results can be used:
0 commit comments