Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3259 commits
Select commit Hold shift + click to select a range
06a13be
ClusterTree
p-zach Apr 14, 2025
241d6dc
Tab copy errors
p-zach Apr 14, 2025
b54ad4e
BayesTree cleanup
p-zach Apr 14, 2025
f48e94f
Graphviz/dot cleanup
p-zach Apr 14, 2025
91924d9
Remove .roots()
p-zach Apr 14, 2025
d1e8fd3
Ordering fixes
p-zach Apr 15, 2025
369acec
Fix DBT
p-zach Apr 15, 2025
45dec16
Fix Python char nonexistence with ord()
p-zach Apr 15, 2025
7e912c5
Clean up BN, Factor
p-zach Apr 15, 2025
9fe58e7
Trigger doxygen generation in cibuildwheel
yambati03 Apr 15, 2025
198efe2
Remove COLAMD varindex overload
p-zach Apr 15, 2025
098704a
Wrap VariableIndex.at(), .empty()
p-zach Apr 15, 2025
97b6e87
Wrap GaussianEliminationTree
p-zach Apr 15, 2025
3db7920
Fix syntax errors
p-zach Apr 16, 2025
4c4bdd4
Actually the Colamd wrap is fine
p-zach Apr 16, 2025
29f62f1
GaussianISAM interface
p-zach Apr 16, 2025
0cbd9cd
Notebook errors fixed after wrapper updates
p-zach Apr 16, 2025
2d04357
Set GTWRAP_ADD_DOCSTRINGS to ON
yambati03 Apr 16, 2025
0db2a0d
Supress boost output
yambati03 Apr 16, 2025
7f62e8c
Fix errors in xml_parser and rerun
yambati03 Apr 16, 2025
b661d0d
Changes to build macOS wheels for 10.15 or newer
yambati03 Apr 16, 2025
ea6c121
Pull changes from wrap
yambati03 Apr 16, 2025
9c9b5ac
Bump minimum ubuntu runner version to 22.04 since 20.04 is deprecated…
yambati03 Apr 16, 2025
7c3b1f0
Add range SLAM example
dellaert Apr 16, 2025
bcfd0ec
Documentation
p-zach Apr 16, 2025
2291010
Bump clang version
yambati03 Apr 16, 2025
60d0062
Better visualizations
p-zach Apr 16, 2025
6ea62e1
Asia example
p-zach Apr 16, 2025
1e72ff0
Merge pull request #2096 from borglab/feature/examples
dellaert Apr 16, 2025
3fa9da9
Merge pull request #2087 from borglab/new-docs-inference
dellaert Apr 16, 2025
7f34599
Merge pull request #2094 from yambati03/update-wrap-174
dellaert Apr 16, 2025
c9e8d6d
Bump Ubuntu version in Python CI
yambati03 Apr 16, 2025
5329236
Oops, missed a change
yambati03 Apr 16, 2025
718fa46
Merge pull request #2095 from yambati03/ubuntu-2004-deprecation
yambati03 Apr 17, 2025
9a95466
Merge remote-tracking branch 'upstream/develop' into macos_wheels
yambati03 Apr 17, 2025
88ee439
Merge remote-tracking branch 'upstream/develop' into generate_docs
yambati03 Apr 17, 2025
f6ff974
Remove unnecessary change
yambati03 Apr 17, 2025
ab3243f
Clarify Symbol
p-zach Apr 17, 2025
7680766
COLAMD vs METIS details
p-zach Apr 17, 2025
eee10eb
Ameliorate visuals
p-zach Apr 17, 2025
7cb169f
LogmapDerivative(xi)
dellaert Apr 13, 2025
b0fb28f
Expmap to .cpp file
dellaert Apr 15, 2025
ac6735b
LogmapDerivative == rightJacobianInverse
dellaert Apr 15, 2025
f213665
Revamp Thresholds in SO3
dellaert Apr 16, 2025
75681ba
SO3 docs
dellaert Apr 17, 2025
2df2ff7
Better tests
dellaert Apr 17, 2025
57cc800
Merge pull request #2092 from yambati03/generate_docs
dellaert Apr 17, 2025
11f7742
Merge pull request #2098 from borglab/ordering-doc-update
dellaert Apr 17, 2025
2f0bff1
Ordering minor fixes
p-zach Apr 17, 2025
515127c
%pip install --quiet gtsam-develop
p-zach Apr 17, 2025
1d2efc0
Merge upstream:develop into branch
yambati03 Apr 17, 2025
d4f5f37
Merge pull request #2100 from borglab/docs-minor-updates
dellaert Apr 17, 2025
4ad62e8
Merge pull request #2093 from yambati03/macos_wheels
yambati03 Apr 17, 2025
721a24f
Add targets for Mac ARM 64
yambati03 Apr 17, 2025
bfde2b3
Update navbar
p-zach Apr 17, 2025
4cfae38
Rerun CI
p-zach Apr 18, 2025
c3c1a9a
Merge pull request #2102 from yambati03/macos-silicon-cibuildwheel
dellaert Apr 18, 2025
a61ce2a
Merge pull request #2097 from borglab/update-nav
dellaert Apr 18, 2025
bbaacc2
Wrap BayesTree traversal
dellaert Apr 20, 2025
3c26d1f
Symbolic docs
dellaert Apr 20, 2025
8df8741
Add to toc
dellaert Apr 20, 2025
3a1188a
Merge pull request #2105 from borglab/feature/BayesTree
dellaert Apr 20, 2025
52efba9
Deprecated dexp() and dexpInv, inlined crossB and doubleCrossC
dellaert Apr 18, 2025
e9e839f
Use inverse() beyond pi
dellaert Apr 18, 2025
795782d
Merge branch 'develop' into feature/LogmapDerivative
dellaert Apr 20, 2025
dd6b70e
Fix bug in refactor
dellaert Apr 20, 2025
c4b2cc5
Undid Logmap refactor:
dellaert Apr 20, 2025
a3b7f03
Instrument code for failing windows test
dellaert Apr 20, 2025
b5293ef
Another attempt at windows debugging
dellaert Apr 20, 2025
6733365
Implement ABC_EQF in cpp - Inputs are simulated- Use with caution
darshan-17 Mar 13, 2025
d9cd905
c++ implementation - use with caution
darshan-17 Mar 20, 2025
9aefd92
Adding a function to translate output data into csv and store in loca…
darshan-17 Mar 25, 2025
d1673b7
Used GTSAM ExpmapDerivative to calculate Left Jacobian(-1)
darshan-17 Mar 27, 2025
39a7a5b
Update wedge and vee to Rot3 Hat and Vee for EqF
jenniferoum Mar 27, 2025
cd1782e
C++ implementation of the EqF to estimate bias.
darshan-17 Apr 16, 2025
d48bf56
Removed older linux dependencies, updated cmake version requirement i…
darshan-17 Apr 17, 2025
e5f4978
Address some pr comments - remove ABC_EQF.cpp, clean up comments, cha…
jenniferoum Apr 21, 2025
925e94e
Resolved the direction class -> Unit3, and local_coords, local_inv fu…
darshan-17 Apr 21, 2025
a04b7e1
Fix const
dellaert Apr 21, 2025
51e20ec
Inline measurement, G, and State functions, use brace initialization
jenniferoum Apr 22, 2025
c9498fe
Merge pull request #2099 from borglab/feature/LogmapDerivative
dellaert Apr 22, 2025
247172d
Converted PlanarSLAM
dellaert Apr 23, 2025
e52685d
Pose-SLAM and rendering
dellaert Apr 23, 2025
104bba2
EKF-SLAM proto
dellaert Apr 23, 2025
66f5ba0
Param name mismatches
p-zach Apr 23, 2025
453491b
Document param match requirement
p-zach Apr 23, 2025
6bf2f55
Merge branch 'develop' into fix-docs-params-inherits
p-zach Apr 23, 2025
a80a923
Merge pull request #2107 from borglab/fix-docs-params-inherits
dellaert Apr 23, 2025
5b91110
Add wrapper for imuBias in iSAM2
ProfFan Apr 24, 2025
af3de7b
Add production workflow for cibw
yambati03 Apr 24, 2025
3eac859
Merge pull request #2108 from borglab/fan/add_wrapping_imubias_isam2
dellaert Apr 24, 2025
c28c9b5
New SLAM notebooks
p-zach Apr 24, 2025
e4cf0a2
pip install gtsam-develop
p-zach Apr 24, 2025
e226cdd
yml and summary
p-zach Apr 24, 2025
423e447
Two new modules
dellaert Apr 24, 2025
8148b78
More modular
dellaert Apr 24, 2025
1bf76be
Even more modular
dellaert Apr 24, 2025
e427868
Plot side by side
dellaert Apr 24, 2025
aafeabe
Add files via upload
scottiyio Apr 25, 2025
693a089
Add files via upload
scottiyio Apr 25, 2025
c521dbc
Add files via upload
scottiyio Apr 25, 2025
136a7cd
Delete examples/SE2LIEKF_NoFactors.cpp
scottiyio Apr 25, 2025
d178060
SVG graphs
dellaert Apr 25, 2025
17bf752
Template on size_t, Darshan's updates to cleanup comments, default co…
jenniferoum Apr 25, 2025
12d4223
clang-formatted, changed getFoobar() to foobar()
scottiyio Apr 25, 2025
8aed731
Added documentation and format changes.
scottiyio Apr 25, 2025
6ff0439
Added authors
scottiyio Apr 25, 2025
f857001
Added documentation & clang formatting
scottiyio Apr 25, 2025
95794f7
Added authors
scottiyio Apr 25, 2025
deb4045
Merge pull request #2103 from jenniferoum/feature/equivariant-filter
dellaert Apr 26, 2025
b07b77c
Better plotting, true filter
dellaert Apr 26, 2025
beceb65
Merge pull request #2114 from borglab/feature/slam_examples
dellaert Apr 26, 2025
0d832a6
no_boost
dellaert Apr 26, 2025
b1c32cb
Templated predict/update
dellaert Apr 26, 2025
9352465
More symmetric templating
dellaert Apr 26, 2025
f0e35ae
Comments with o4-mini
dellaert Apr 26, 2025
f63255b
Move to nav
dellaert Apr 26, 2025
885ab38
Docs with o4-mini
dellaert Apr 26, 2025
0ee0a8b
Test WIP
dellaert Apr 26, 2025
5af25dc
Use nav version
dellaert Apr 26, 2025
8fbe3c9
Fixed KarcherMean issue
dellaert Apr 26, 2025
3e13c44
Fix LAGO docs, add test
dellaert Apr 26, 2025
fa23a88
Fixed PlanarProjectionFactor
dellaert Apr 26, 2025
9c1aa80
Merge pull request #2116 from borglab/fix/new-docs-slam
p-zach Apr 26, 2025
25a2deb
Wrap OrientedPlane3
p-zach Apr 27, 2025
43addb5
Wrap many SLAM classes
p-zach Apr 27, 2025
57dbbfd
Fix SLAM notebook wrap problems and typos
p-zach Apr 27, 2025
d245a7a
Merge branch 'new-docs-slam' of https://github.com/borglab/gtsam into…
p-zach Apr 27, 2025
502ff27
Add OrientedPlane3 to Values wrapper
dellaert Apr 27, 2025
513bbb4
Fix FindKarcherMean tests
dellaert Apr 27, 2025
47812cd
Expanded SmartFactor wrapping
dellaert Apr 27, 2025
603caf1
Edited docs only
dellaert Apr 27, 2025
2cfd2e0
Wrap Rig version
dellaert Apr 27, 2025
062bdf6
Added Rot3 example to show state-dependent control
dellaert Apr 27, 2025
8bdf532
Fix ReferenceFrameFactor
p-zach Apr 27, 2025
cbc45c9
Working rig !
dellaert Apr 27, 2025
be26703
Better docs
dellaert Apr 27, 2025
8f5e78c
Merge pull request #2117 from borglab/fix/new-docs-slam
dellaert Apr 27, 2025
1ced4d0
Review comments
dellaert Apr 27, 2025
a0c6902
SFINAE to restrict template matching
dellaert Apr 27, 2025
42cc0ac
Merge pull request #2111 from borglab/new-docs-slam
dellaert Apr 27, 2025
4f2a62a
Update testLIEKF.cpp
dellaert Apr 27, 2025
104341f
well-tested predictMean
dellaert Apr 28, 2025
87c4445
predictMean for state=control f
dellaert Apr 28, 2025
5bc0108
Correct jacobian for h_gps
dellaert Apr 28, 2025
ab60577
Rename
dellaert Apr 28, 2025
51e89d2
Fix compilation
dellaert Apr 28, 2025
4cc2e22
Add value to concepts
dellaert Apr 29, 2025
3bcc556
EKF hierarchy
dellaert Apr 29, 2025
07c9bc8
Implement working Gal3 class with passing tests
mkielo3 Apr 30, 2025
42985c6
Add Galilean 3 group
mkielo3 May 1, 2025
129c10a
Update .gitignore
mkielo3 May 1, 2025
fb72fab
gal3 implementation
mkielo3 May 1, 2025
bdd0d3e
Push to TestPyPI
yambati03 May 1, 2025
a9a7939
Merge branch 'borglab:develop' into cibw-prod
yambati03 May 1, 2025
af70b17
Add script to clean up gtsam-develop project releases
yambati03 May 1, 2025
86771b5
removed navstate order comment
mkielo3 May 3, 2025
e330bd3
refactored Expmap/Logmap to remove calculate E and remove redundancy
mkielo3 May 3, 2025
8877542
refactored to inherit from LieGroup wherever possible
mkielo3 May 3, 2025
e8a002e
addressed PR comments
mkielo3 May 3, 2025
036e77e
fixed Event paths
mkielo3 May 6, 2025
f07d9aa
fixed Event paths
mkielo3 May 6, 2025
b7a3bff
Merge pull request #2123 from yambati03/clean-gtsam-develop
dellaert May 7, 2025
ec8c762
Renamed GroupEKF -> LieGroupEKF, moved invariant predicts
dellaert May 7, 2025
e41c2ee
Merge pull request #2115 from borglab/feature/templated_methods
dellaert May 7, 2025
cb9d398
Format, document, optimize slightly - Gemini 2.5
dellaert May 7, 2025
9f148d0
Fix link
dellaert May 7, 2025
db260f6
Smart factors math overview
dellaert May 7, 2025
2ba3bc3
Fix type
dellaert May 7, 2025
c5a26ae
fixed paths to move Event from unstable
mkielo3 May 8, 2025
0c9f87d
Merge pull request #2126 from borglab/feature/smartFactorDocs
dellaert May 8, 2025
5111215
fixed python build error
mkielo3 May 8, 2025
ac295eb
Add explicit update
dellaert May 9, 2025
eacdf1c
Now handle dynamic types
dellaert May 9, 2025
16f650c
Retain efficiency in static case
dellaert May 9, 2025
ea783b0
Reduce clutter
dellaert May 9, 2025
2a22123
Add AdjointMap into traits
dellaert May 9, 2025
192b6a2
Deal with Matrix
dellaert May 9, 2025
5758c7e
Simplify tests
dellaert May 9, 2025
8efce78
Added dynamic test for LieGroupEKF as well
dellaert May 9, 2025
da09c4a
naming
dellaert May 9, 2025
87797c6
Fix bug in Debug
dellaert May 10, 2025
1c5544e
Fix figure to autosize, also remove menu
dellaert May 10, 2025
b792270
Merge pull request #2129 from borglab/feature/dynamicSizes
dellaert May 10, 2025
37aba60
Merge pull request #2131 from borglab/fix/EKF_SLAM_example
dellaert May 10, 2025
222234d
include IncrementalFixedLagSmoother from gtsam and not gtsam_unstable
varunagrawal May 12, 2025
5c5260b
move IncrementalFixedLagSmoother tests to gtsam directory
varunagrawal May 12, 2025
6d30fe0
Merge pull request #2132 from borglab/fix-2125
dellaert May 13, 2025
9f4ab83
separate DiscreteMarginals into .h and .cpp
varunagrawal May 14, 2025
27fc6a7
add print method to DiscreteMarginals
varunagrawal May 14, 2025
5333317
wrap DiscreteMarginals class
varunagrawal May 14, 2025
a01ece4
fix includes
varunagrawal May 14, 2025
e5c0557
small fixes
varunagrawal May 14, 2025
1514a0d
mark DiscreteMarginals with GTSAM_EXPORT
varunagrawal May 15, 2025
4d97136
new helper method in DiscreteBayesNet to compute joint conditional
varunagrawal May 14, 2025
de4233d
use DiscreteBayesNet::joint in HybridBayesNet
varunagrawal May 14, 2025
48ca735
wrap HybridBayesNet::discreteMarginal
varunagrawal May 14, 2025
c254e4c
update removeFixedValues to reintroduce a discrete factor on the remo…
varunagrawal May 14, 2025
48879af
update TableFactor to only consider values greater than 1e-11
varunagrawal May 14, 2025
b14bae5
Merge pull request #2134 from borglab/wrap/discrete
dellaert May 15, 2025
7c53ca3
fix docstrings
varunagrawal May 15, 2025
6527437
create common PRNG object in DiscreteConditional
varunagrawal May 15, 2025
82190cb
update wrapper comment in GaussianConditional
varunagrawal May 15, 2025
b58d509
add python test for sampling from GaussianConditional with a PRNG
varunagrawal May 15, 2025
84d8c7e
DiscreteConditional::sample which uses a pseudo RNG
varunagrawal May 15, 2025
4295903
default rng argument to make code DRY
varunagrawal May 15, 2025
347f4b2
update wrapper
varunagrawal May 15, 2025
5848b58
remove PRNG declaration since it is now imported from DiscreteConditi…
varunagrawal May 15, 2025
6f8dfdf
wrap rng in hybrid
varunagrawal May 15, 2025
eb35ff8
wrap rng in DiscreteConditional
varunagrawal May 15, 2025
0d70a47
wrap mt19937_64
varunagrawal May 15, 2025
f853b15
sampling tests
varunagrawal May 15, 2025
2e8f948
fix regressions
varunagrawal May 15, 2025
c2b26c5
address review comment
varunagrawal May 15, 2025
5702ec7
Merge remote-tracking branch 'upstream/develop' into gal update upstream
mkielo3 May 16, 2025
bbd0ef5
Merge pull request #2135 from borglab/hybrid-improvements
varunagrawal May 16, 2025
faedfcb
Merge branch 'develop' into wrap/rng
varunagrawal May 16, 2025
d01bf5d
some docs
varunagrawal May 16, 2025
22a36b3
pass in the rng within the DiscreteBayesNet sample call
varunagrawal May 16, 2025
8b6ce55
set default pointer value to nullptr which is more idiomatic
varunagrawal May 16, 2025
ab0a4a8
nullptr check and assign default
varunagrawal May 16, 2025
9fea009
use nullptr for pointer default in discrete wrapping
varunagrawal May 16, 2025
32b8eff
fixed IncrementalFixedLagSmooth
mkielo3 May 16, 2025
30aeff9
add print to verify regression values
varunagrawal May 16, 2025
a84ac8f
fix regression for linux
varunagrawal May 16, 2025
dcc47d2
reduce swap file size so CI doesn't fail
varunagrawal May 16, 2025
c4e1f7e
fix regression in test_HybridFactorGraph.py
varunagrawal May 16, 2025
b95a352
Merge pull request #2136 from borglab/wrap/rng
varunagrawal May 16, 2025
95af327
make sample methods DRY in HybridBayesNet and GaussianConditional
varunagrawal May 16, 2025
d4c9c68
update wrapper with rng default args
varunagrawal May 16, 2025
e6c1428
cleanup
mkielo3 May 16, 2025
d6b4383
Merge pull request #2122 from mkielo3/gal
dellaert May 16, 2025
be64222
Fix comment
dellaert May 16, 2025
f81879a
Fix include for Retract
dellaert May 16, 2025
6cf3616
Upgrade cmake version
dellaert May 16, 2025
cc4a0e1
Merge pull request #2139 from borglab/fix/example
dellaert May 17, 2025
bc7646f
add global PRNG to utilities.h
varunagrawal May 17, 2025
995bedb
use default RNG object for mt19937_64 everywhere
varunagrawal May 17, 2025
8302f2d
use global kRandomNumberGenerator
varunagrawal May 17, 2025
12baf54
rename kRandomNumberGenerator in local files to kPRNG to prevent coll…
varunagrawal May 17, 2025
4b6af3d
remove more collisions
varunagrawal May 17, 2025
5b18f05
–In a similar way, add Multi RobotKeyFormatter as an external variable
tom-jurov May 17, 2025
e2d3cf5
Merge pull request #2140 from DrWisdome/formatter-export
dellaert May 18, 2025
618505e
separate checks for Apple and Windows since the RNG values are different
varunagrawal May 19, 2025
90c44de
Merge remote-tracking branch 'origin/release/4.2' into develop
dellaert May 19, 2025
82decf9
Undo some changes
dellaert May 19, 2025
01409fc
Merge pull request #2137 from borglab/update-rng
dellaert May 19, 2025
c1ec31c
Fix loss-of-data warning on windows
dellaert May 19, 2025
134f999
Merge pull request #2142 from borglab/fix/merge_in_release_42
dellaert May 19, 2025
ce5f93f
Merge pull request #2110 from yambati03/cibw-prod
dellaert May 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BasedOnStyle: Google
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: "Bug Report"
about: Submit a bug report to help us improve GTSAM
---

<!-- This is a channel to report bugs/issues, not a support channel to help install/use/debug your own code. We'd love to help, but just don't have the bandwidth. Please post questions in the GTSAM Google group (https://groups.google.com/forum/#!forum/gtsam-users) -->

<!--Please only submit issues/bug reports that come with enough information to reproduce them, ideally a unit test that fails, and possible ideas on what might be wrong. -->

<!-- Even better yet, fix the bug and/or documentation, add a unit test, and create a pull request! -->

<!-- This is a channel to report bugs/issues, not a support channel to help install/use/debug your own code. We'd love to help, but just don't have the bandwidth. Please post questions in the GTSAM Google group (https://groups.google.com/forum/#!forum/gtsam-users) -->

## Description

<!-- A clear description of the bug -->
Expand Down
18 changes: 0 additions & 18 deletions .github/scripts/boost.sh

This file was deleted.

56 changes: 21 additions & 35 deletions .github/scripts/python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,13 @@ set -x -e
# install TBB with _debug.so files
function install_tbb()
{
TBB_BASEURL=https://github.com/oneapi-src/oneTBB/releases/download
TBB_VERSION=4.4.5
TBB_DIR=tbb44_20160526oss
TBB_SAVEPATH="/tmp/tbb.tgz"

echo install_tbb
if [ "$(uname)" == "Linux" ]; then
OS_SHORT="lin"
TBB_LIB_DIR="intel64/gcc4.4"
SUDO="sudo"
sudo apt-get -y install libtbb-dev

elif [ "$(uname)" == "Darwin" ]; then
OS_SHORT="osx"
TBB_LIB_DIR=""
SUDO=""

brew install tbb
fi

wget "${TBB_BASEURL}/${TBB_VERSION}/${TBB_DIR}_${OS_SHORT}.tgz" -O $TBB_SAVEPATH
tar -C /tmp -xf $TBB_SAVEPATH

TBBROOT=/tmp/$TBB_DIR
# Copy the needed files to the correct places.
# This works correctly for CI builds, instead of setting path variables.
# This is what Homebrew does to install TBB on Macs
$SUDO cp -R $TBBROOT/lib/$TBB_LIB_DIR/* /usr/local/lib/
$SUDO cp -R $TBBROOT/include/ /usr/local/include/

}

if [ -z ${PYTHON_VERSION+x} ]; then
Expand All @@ -56,19 +36,18 @@ function install_dependencies()

export PATH=$PATH:$($PYTHON -c "import site; print(site.USER_BASE)")/bin

[ "${GTSAM_WITH_TBB:-OFF}" = "ON" ] && install_tbb

$PYTHON -m pip install -r $GITHUB_WORKSPACE/python/requirements.txt
if [ "${GTSAM_WITH_TBB:-OFF}" == "ON" ]; then
install_tbb
fi
}

function build()
{
mkdir $GITHUB_WORKSPACE/build
cd $GITHUB_WORKSPACE/build

export CMAKE_GENERATOR=Ninja
BUILD_PYBIND="ON"

cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
cmake $GITHUB_WORKSPACE \
-B build \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DGTSAM_BUILD_TESTS=OFF \
-DGTSAM_BUILD_UNSTABLE=${GTSAM_BUILD_UNSTABLE:-ON} \
-DGTSAM_USE_QUATERNIONS=OFF \
Expand All @@ -79,21 +58,28 @@ function build()
-DGTSAM_UNSTABLE_BUILD_PYTHON=${GTSAM_BUILD_UNSTABLE:-ON} \
-DGTSAM_PYTHON_VERSION=$PYTHON_VERSION \
-DPYTHON_EXECUTABLE:FILEPATH=$(which $PYTHON) \
-DGTSAM_ALLOW_DEPRECATED_SINCE_V42=OFF \
-DGTSAM_ALLOW_DEPRECATED_SINCE_V43=OFF \
-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/gtsam_install


# Set to 2 cores so that Actions does not error out during resource provisioning.
make -j2 install
cmake --build build -j2

cd $GITHUB_WORKSPACE/build/python
$PYTHON -m pip install --user .
cmake --build build --target python-install
}

function test()
{
cd $GITHUB_WORKSPACE/python/gtsam/tests
$PYTHON -m unittest discover -v
cd $GITHUB_WORKSPACE

cd $GITHUB_WORKSPACE/python/gtsam_unstable/tests
$PYTHON -m unittest discover -v
cd $GITHUB_WORKSPACE

# cmake --build build --target python-test
# cmake --build build --target python-test-unstable
}

# select between build or test
Expand Down
10 changes: 10 additions & 0 deletions .github/scripts/python_wheels/build_wheels.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# This script calls cibuildwheel to build the wheels for the project. It is used in the build-cibw.yml workflow in .github/workflows.
# Note that the build/python directory contains the wrapper module built for the specified Python version.

set -e
set -x

python -m pip install cibuildwheel
python -m cibuildwheel build/python --output-dir wheelhouse
97 changes: 97 additions & 0 deletions .github/scripts/python_wheels/cibw_before_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
#!/bin/bash

# This script is invoked prior to building the wheels with cibuildwheel. It is used in the build-cibw.yml workflow in .github/workflows.
# It installs the necessary dependencies and builds the wrapper module for the specified Python version.

set -e
set -x

PYTHON_VERSION="$1"
PROJECT_DIR="$2"
ARCH=$(uname -m)

export PYTHON="python${PYTHON_VERSION}"

if [ "$(uname)" == "Linux" ]; then
# manylinux2014 is based on CentOS 7, so use yum to install dependencies
yum install -y wget doxygen
elif [ "$(uname)" == "Darwin" ]; then
brew install cmake doxygen

# If MACOSX_DEPLOYMENT_TARGET is not explicitly set, default to the version of the host system.
if [[ -z "${MACOSX_DEPLOYMENT_TARGET}" ]]; then
export MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion | cut -d '.' -f 1-2)"
fi
fi

# Install Boost from source
wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz --quiet
tar -xzf boost_1_87_0.tar.gz
cd boost_1_87_0

BOOST_PREFIX="$HOME/opt/boost"
./bootstrap.sh --prefix=${BOOST_PREFIX}

if [ "$(uname)" == "Linux" ]; then
./b2 install --prefix=${BOOST_PREFIX} --with=all -d0
elif [ "$(uname)" == "Darwin" ]; then
./b2 install --prefix=${BOOST_PREFIX} --with=all -d0 \
cxxflags="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" \
linkflags="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}"
fi
cd ..

# Export paths so CMake or build system can find Boost
export BOOST_ROOT="${BOOST_PREFIX}"
export BOOST_INCLUDEDIR="${BOOST_PREFIX}/include"
export BOOST_LIBRARYDIR="${BOOST_PREFIX}/lib"

# Ensure runtime linker can find Boost libraries
export LD_LIBRARY_PATH="${BOOST_LIBRARYDIR}:$LD_LIBRARY_PATH" # For Linux
export REPAIR_LIBRARY_PATH="${BOOST_LIBRARYDIR}:$DYLD_LIBRARY_PATH" # For macOS, REPAIR_LIBRARY_PATH is used by delocate

if [ "$(uname)" == "Darwin" ]; then
# Explicitly add rpath to Boost dylibs so delocate can find them
for dylib in ${BOOST_LIBRARYDIR}/*.dylib; do
install_name_tool -add_rpath "@loader_path" "$dylib"
done
fi

$(which $PYTHON) -m pip install -r $PROJECT_DIR/python/dev_requirements.txt

# Remove build/cache files that were generated on host
rm -rf $PROJECT_DIR/build
rm -rf CMakeCache.txt CMakeFiles

# Build the Python wrapper module
cmake $PROJECT_DIR \
-B build \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DGTSAM_BUILD_TESTS=OFF \
-DGTSAM_BUILD_UNSTABLE=${GTSAM_BUILD_UNSTABLE:-ON} \
-DGTSAM_USE_QUATERNIONS=OFF \
-DGTSAM_WITH_TBB=${GTSAM_WITH_TBB:-OFF} \
-DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF \
-DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF \
-DGTSAM_BUILD_PYTHON=ON \
-DGTSAM_UNSTABLE_BUILD_PYTHON=${GTSAM_BUILD_UNSTABLE:-ON} \
-DGTSAM_PYTHON_VERSION=$PYTHON_VERSION \
-DPYTHON_EXECUTABLE:FILEPATH=$(which $PYTHON) \
-DGTSAM_ALLOW_DEPRECATED_SINCE_V43=OFF \
-DCMAKE_INSTALL_PREFIX=$PROJECT_DIR/gtsam_install \
-DGTSAM_GENERATE_DOC_XML=1 \
-DGTWRAP_ADD_DOCSTRINGS=ON

# Generate Doxygen XML documentation
doxygen build/doc/Doxyfile

# Install the Python wrapper module and generate Python stubs
cd $PROJECT_DIR/build/python
if [ "$(uname)" == "Linux" ]; then
make -j $(nproc) install
make -j $(nproc) python-stubs
elif [ "$(uname)" == "Darwin" ]; then
make -j $(sysctl -n hw.logicalcpu) install
make -j $(sysctl -n hw.logicalcpu) python-stubs
fi

46 changes: 46 additions & 0 deletions .github/scripts/python_wheels/cleanup_gtsam_develop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env bash

# This script deletes all but the most recent release from the gtsam-develop project on PyPI
# and can be used if the project size exceeds the PyPI limit of 10 GB. The user must have
# owner or maintainer privileges on the project.

set -euo pipefail

usage() {
cat <<EOF
Usage: $(basename "$0") <pypi_username>

Deletes all but the most recent release from the gtsam-develop project on PyPI.
You must supply the PyPI user name that has owner or maintainer privileges on
the project. THIS OPERATION IS PERMANENT.

Examples
$ $(basename "$0") yambati3
$ $(basename "$0") # will prompt for user name
EOF
}

if [[ $# -ge 1 ]]; then
PYPI_USER="$1"
else
read -rp "Enter your PyPI user name: " PYPI_USER
[[ -z "$PYPI_USER" ]] && { echo "No user name supplied."; usage; exit 1; }
fi

echo "-----------------------------------------------------------------------"
echo "WARNING: This WILL permanently delete all but the most recent release"
echo " of 'gtsam-develop' on PyPI for user '$PYPI_USER'."
echo " This cannot be undone."
echo "-----------------------------------------------------------------------"
read -rp "Proceed? [y/N]: " REPLY
REPLY=${REPLY,,} # to lowercase
[[ "$REPLY" != "y" && "$REPLY" != "yes" ]] && { echo "Aborted."; exit 0; }

echo "Running pypi_cleanup for user '$PYPI_USER'..."
python3 -m pypi_cleanup.__init__ \
-p gtsam-develop \
--leave-most-recent-only \
--do-it \
-u "$PYPI_USER"

echo "Done."
Loading
Loading