Merge branch 'develop' into matlab-update
commit
f8317a5a9d
|
|
@ -39,8 +39,6 @@ function install_dependencies()
|
|||
if [ "${GTSAM_WITH_TBB:-OFF}" == "ON" ]; then
|
||||
install_tbb
|
||||
fi
|
||||
|
||||
$PYTHON -m pip install -r $GITHUB_WORKSPACE/python/requirements.txt
|
||||
}
|
||||
|
||||
function build()
|
||||
|
|
|
|||
|
|
@ -109,10 +109,13 @@ jobs:
|
|||
with:
|
||||
swap-size-gb: 6
|
||||
|
||||
- name: Install Dependencies
|
||||
- name: Install System Dependencies
|
||||
run: |
|
||||
bash .github/scripts/python.sh -d
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: python$PYTHON_VERSION -m pip install -r python/dev_requirements.txt
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
bash .github/scripts/python.sh -b
|
||||
|
|
|
|||
|
|
@ -150,7 +150,10 @@ jobs:
|
|||
# cmake --build build -j4 --config ${{ matrix.build_type }} --target check.dynamics_unstable
|
||||
# Compile. Fail with exception
|
||||
# cmake --build build -j4 --config ${{ matrix.build_type }} --target check.nonlinear_unstable
|
||||
# Compilation error
|
||||
# Compile. Fail with exception
|
||||
# cmake --build build -j4 --config ${{ matrix.build_type }} --target check.slam_unstable
|
||||
# Compilation error
|
||||
# Compile. Fail with exception
|
||||
# cmake --build build -j4 --config ${{ matrix.build_type }} --target check.partition
|
||||
|
||||
# Run all tests
|
||||
# cmake --build build -j1 --config ${{ matrix.build_type }} --target check
|
||||
|
|
|
|||
|
|
@ -1,11 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
# new feature to Cmake Version > 2.8.12
|
||||
# Mac ONLY. Define Relative Path on Mac OS
|
||||
if(NOT DEFINED CMAKE_MACOSX_RPATH)
|
||||
set(CMAKE_MACOSX_RPATH 0)
|
||||
endif()
|
||||
|
||||
# Set the version number for the library
|
||||
set (GTSAM_VERSION_MAJOR 4)
|
||||
set (GTSAM_VERSION_MINOR 3)
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ Here are some tips to get the best possible performance out of GTSAM.
|
|||
optimization by 30-50%. Please note that this may not be true for very small
|
||||
problems where the overhead of dispatching work to multiple threads outweighs
|
||||
the benefit. We recommend that you benchmark your problem with/without TBB.
|
||||
3. Add `-march=native` to `GTSAM_CMAKE_CXX_FLAGS`. A performance gain of
|
||||
3. Use `GTSAM_BUILD_WITH_MARCH_NATIVE`. A performance gain of
|
||||
25-30% can be expected on modern processors. Note that this affects the portability
|
||||
of your executable. It may not run when copied to another system with older/different
|
||||
processor architecture.
|
||||
|
|
|
|||
|
|
@ -6,9 +6,6 @@ FROM borglab/ubuntu-gtsam:bionic
|
|||
# Install pip
|
||||
RUN apt-get install -y python3-pip python3-dev
|
||||
|
||||
# Install python wrapper requirements
|
||||
RUN python3 -m pip install -U -r /usr/src/gtsam/python/requirements.txt
|
||||
|
||||
# Run cmake again, now with python toolbox on
|
||||
WORKDIR /usr/src/gtsam/build
|
||||
RUN cmake \
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
* @date Feb 7, 2012
|
||||
*/
|
||||
|
||||
#ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
|
||||
#pragma once
|
||||
|
||||
#include <Eigen/Core>
|
||||
|
|
@ -270,3 +271,4 @@ void deserializeBinary(const std::string& serialized, T& output,
|
|||
///@}
|
||||
|
||||
} // namespace gtsam
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace gtsam {
|
|||
* @ingroup discrete
|
||||
*/
|
||||
template <typename L>
|
||||
class GTSAM_EXPORT AlgebraicDecisionTree : public DecisionTree<L, double> {
|
||||
class AlgebraicDecisionTree : public DecisionTree<L, double> {
|
||||
/**
|
||||
* @brief Default method used by `labelFormatter` or `valueFormatter` when
|
||||
* printing.
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ GaussianFactorGraph buildFactorSubgraph(const GaussianFactorGraph &gfg,
|
|||
|
||||
/** Split the graph into a subgraph and the remaining edges.
|
||||
* Note that the remaining factorgraph has null factors. */
|
||||
std::pair<GaussianFactorGraph, GaussianFactorGraph> splitFactorGraph(
|
||||
std::pair<GaussianFactorGraph, GaussianFactorGraph> GTSAM_EXPORT splitFactorGraph(
|
||||
const GaussianFactorGraph &factorGraph, const Subgraph &subgraph);
|
||||
|
||||
} // namespace gtsam
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ namespace gtsam {
|
|||
* Had to use the static_cast of a nullptr, because the compiler is not able to
|
||||
* deduce the type of the nullptr when expanding the evaluateError templates.
|
||||
*/
|
||||
#define OptionalNone static_cast<Matrix*>(nullptr)
|
||||
#define OptionalNone static_cast<gtsam::Matrix*>(nullptr)
|
||||
|
||||
/** This typedef will be used everywhere boost::optional<Matrix&> reference was used
|
||||
* previously. This is used to indicate that the Jacobian is optional. In the future
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace gtsam {
|
|||
// where s is an arbitrary scale that can be supplied, default 1.0. Hence, two
|
||||
// versions are supplied below corresponding to whether we have initial values
|
||||
// or not.
|
||||
class TranslationRecovery {
|
||||
class GTSAM_EXPORT TranslationRecovery {
|
||||
public:
|
||||
using KeyPair = std::pair<Key, Key>;
|
||||
using TranslationEdges = std::vector<BinaryMeasurement<Unit3>>;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace gtsam {
|
|||
* SLAM, where we have "time of arrival" measurements at a set of sensors. The
|
||||
* TOA functor below provides a measurement function for those applications.
|
||||
*/
|
||||
class Event {
|
||||
class GTSAM_UNSTABLE_EXPORT Event {
|
||||
double time_; ///< Time event was generated
|
||||
Point3 location_; ///< Location at time event was generated
|
||||
|
||||
|
|
@ -62,10 +62,10 @@ class Event {
|
|||
}
|
||||
|
||||
/** print with optional string */
|
||||
GTSAM_UNSTABLE_EXPORT void print(const std::string& s = "") const;
|
||||
void print(const std::string& s = "") const;
|
||||
|
||||
/** equals with an tolerance */
|
||||
GTSAM_UNSTABLE_EXPORT bool equals(const Event& other,
|
||||
bool equals(const Event& other,
|
||||
double tol = 1e-9) const;
|
||||
|
||||
/// Updates a with tangent space delta
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <gtsam_unstable/dllexport.h>
|
||||
|
||||
#include "PartitionWorkSpace.h"
|
||||
|
||||
|
|
@ -49,7 +50,7 @@ namespace gtsam { namespace partition {
|
|||
typedef std::vector<sharedGenericFactor2D> GenericGraph2D;
|
||||
|
||||
/** merge nodes in DSF using constraints captured by the given graph */
|
||||
std::list<std::vector<size_t> > findIslands(const GenericGraph2D& graph, const std::vector<size_t>& keys, WorkSpace& workspace,
|
||||
std::list<std::vector<size_t> > GTSAM_UNSTABLE_EXPORT findIslands(const GenericGraph2D& graph, const std::vector<size_t>& keys, WorkSpace& workspace,
|
||||
const int minNrConstraintsPerCamera, const int minNrConstraintsPerLandmark);
|
||||
|
||||
/** eliminate the sensors from generic graph */
|
||||
|
|
@ -97,11 +98,11 @@ namespace gtsam { namespace partition {
|
|||
typedef std::vector<sharedGenericFactor3D> GenericGraph3D;
|
||||
|
||||
/** merge nodes in DSF using constraints captured by the given graph */
|
||||
std::list<std::vector<size_t> > findIslands(const GenericGraph3D& graph, const std::vector<size_t>& keys, WorkSpace& workspace,
|
||||
std::list<std::vector<size_t> > GTSAM_UNSTABLE_EXPORT findIslands(const GenericGraph3D& graph, const std::vector<size_t>& keys, WorkSpace& workspace,
|
||||
const size_t minNrConstraintsPerCamera, const size_t minNrConstraintsPerLandmark);
|
||||
|
||||
/** eliminate the sensors from generic graph */
|
||||
void reduceGenericGraph(const GenericGraph3D& graph, const std::vector<size_t>& cameraKeys, const std::vector<size_t>& landmarkKeys,
|
||||
void GTSAM_UNSTABLE_EXPORT reduceGenericGraph(const GenericGraph3D& graph, const std::vector<size_t>& cameraKeys, const std::vector<size_t>& landmarkKeys,
|
||||
const std::vector<int>& dictionary, GenericGraph3D& reducedGraph);
|
||||
|
||||
/** check whether the 3D graph is singular (under constrained) */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
set(ignore_test "testNestedDissection.cpp")
|
||||
|
||||
if (NOT GTSAM_USE_BOOST_FEATURES)
|
||||
if (NOT GTSAM_USE_BOOST_FEATURES OR MSVC)
|
||||
list(APPEND ignore_test "testFindSeparator.cpp")
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace gtsam {
|
|||
* @ingroup slam
|
||||
*/
|
||||
template <class POSE, class LANDMARK, class CALIBRATION = Cal3_S2>
|
||||
class GTSAM_UNSTABLE_EXPORT ProjectionFactorPPPC
|
||||
class ProjectionFactorPPPC
|
||||
: public NoiseModelFactorN<POSE, POSE, LANDMARK, CALIBRATION> {
|
||||
protected:
|
||||
Point2 measured_; ///< 2D measurement
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace gtsam {
|
|||
* @ingroup slam
|
||||
*/
|
||||
template <class CAMERA>
|
||||
class GTSAM_UNSTABLE_EXPORT SmartProjectionPoseFactorRollingShutter
|
||||
class SmartProjectionPoseFactorRollingShutter
|
||||
: public SmartProjectionFactor<CAMERA> {
|
||||
private:
|
||||
typedef SmartProjectionFactor<CAMERA> Base;
|
||||
|
|
|
|||
|
|
@ -1441,14 +1441,14 @@ TEST( SmartStereoProjectionPoseFactor, HessianWithRotationNonDegenerate ) {
|
|||
std::shared_ptr<GaussianFactor> hessianFactorRotTran =
|
||||
smartFactor->linearize(tranValues);
|
||||
|
||||
// Hessian is invariant to rotations and translations in the degenerate case
|
||||
EXPECT(
|
||||
assert_equal(hessianFactor->information(),
|
||||
double error;
|
||||
#ifdef GTSAM_USE_EIGEN_MKL
|
||||
hessianFactorRotTran->information(), 1e-5));
|
||||
error = 1e-5;
|
||||
#else
|
||||
hessianFactorRotTran->information(), 1e-6));
|
||||
error = 1e-6;
|
||||
#endif
|
||||
// Hessian is invariant to rotations and translations in the degenerate case
|
||||
EXPECT(assert_equal(hessianFactor->information(), hessianFactorRotTran->information(), error));
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
set(PROJECT_PYTHON_SOURCE_DIR ${PROJECT_SOURCE_DIR}/python)
|
||||
set(GTSAM_PYTHON_BUILD_DIRECTORY ${PROJECT_BINARY_DIR}/python)
|
||||
|
||||
if (NOT GTSAM_BUILD_PYTHON)
|
||||
|
|
@ -6,11 +7,11 @@ endif()
|
|||
|
||||
# Generate setup.py.
|
||||
file(READ "${PROJECT_SOURCE_DIR}/README.md" README_CONTENTS)
|
||||
configure_file(${PROJECT_SOURCE_DIR}/python/setup.py.in
|
||||
configure_file(${PROJECT_PYTHON_SOURCE_DIR}/setup.py.in
|
||||
${GTSAM_PYTHON_BUILD_DIRECTORY}/setup.py)
|
||||
|
||||
# Supply MANIFEST.in for older versions of Python
|
||||
file(COPY ${PROJECT_SOURCE_DIR}/python/MANIFEST.in
|
||||
file(COPY ${PROJECT_PYTHON_SOURCE_DIR}/MANIFEST.in
|
||||
DESTINATION ${GTSAM_PYTHON_BUILD_DIRECTORY})
|
||||
|
||||
set(WRAP_BUILD_TYPE_POSTFIXES ${GTSAM_BUILD_TYPE_POSTFIXES})
|
||||
|
|
@ -99,7 +100,7 @@ pybind_wrap(${GTSAM_PYTHON_TARGET} # target
|
|||
"gtsam" # module_name
|
||||
"gtsam" # top_namespace
|
||||
"${ignore}" # ignore_classes
|
||||
${PROJECT_SOURCE_DIR}/python/gtsam/gtsam.tpl
|
||||
${PROJECT_PYTHON_SOURCE_DIR}/gtsam/gtsam.tpl
|
||||
gtsam # libs
|
||||
"gtsam;gtsam_header" # dependencies
|
||||
${GTSAM_ENABLE_BOOST_SERIALIZATION} # use_boost_serialization
|
||||
|
|
@ -178,7 +179,7 @@ if(GTSAM_UNSTABLE_BUILD_PYTHON)
|
|||
"gtsam_unstable" # module_name
|
||||
"gtsam" # top_namespace
|
||||
"${ignore}" # ignore_classes
|
||||
${PROJECT_SOURCE_DIR}/python/gtsam_unstable/gtsam_unstable.tpl
|
||||
${PROJECT_PYTHON_SOURCE_DIR}/gtsam_unstable/gtsam_unstable.tpl
|
||||
gtsam_unstable # libs
|
||||
"gtsam_unstable;gtsam_unstable_header" # dependencies
|
||||
${GTSAM_ENABLE_BOOST_SERIALIZATION} # use_boost_serialization
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ For instructions on updating the version of the [wrap library](https://github.co
|
|||
- This wrapper needs `pyparsing(>=2.4.2)`, and `numpy(>=1.11.0)`. These can be installed as follows:
|
||||
|
||||
```bash
|
||||
pip install -r <gtsam_folder>/python/requirements.txt
|
||||
pip install -r <gtsam_folder>/python/dev_requirements.txt
|
||||
```
|
||||
|
||||
## Install
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
-r requirements.txt
|
||||
pyparsing>=2.4.2
|
||||
|
|
@ -1,2 +1 @@
|
|||
numpy>=1.11.0
|
||||
pyparsing>=2.4.2
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
"""Setup file to install the GTSAM package."""
|
||||
|
||||
try:
|
||||
from setuptools import setup, find_packages
|
||||
except ImportError:
|
||||
from distutils.core import setup, find_packages
|
||||
from setuptools import setup, find_namespace_packages
|
||||
|
||||
packages = find_packages(where=".")
|
||||
packages = find_namespace_packages(
|
||||
where=".",
|
||||
exclude=('build', 'build.*', 'CMakeFiles', 'CMakeFiles.*',
|
||||
'gtsam.notebooks', '*.preamble', '*.specializations', 'dist'))
|
||||
print("PACKAGES: ", packages)
|
||||
|
||||
package_data = {
|
||||
'': [
|
||||
"./*.so",
|
||||
"./*.dll",
|
||||
"Data/*" # Add the data files to the package
|
||||
"Data/**/*" # Add the data files in subdirectories
|
||||
"./*.dll"
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -41,7 +39,6 @@ setup(
|
|||
'Operating System :: Microsoft :: Windows',
|
||||
'Operating System :: POSIX',
|
||||
'License :: OSI Approved :: BSD License',
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 3',
|
||||
],
|
||||
packages=packages,
|
||||
|
|
|
|||
Loading…
Reference in New Issue