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
Frank Dellaert 2023-03-07 12:56:17 -08:00 committed by GitHub
commit 42fb89993d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 27 additions and 9 deletions

View File

@ -28,6 +28,7 @@ jobs:
ubuntu-clang-cayleymap,
ubuntu-clang-system-libs,
ubuntu-no-boost,
ubuntu-no-unstable,
]
build_type: [Debug, Release]
@ -69,6 +70,12 @@ jobs:
version: "14"
flag: no_boost
- name: ubuntu-no-unstable
os: ubuntu-22.04
compiler: clang
version: "14"
flag: no_unstable
steps:
- name: Checkout
uses: actions/checkout@v3
@ -157,12 +164,19 @@ jobs:
echo "GTSAM_USE_BOOST_FEATURES=OFF" >> $GITHUB_ENV
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
if: runner.os == 'Linux'
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 12
- name: Build & Test
run: |
bash .github/scripts/unix.sh -t

View File

@ -20,4 +20,4 @@ if (NOT GTSAM_USE_BOOST_FEATURES)
)
endif()
gtsamAddExamplesGlob("*.cpp" "${excluded_examples}" "gtsam;gtsam_unstable;${Boost_PROGRAM_OPTIONS_LIBRARY}")
gtsamAddExamplesGlob("*.cpp" "${excluded_examples}" "gtsam;${Boost_PROGRAM_OPTIONS_LIBRARY}")

View File

@ -30,6 +30,7 @@
#include <fstream>
#include <limits>
#include <iostream>
#include <iterator>
using namespace std;

View File

@ -33,6 +33,7 @@
#include <vector>
#include <optional>
#include <cassert>
#include <iterator>
namespace gtsam {

View File

@ -27,7 +27,8 @@ namespace gtsam {
Ordering HybridSmoother::getOrdering(
const HybridGaussianFactorGraph &newFactors) {
HybridGaussianFactorGraph factors(hybridBayesNet());
factors += newFactors;
factors.push_back(newFactors);
// Get all the discrete keys from the factors
KeySet allDiscrete = factors.discreteKeySet();
@ -72,8 +73,7 @@ void HybridSmoother::update(HybridGaussianFactorGraph graph,
HybridBayesNet prunedBayesNetFragment =
bayesNetFragment->prune(*maxNrLeaves);
// Set the bayes net fragment to the pruned version
bayesNetFragment =
std::make_shared<HybridBayesNet>(prunedBayesNetFragment);
bayesNetFragment = std::make_shared<HybridBayesNet>(prunedBayesNetFragment);
}
// Add the partial bayes net to the posterior bayes net.

View File

@ -51,8 +51,8 @@ struct GTSAM_EXPORT PreintegrationCombinedParams : PreintegrationParams {
/// See two named constructors below for good values of n_gravity in body
/// frame
PreintegrationCombinedParams(const Vector3& n_gravity)
: PreintegrationParams(n_gravity),
PreintegrationCombinedParams(const Vector3& n_gravity_)
: PreintegrationParams(n_gravity_),
biasAccCovariance(I_3x3),
biasOmegaCovariance(I_3x3),
biasAccOmegaInt(I_6x6) {}

View File

@ -40,12 +40,12 @@ struct GTSAM_EXPORT PreintegrationParams: PreintegratedRotationParams {
/// The Params constructor insists on getting the navigation frame gravity vector
/// For convenience, two commonly used conventions are provided by named constructors below
PreintegrationParams(const Vector3& n_gravity)
PreintegrationParams(const Vector3& n_gravity_)
: PreintegratedRotationParams(),
accelerometerCovariance(I_3x3),
integrationCovariance(I_3x3),
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
static std::shared_ptr<PreintegrationParams> MakeSharedD(double g = 9.81) {

View File

@ -20,7 +20,7 @@
// \callgraph
#pragma once
#include <gtsam_unstable/dllexport.h>
#include <gtsam/dllexport.h>
#include <gtsam/inference/Key.h>
#include <gtsam/nonlinear/NonlinearFactorGraph.h>
#include <gtsam/nonlinear/Values.h>

View File

@ -22,6 +22,7 @@
#include <gtsam/nonlinear/FixedLagSmoother.h>
#include <gtsam/nonlinear/ISAM2.h>
#include "gtsam_unstable/dllexport.h"
namespace gtsam {

View File

@ -7,6 +7,7 @@
*/
#include <iostream>
#include <cassert>
#include <algorithm>
#include <gtsam/base/DSFVector.h>