Skip to content

Commit d6edcea

Browse files
authored
Merge pull request #1073 from borglab/release/4.2a4
2 parents 76c7419 + 48488a9 commit d6edcea

File tree

98 files changed

+3000
-1571
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+3000
-1571
lines changed

.github/scripts/python.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,6 @@ cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
8383
make -j2 install
8484

8585
cd $GITHUB_WORKSPACE/build/python
86-
$PYTHON setup.py install --user --prefix=
86+
$PYTHON -m pip install --user .
8787
cd $GITHUB_WORKSPACE/python/gtsam/tests
8888
$PYTHON -m unittest discover -v

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ endif()
1111
set (GTSAM_VERSION_MAJOR 4)
1212
set (GTSAM_VERSION_MINOR 2)
1313
set (GTSAM_VERSION_PATCH 0)
14-
set (GTSAM_PRERELEASE_VERSION "a3")
14+
set (GTSAM_PRERELEASE_VERSION "a4")
1515
math (EXPR GTSAM_VERSION_NUMERIC "10000 * ${GTSAM_VERSION_MAJOR} + 100 * ${GTSAM_VERSION_MINOR} + ${GTSAM_VERSION_PATCH}")
1616

1717
if (${GTSAM_VERSION_PATCH} EQUAL 0)

doc/Doxyfile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ USE_MATHJAX = YES
11881188
# MathJax, but it is strongly recommended to install a local copy of MathJax
11891189
# before deployment.
11901190

1191-
MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
1191+
# MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
11921192

11931193
# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
11941194
# names that should be enabled during MathJax rendering.

doc/gtsam.lyx

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#LyX 2.2 created this file. For more info see http://www.lyx.org/
2-
\lyxformat 508
1+
#LyX 2.3 created this file. For more info see http://www.lyx.org/
2+
\lyxformat 544
33
\begin_document
44
\begin_header
55
\save_transient_properties true
@@ -62,6 +62,8 @@
6262
\font_osf false
6363
\font_sf_scale 100 100
6464
\font_tt_scale 100 100
65+
\use_microtype false
66+
\use_dash_ligatures true
6567
\graphics default
6668
\default_output_format default
6769
\output_sync 0
@@ -91,6 +93,7 @@
9193
\suppress_date false
9294
\justification true
9395
\use_refstyle 0
96+
\use_minted 0
9497
\index Index
9598
\shortcut idx
9699
\color #008000
@@ -105,7 +108,10 @@
105108
\tocdepth 3
106109
\paragraph_separation indent
107110
\paragraph_indentation default
108-
\quotes_language english
111+
\is_math_indent 0
112+
\math_numbering_side default
113+
\quotes_style english
114+
\dynamic_quotes 0
109115
\papercolumns 1
110116
\papersides 1
111117
\paperpagestyle default
@@ -168,6 +174,7 @@ Factor graphs
168174
\begin_inset CommandInset citation
169175
LatexCommand citep
170176
key "Koller09book"
177+
literal "true"
171178

172179
\end_inset
173180

@@ -270,13 +277,15 @@ Let us start with a one-page primer on factor graphs, which in no way replaces
270277
\begin_inset CommandInset citation
271278
LatexCommand citet
272279
key "Kschischang01it"
280+
literal "true"
273281

274282
\end_inset
275283

276284
and
277285
\begin_inset CommandInset citation
278286
LatexCommand citet
279287
key "Loeliger04spm"
288+
literal "true"
280289

281290
\end_inset
282291

@@ -1321,6 +1330,7 @@ r in a pre-existing map, or indeed the presence of absence of ceiling lights
13211330
\begin_inset CommandInset citation
13221331
LatexCommand citet
13231332
key "Dellaert99b"
1333+
literal "true"
13241334

13251335
\end_inset
13261336

@@ -1542,6 +1552,7 @@ which is done on line 12.
15421552
\begin_inset CommandInset citation
15431553
LatexCommand citealt
15441554
key "Dellaert06ijrr"
1555+
literal "true"
15451556

15461557
\end_inset
15471558

@@ -1936,8 +1947,8 @@ reference "fig:CompareMarginals"
19361947

19371948
\end_inset
19381949

1939-
, where I show the marginals on position as covariance ellipses that contain
1940-
68.26% of all probability mass.
1950+
, where I show the marginals on position as 5-sigma covariance ellipses
1951+
that contain 99.9996% of all probability mass.
19411952
For the odometry marginals, it is immediately apparent from the figure
19421953
that (1) the uncertainty on pose keeps growing, and (2) the uncertainty
19431954
on angular odometry translates into increasing uncertainty on y.
@@ -1992,6 +2003,7 @@ PoseSLAM
19922003
\begin_inset CommandInset citation
19932004
LatexCommand citep
19942005
key "DurrantWhyte06ram"
2006+
literal "true"
19952007

19962008
\end_inset
19972009

@@ -2190,9 +2202,9 @@ reference "fig:example"
21902202
\end_inset
21912203

21922204
, along with covariance ellipses shown in green.
2193-
These covariance ellipses in 2D indicate the marginal over position, over
2194-
all possible orientations, and show the area which contain 68.26% of the
2195-
probability mass (in 1D this would correspond to one standard deviation).
2205+
These 5-sigma covariance ellipses in 2D indicate the marginal over position,
2206+
over all possible orientations, and show the area which contain 99.9996%
2207+
of the probability mass.
21962208
The graph shows in a clear manner that the uncertainty on pose
21972209
\begin_inset Formula $x_{5}$
21982210
\end_inset
@@ -3076,6 +3088,7 @@ reference "fig:Victoria-1"
30763088
\begin_inset CommandInset citation
30773089
LatexCommand citep
30783090
key "Kaess09ras"
3091+
literal "true"
30793092

30803093
\end_inset
30813094

@@ -3088,6 +3101,7 @@ key "Kaess09ras"
30883101
\begin_inset CommandInset citation
30893102
LatexCommand citep
30903103
key "Kaess08tro"
3104+
literal "true"
30913105

30923106
\end_inset
30933107

@@ -3355,6 +3369,7 @@ iSAM
33553369
\begin_inset CommandInset citation
33563370
LatexCommand citet
33573371
key "Kaess08tro,Kaess12ijrr"
3372+
literal "true"
33583373

33593374
\end_inset
33603375

@@ -3606,6 +3621,7 @@ subgraph preconditioning
36063621
\begin_inset CommandInset citation
36073622
LatexCommand citet
36083623
key "Dellaert10iros,Jian11iccv"
3624+
literal "true"
36093625

36103626
\end_inset
36113627

@@ -3638,6 +3654,7 @@ Visual Odometry
36383654
\begin_inset CommandInset citation
36393655
LatexCommand citet
36403656
key "Nister04cvpr2"
3657+
literal "true"
36413658

36423659
\end_inset
36433660

@@ -3661,6 +3678,7 @@ Visual SLAM
36613678
\begin_inset CommandInset citation
36623679
LatexCommand citet
36633680
key "Davison03iccv"
3681+
literal "true"
36643682

36653683
\end_inset
36663684

@@ -3711,6 +3729,7 @@ Filtering
37113729
\begin_inset CommandInset citation
37123730
LatexCommand citep
37133731
key "Smith87b"
3732+
literal "true"
37143733

37153734
\end_inset
37163735

doc/gtsam.pdf

-148 Bytes
Binary file not shown.

doc/math.lyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2668,7 +2668,7 @@ reference "eq:pushforward"
26682668
\begin{eqnarray*}
26692669
\varphi(a)e^{\yhat} & = & \varphi(ae^{\xhat})\\
26702670
a^{-1}e^{\yhat} & = & \left(ae^{\xhat}\right)^{-1}\\
2671-
e^{\yhat} & = & -ae^{\xhat}a^{-1}\\
2671+
e^{\yhat} & = & ae^{-\xhat}a^{-1}\\
26722672
\yhat & = & -\Ad a\xhat
26732673
\end{eqnarray*}
26742674

@@ -3003,8 +3003,8 @@ between
30033003
\begin_inset Formula
30043004
\begin{align}
30053005
\varphi(g,h)e^{\yhat} & =\varphi(ge^{\xhat},h)\nonumber \\
3006-
g^{-1}he^{\yhat} & =\left(ge^{\xhat}\right)^{-1}h=-e^{\xhat}g^{-1}h\nonumber \\
3007-
e^{\yhat} & =-\left(h^{-1}g\right)e^{\xhat}\left(h^{-1}g\right)^{-1}=-\exp\Ad{\left(h^{-1}g\right)}\xhat\nonumber \\
3006+
g^{-1}he^{\yhat} & =\left(ge^{\xhat}\right)^{-1}h=e^{-\xhat}g^{-1}h\nonumber \\
3007+
e^{\yhat} & =\left(h^{-1}g\right)e^{-\xhat}\left(h^{-1}g\right)^{-1}=\exp\Ad{\left(h^{-1}g\right)}(-\xhat)\nonumber \\
30083008
\yhat & =-\Ad{\left(h^{-1}g\right)}\xhat=-\Ad{\varphi\left(h,g\right)}\xhat\label{eq:Dbetween1}
30093009
\end{align}
30103010

@@ -6674,7 +6674,7 @@ One representation of a line is through 2 vectors
66746674
\begin_inset Formula $d$
66756675
\end_inset
66766676

6677-
points from the orgin to the closest point on the line.
6677+
points from the origin to the closest point on the line.
66786678
\end_layout
66796679

66806680
\begin_layout Standard

doc/math.pdf

8 Bytes
Binary file not shown.

examples/DiscreteBayesNetExample.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,9 @@ int main(int argc, char **argv) {
5353
// Create solver and eliminate
5454
Ordering ordering;
5555
ordering += Key(0), Key(1), Key(2), Key(3), Key(4), Key(5), Key(6), Key(7);
56-
DiscreteBayesNet::shared_ptr chordal = fg.eliminateSequential(ordering);
5756

5857
// solve
59-
auto mpe = chordal->optimize();
58+
auto mpe = fg.optimize();
6059
GTSAM_PRINT(mpe);
6160

6261
// We can also build a Bayes tree (directed junction tree).
@@ -69,14 +68,14 @@ int main(int argc, char **argv) {
6968
fg.add(Dyspnea, "0 1");
7069

7170
// solve again, now with evidence
72-
DiscreteBayesNet::shared_ptr chordal2 = fg.eliminateSequential(ordering);
73-
auto mpe2 = chordal2->optimize();
71+
auto mpe2 = fg.optimize();
7472
GTSAM_PRINT(mpe2);
7573

7674
// We can also sample from it
75+
DiscreteBayesNet::shared_ptr chordal = fg.eliminateSequential(ordering);
7776
cout << "\n10 samples:" << endl;
7877
for (size_t i = 0; i < 10; i++) {
79-
auto sample = chordal2->sample();
78+
auto sample = chordal->sample();
8079
GTSAM_PRINT(sample);
8180
}
8281
return 0;

examples/DiscreteBayesNet_FG.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ int main(int argc, char **argv) {
8585
}
8686

8787
// "Most Probable Explanation", i.e., configuration with largest value
88-
auto mpe = graph.eliminateSequential()->optimize();
88+
auto mpe = graph.optimize();
8989
cout << "\nMost Probable Explanation (MPE):" << endl;
9090
print(mpe);
9191

@@ -96,8 +96,7 @@ int main(int argc, char **argv) {
9696
graph.add(Cloudy, "1 0");
9797

9898
// solve again, now with evidence
99-
DiscreteBayesNet::shared_ptr chordal = graph.eliminateSequential();
100-
auto mpe_with_evidence = chordal->optimize();
99+
auto mpe_with_evidence = graph.optimize();
101100

102101
cout << "\nMPE given C=0:" << endl;
103102
print(mpe_with_evidence);
@@ -110,7 +109,8 @@ int main(int argc, char **argv) {
110109
cout << "\nP(W=1|C=0):" << marginals.marginalProbabilities(WetGrass)[1]
111110
<< endl;
112111

113-
// We can also sample from it
112+
// We can also sample from the eliminated graph
113+
DiscreteBayesNet::shared_ptr chordal = graph.eliminateSequential();
114114
cout << "\n10 samples:" << endl;
115115
for (size_t i = 0; i < 10; i++) {
116116
auto sample = chordal->sample();

examples/HMMExample.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@ int main(int argc, char **argv) {
5959
// Convert to factor graph
6060
DiscreteFactorGraph factorGraph(hmm);
6161

62+
// Do max-prodcut
63+
auto mpe = factorGraph.optimize();
64+
GTSAM_PRINT(mpe);
65+
6266
// Create solver and eliminate
6367
// This will create a DAG ordered with arrow of time reversed
6468
DiscreteBayesNet::shared_ptr chordal =
6569
factorGraph.eliminateSequential(ordering);
6670
chordal->print("Eliminated");
6771

68-
// solve
69-
auto mpe = chordal->optimize();
70-
GTSAM_PRINT(mpe);
71-
7272
// We can also sample from it
7373
cout << "\n10 samples:" << endl;
7474
for (size_t k = 0; k < 10; k++) {

0 commit comments

Comments
 (0)