Merge pull request #1483 from borglab/fixes/boost_usage_leak
A few minor fixes to allow compiling 'boost-free' gtsam without compi…release/4.3a0
commit
42fb89993d
|
|
@ -28,6 +28,7 @@ jobs:
|
||||||
ubuntu-clang-cayleymap,
|
ubuntu-clang-cayleymap,
|
||||||
ubuntu-clang-system-libs,
|
ubuntu-clang-system-libs,
|
||||||
ubuntu-no-boost,
|
ubuntu-no-boost,
|
||||||
|
ubuntu-no-unstable,
|
||||||
]
|
]
|
||||||
|
|
||||||
build_type: [Debug, Release]
|
build_type: [Debug, Release]
|
||||||
|
|
@ -69,6 +70,12 @@ jobs:
|
||||||
version: "14"
|
version: "14"
|
||||||
flag: no_boost
|
flag: no_boost
|
||||||
|
|
||||||
|
- name: ubuntu-no-unstable
|
||||||
|
os: ubuntu-22.04
|
||||||
|
compiler: clang
|
||||||
|
version: "14"
|
||||||
|
flag: no_unstable
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
@ -157,12 +164,19 @@ jobs:
|
||||||
echo "GTSAM_USE_BOOST_FEATURES=OFF" >> $GITHUB_ENV
|
echo "GTSAM_USE_BOOST_FEATURES=OFF" >> $GITHUB_ENV
|
||||||
echo "GTSAM will not use BOOST"
|
echo "GTSAM will not use BOOST"
|
||||||
|
|
||||||
|
- name: Turn off unstable
|
||||||
|
if: matrix.flag == 'no_unstable'
|
||||||
|
run: |
|
||||||
|
echo "GTSAM_BUILD_UNSTABLE=OFF" >> $GITHUB_ENV
|
||||||
|
echo "GTSAM 'unstable' will not be built."
|
||||||
|
|
||||||
- name: Set Swap Space
|
- name: Set Swap Space
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
uses: pierotofy/set-swap-space@master
|
uses: pierotofy/set-swap-space@master
|
||||||
with:
|
with:
|
||||||
swap-size-gb: 12
|
swap-size-gb: 12
|
||||||
|
|
||||||
|
|
||||||
- name: Build & Test
|
- name: Build & Test
|
||||||
run: |
|
run: |
|
||||||
bash .github/scripts/unix.sh -t
|
bash .github/scripts/unix.sh -t
|
||||||
|
|
|
||||||
|
|
@ -20,4 +20,4 @@ if (NOT GTSAM_USE_BOOST_FEATURES)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
gtsamAddExamplesGlob("*.cpp" "${excluded_examples}" "gtsam;gtsam_unstable;${Boost_PROGRAM_OPTIONS_LIBRARY}")
|
gtsamAddExamplesGlob("*.cpp" "${excluded_examples}" "gtsam;${Boost_PROGRAM_OPTIONS_LIBRARY}")
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <iterator>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <iterator>
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,8 @@ namespace gtsam {
|
||||||
Ordering HybridSmoother::getOrdering(
|
Ordering HybridSmoother::getOrdering(
|
||||||
const HybridGaussianFactorGraph &newFactors) {
|
const HybridGaussianFactorGraph &newFactors) {
|
||||||
HybridGaussianFactorGraph factors(hybridBayesNet());
|
HybridGaussianFactorGraph factors(hybridBayesNet());
|
||||||
factors += newFactors;
|
factors.push_back(newFactors);
|
||||||
|
|
||||||
// Get all the discrete keys from the factors
|
// Get all the discrete keys from the factors
|
||||||
KeySet allDiscrete = factors.discreteKeySet();
|
KeySet allDiscrete = factors.discreteKeySet();
|
||||||
|
|
||||||
|
|
@ -72,8 +73,7 @@ void HybridSmoother::update(HybridGaussianFactorGraph graph,
|
||||||
HybridBayesNet prunedBayesNetFragment =
|
HybridBayesNet prunedBayesNetFragment =
|
||||||
bayesNetFragment->prune(*maxNrLeaves);
|
bayesNetFragment->prune(*maxNrLeaves);
|
||||||
// Set the bayes net fragment to the pruned version
|
// Set the bayes net fragment to the pruned version
|
||||||
bayesNetFragment =
|
bayesNetFragment = std::make_shared<HybridBayesNet>(prunedBayesNetFragment);
|
||||||
std::make_shared<HybridBayesNet>(prunedBayesNetFragment);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the partial bayes net to the posterior bayes net.
|
// Add the partial bayes net to the posterior bayes net.
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,8 @@ struct GTSAM_EXPORT PreintegrationCombinedParams : PreintegrationParams {
|
||||||
|
|
||||||
/// See two named constructors below for good values of n_gravity in body
|
/// See two named constructors below for good values of n_gravity in body
|
||||||
/// frame
|
/// frame
|
||||||
PreintegrationCombinedParams(const Vector3& n_gravity)
|
PreintegrationCombinedParams(const Vector3& n_gravity_)
|
||||||
: PreintegrationParams(n_gravity),
|
: PreintegrationParams(n_gravity_),
|
||||||
biasAccCovariance(I_3x3),
|
biasAccCovariance(I_3x3),
|
||||||
biasOmegaCovariance(I_3x3),
|
biasOmegaCovariance(I_3x3),
|
||||||
biasAccOmegaInt(I_6x6) {}
|
biasAccOmegaInt(I_6x6) {}
|
||||||
|
|
|
||||||
|
|
@ -40,12 +40,12 @@ struct GTSAM_EXPORT PreintegrationParams: PreintegratedRotationParams {
|
||||||
|
|
||||||
/// The Params constructor insists on getting the navigation frame gravity vector
|
/// The Params constructor insists on getting the navigation frame gravity vector
|
||||||
/// For convenience, two commonly used conventions are provided by named constructors below
|
/// For convenience, two commonly used conventions are provided by named constructors below
|
||||||
PreintegrationParams(const Vector3& n_gravity)
|
PreintegrationParams(const Vector3& n_gravity_)
|
||||||
: PreintegratedRotationParams(),
|
: PreintegratedRotationParams(),
|
||||||
accelerometerCovariance(I_3x3),
|
accelerometerCovariance(I_3x3),
|
||||||
integrationCovariance(I_3x3),
|
integrationCovariance(I_3x3),
|
||||||
use2ndOrderCoriolis(false),
|
use2ndOrderCoriolis(false),
|
||||||
n_gravity(n_gravity) {}
|
n_gravity(n_gravity_) {}
|
||||||
|
|
||||||
// Default Params for a Z-down navigation frame, such as NED: gravity points along positive Z-axis
|
// Default Params for a Z-down navigation frame, such as NED: gravity points along positive Z-axis
|
||||||
static std::shared_ptr<PreintegrationParams> MakeSharedD(double g = 9.81) {
|
static std::shared_ptr<PreintegrationParams> MakeSharedD(double g = 9.81) {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
// \callgraph
|
// \callgraph
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <gtsam_unstable/dllexport.h>
|
#include <gtsam/dllexport.h>
|
||||||
#include <gtsam/inference/Key.h>
|
#include <gtsam/inference/Key.h>
|
||||||
#include <gtsam/nonlinear/NonlinearFactorGraph.h>
|
#include <gtsam/nonlinear/NonlinearFactorGraph.h>
|
||||||
#include <gtsam/nonlinear/Values.h>
|
#include <gtsam/nonlinear/Values.h>
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include <gtsam/nonlinear/FixedLagSmoother.h>
|
#include <gtsam/nonlinear/FixedLagSmoother.h>
|
||||||
#include <gtsam/nonlinear/ISAM2.h>
|
#include <gtsam/nonlinear/ISAM2.h>
|
||||||
|
#include "gtsam_unstable/dllexport.h"
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
*/
|
*/
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include <gtsam/base/DSFVector.h>
|
#include <gtsam/base/DSFVector.h>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue