Skip to content

Commit bd994d0

Browse files
merged from develop
2 parents 15c29ca + 838e74d commit bd994d0

File tree

200 files changed

+7477
-6091
lines changed

Some content is hidden

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

200 files changed

+7477
-6091
lines changed

.github/workflows/build-python.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,20 @@ jobs:
1919
# Github Actions requires a single row to be added to the build matrix.
2020
# See https://help.github.com/en/articles/workflow-syntax-for-github-actions.
2121
name: [
22-
# ubuntu-18.04-gcc-5, #TODO Enable once the Python wrapper is optimized for memory
22+
ubuntu-18.04-gcc-5,
2323
ubuntu-18.04-gcc-9,
2424
ubuntu-18.04-clang-9,
2525
macOS-10.15-xcode-11.3.1,
26-
# ubuntu-18.04-gcc-5-tbb,
26+
ubuntu-18.04-gcc-5-tbb,
2727
]
2828

29-
#TODO update wrapper to prevent OOM
30-
# build_type: [Debug, Release]
31-
build_type: [Release]
29+
build_type: [Debug, Release]
3230
python_version: [3]
3331
include:
34-
# - name: ubuntu-18.04-gcc-5
35-
# os: ubuntu-18.04
36-
# compiler: gcc
37-
# version: "5"
32+
- name: ubuntu-18.04-gcc-5
33+
os: ubuntu-18.04
34+
compiler: gcc
35+
version: "5"
3836

3937
- name: ubuntu-18.04-gcc-9
4038
os: ubuntu-18.04
@@ -46,7 +44,7 @@ jobs:
4644
compiler: clang
4745
version: "9"
4846

49-
#NOTE temporarily added this as it is a required check.
47+
# NOTE temporarily added this as it is a required check.
5048
- name: ubuntu-18.04-clang-9
5149
os: ubuntu-18.04
5250
compiler: clang
@@ -59,11 +57,11 @@ jobs:
5957
compiler: xcode
6058
version: "11.3.1"
6159

62-
# - name: ubuntu-18.04-gcc-5-tbb
63-
# os: ubuntu-18.04
64-
# compiler: gcc
65-
# version: "5"
66-
# flag: tbb
60+
- name: ubuntu-18.04-gcc-5-tbb
61+
os: ubuntu-18.04
62+
compiler: gcc
63+
version: "5"
64+
flag: tbb
6765

6866
steps:
6967
- name: Checkout

INSTALL.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ $ make install
2020
Optional dependent libraries:
2121
- If TBB is installed and detectable by CMake GTSAM will use it automatically.
2222
Ensure that CMake prints "Use Intel TBB : Yes". To disable the use of TBB,
23-
disable the CMake flag GTSAM_WITH_TBB (enabled by default). On Ubuntu, TBB
24-
may be installed from the Ubuntu repositories, and for other platforms it
25-
may be downloaded from https://www.threadingbuildingblocks.org/
23+
disable the CMake flag `GTSAM_WITH_TBB` (enabled by default) by providing
24+
the argument `-DGTSAM_WITH_TBB=OFF` to `cmake`. On Ubuntu, TBB may be
25+
installed from the Ubuntu repositories, and for other platforms it may be
26+
downloaded from https://www.threadingbuildingblocks.org/
2627
- GTSAM may be configured to use MKL by toggling `GTSAM_WITH_EIGEN_MKL` and
2728
`GTSAM_WITH_EIGEN_MKL_OPENMP` to `ON`; however, best performance is usually
2829
achieved with MKL disabled. We therefore advise you to benchmark your problem

gtsam/base/Matrix.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include <gtsam/config.h>
3030

3131
#include <boost/format.hpp>
32-
#include <boost/function.hpp>
32+
#include <functional>
3333
#include <boost/tuple/tuple.hpp>
3434
#include <boost/math/special_functions/fpclassify.hpp>
3535

@@ -489,7 +489,7 @@ struct MultiplyWithInverseFunction {
489489

490490
// The function phi should calculate f(a)*b, with derivatives in a and b.
491491
// Naturally, the derivative in b is f(a).
492-
typedef boost::function<VectorN(
492+
typedef std::function<VectorN(
493493
const T&, const VectorN&, OptionalJacobian<N, M>, OptionalJacobian<N, N>)>
494494
Operator;
495495

gtsam/base/Testable.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@
3434
#pragma once
3535

3636
#include <boost/concept_check.hpp>
37-
#include <boost/shared_ptr.hpp>
37+
#include <functional>
3838
#include <iostream>
39+
#include <memory>
3940
#include <string>
4041

4142
#define GTSAM_PRINT(x)((x).print(#x))
@@ -119,10 +120,10 @@ namespace gtsam {
119120
* Binary predicate on shared pointers
120121
*/
121122
template<class V>
122-
struct equals_star : public std::function<bool(const boost::shared_ptr<V>&, const boost::shared_ptr<V>&)> {
123+
struct equals_star : public std::function<bool(const std::shared_ptr<V>&, const std::shared_ptr<V>&)> {
123124
double tol_;
124125
equals_star(double tol = 1e-9) : tol_(tol) {}
125-
bool operator()(const boost::shared_ptr<V>& expected, const boost::shared_ptr<V>& actual) {
126+
bool operator()(const std::shared_ptr<V>& expected, const std::shared_ptr<V>& actual) {
126127
if (!actual && !expected) return true;
127128
return actual && expected && traits<V>::Equals(*actual,*expected, tol_);
128129
}

gtsam/base/base.i

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
//*************************************************************************
2+
// base
3+
//*************************************************************************
4+
5+
namespace gtsam {
6+
7+
#include <gtsam/geometry/Cal3Bundler.h>
8+
#include <gtsam/geometry/Cal3DS2.h>
9+
#include <gtsam/geometry/Cal3Fisheye.h>
10+
#include <gtsam/geometry/Cal3Unified.h>
11+
#include <gtsam/geometry/Cal3_S2.h>
12+
#include <gtsam/geometry/CalibratedCamera.h>
13+
#include <gtsam/geometry/EssentialMatrix.h>
14+
#include <gtsam/geometry/Point2.h>
15+
#include <gtsam/geometry/Point3.h>
16+
#include <gtsam/geometry/Pose2.h>
17+
#include <gtsam/geometry/Pose3.h>
18+
#include <gtsam/geometry/Rot2.h>
19+
#include <gtsam/geometry/Rot3.h>
20+
#include <gtsam/geometry/StereoPoint2.h>
21+
#include <gtsam/navigation/ImuBias.h>
22+
23+
// #####
24+
25+
#include <gtsam/base/debug.h>
26+
bool isDebugVersion();
27+
28+
#include <gtsam/base/DSFMap.h>
29+
class IndexPair {
30+
IndexPair();
31+
IndexPair(size_t i, size_t j);
32+
size_t i() const;
33+
size_t j() const;
34+
};
35+
36+
// template<KEY = {gtsam::IndexPair}>
37+
// class DSFMap {
38+
// DSFMap();
39+
// KEY find(const KEY& key) const;
40+
// void merge(const KEY& x, const KEY& y);
41+
// std::map<KEY, Set> sets();
42+
// };
43+
44+
class IndexPairSet {
45+
IndexPairSet();
46+
// common STL methods
47+
size_t size() const;
48+
bool empty() const;
49+
void clear();
50+
51+
// structure specific methods
52+
void insert(gtsam::IndexPair key);
53+
bool erase(gtsam::IndexPair key); // returns true if value was removed
54+
bool count(gtsam::IndexPair key) const; // returns true if value exists
55+
};
56+
57+
class IndexPairVector {
58+
IndexPairVector();
59+
IndexPairVector(const gtsam::IndexPairVector& other);
60+
61+
// common STL methods
62+
size_t size() const;
63+
bool empty() const;
64+
void clear();
65+
66+
// structure specific methods
67+
gtsam::IndexPair at(size_t i) const;
68+
void push_back(gtsam::IndexPair key) const;
69+
};
70+
71+
gtsam::IndexPairVector IndexPairSetAsArray(gtsam::IndexPairSet& set);
72+
73+
class IndexPairSetMap {
74+
IndexPairSetMap();
75+
// common STL methods
76+
size_t size() const;
77+
bool empty() const;
78+
void clear();
79+
80+
// structure specific methods
81+
gtsam::IndexPairSet at(gtsam::IndexPair& key);
82+
};
83+
84+
class DSFMapIndexPair {
85+
DSFMapIndexPair();
86+
gtsam::IndexPair find(const gtsam::IndexPair& key) const;
87+
void merge(const gtsam::IndexPair& x, const gtsam::IndexPair& y);
88+
gtsam::IndexPairSetMap sets();
89+
};
90+
91+
#include <gtsam/base/Matrix.h>
92+
bool linear_independent(Matrix A, Matrix B, double tol);
93+
94+
#include <gtsam/base/Value.h>
95+
virtual class Value {
96+
// No constructors because this is an abstract class
97+
98+
// Testable
99+
void print(string s = "") const;
100+
101+
// Manifold
102+
size_t dim() const;
103+
};
104+
105+
#include <gtsam/base/GenericValue.h>
106+
template <T = {Vector, Matrix, gtsam::Point2, gtsam::Point3, gtsam::Rot2,
107+
gtsam::Rot3, gtsam::Pose2, gtsam::Pose3, gtsam::StereoPoint2,
108+
gtsam::Cal3_S2, gtsam::Cal3DS2, gtsam::Cal3Bundler,
109+
gtsam::Cal3Fisheye, gtsam::Cal3Unified, gtsam::EssentialMatrix,
110+
gtsam::CalibratedCamera, gtsam::imuBias::ConstantBias}>
111+
virtual class GenericValue : gtsam::Value {
112+
void serializable() const;
113+
};
114+
115+
} // namespace gtsam

gtsam/base/lieProxies.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
* These should not be used outside of tests, as they are just remappings
2626
* of the original functions. We use these to avoid needing to do
27-
* too much boost::bind magic or writing a bunch of separate proxy functions.
27+
* too much std::bind magic or writing a bunch of separate proxy functions.
2828
*
2929
* Don't expect all classes to work for all of these functions.
3030
*/

0 commit comments

Comments
 (0)