Merge pull request #2142 from borglab/fix/merge_in_release_42

Merge in release/4.2
release/4.3a0
Frank Dellaert 2025-05-18 23:26:53 -04:00 committed by GitHub
commit 134f99930d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 12 additions and 7 deletions

View File

@ -55,6 +55,9 @@ Optional prerequisites - used automatically if findable by CMake:
GTSAM 4 introduces several new features, most notably Expressions and a Python toolbox. It also introduces traits, a C++ technique that allows optimizing with non-GTSAM types. That opens the door to retiring geometric types such as Point2 and Point3 to pure Eigen types, which we also do. A significant change which will not trigger a compile error is that zero-initializing of Point2 and Point3 is deprecated, so please be aware that this might render functions using their default constructor incorrect.
There is a flag `GTSAM_ALLOW_DEPRECATED_SINCE_V43` for newly deprecated methods since the 4.3 release, which is on by default, allowing anyone to just pull version 4.3 and compile.
## Wrappers
We provide support for [MATLAB](matlab/README.md) and [Python](python/README.md) wrappers for GTSAM. Please refer to the linked documents for more details.

View File

@ -127,6 +127,9 @@ class GTSAM_EXPORT DiscreteFactorGraph
template <class DERIVED_FACTOR>
DiscreteFactorGraph(const FactorGraph<DERIVED_FACTOR>& graph) : Base(graph) {}
/// Destructor
virtual ~DiscreteFactorGraph() {}
/// @name Testable
/// @{

View File

@ -27,8 +27,6 @@
#include <utility>
#include <gtsam/nonlinear/Values.h>
#include <gtsam/nonlinear/Values.h> // Only so Eclipse finds class definition
namespace gtsam {

View File

@ -81,13 +81,12 @@ struct GTSAM_EXPORT SfmTrack2d {
* @returns boolean result of the validation.
*/
bool hasUniqueCameras() const {
std::vector<int> track_cam_indices;
std::vector<size_t> cameraIndices;
for (auto& measurement : measurements) {
track_cam_indices.emplace_back(measurement.first);
cameraIndices.emplace_back(measurement.first);
}
auto i =
std::adjacent_find(track_cam_indices.begin(), track_cam_indices.end());
bool all_cameras_unique = (i == track_cam_indices.end());
auto i = std::adjacent_find(cameraIndices.begin(), cameraIndices.end());
bool all_cameras_unique = (i == cameraIndices.end());
return all_cameras_unique;
}

View File

@ -10,3 +10,5 @@
* Without this they will be automatically converted to a Python object, and all
* mutations on Python side will not be reflected on C++.
*/
#include <pybind11/stl.h>