Skip to content

Commit

Permalink
Merge branch 'develop' into fix/refactor_cartesian_product
Browse files Browse the repository at this point in the history
  • Loading branch information
dellaert committed Jan 24, 2025
2 parents 40f8a12 + cfb9ea7 commit 3111a3b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 13 deletions.
6 changes: 3 additions & 3 deletions examples/TriangulationLOSTExample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ int main(int argc, char* argv[]) {

double rank_tol = 1e-9;
std::shared_ptr<Cal3_S2> calib = std::make_shared<Cal3_S2>();
std::chrono::nanoseconds durationDLT;
std::chrono::nanoseconds durationDLTOpt;
std::chrono::nanoseconds durationLOST;
std::chrono::nanoseconds durationDLT{};
std::chrono::nanoseconds durationDLTOpt{};
std::chrono::nanoseconds durationLOST{};

for (int i = 0; i < nrTrials; i++) {
Point2Vector noisyMeasurements =
Expand Down
4 changes: 4 additions & 0 deletions gtsam/basis/tests/testFourier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
#include <gtsam/basis/Fourier.h>
#include <gtsam/nonlinear/factorTesting.h>

#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic warning "-Wstringop-overread"
#pragma GCC diagnostic warning "-Warray-bounds"
#endif
using namespace std;
using namespace gtsam;

Expand Down
4 changes: 3 additions & 1 deletion gtsam/geometry/BearingRange.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,10 @@ struct BearingRange {
TangentVector localCoordinates(const BearingRange& other) const {
typename traits<B>::TangentVector v1 = traits<B>::Local(bearing_, other.bearing_);
typename traits<R>::TangentVector v2 = traits<R>::Local(range_, other.range_);
// Set the first dimB elements to v1, and the next dimR elements to v2
TangentVector v;
v << v1, v2;
v.template head<dimB>() = v1;
v.template tail<dimR>() = v2;
return v;
}

Expand Down
4 changes: 4 additions & 0 deletions gtsam/geometry/FundamentalMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
#include <gtsam/geometry/FundamentalMatrix.h>
#include <gtsam/geometry/Point2.h>

#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif

namespace gtsam {

//*************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion gtsam/inference/BayesTreeCliqueBase-inst.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ namespace gtsam {
// The shortcut density is a conditional P(S|B) of the separator of this
// clique on the root or common ancestor B. We can compute it recursively from
// the parent shortcut P(Sp|B) as \int P(Fp|Sp) P(Sp|B), where Fp are the
// frontal nodes in pthe parent p, and Sp the separator of the parent.
// frontal nodes in the parent p, and Sp the separator of the parent.
/* *************************************************************************
*/
template <class DERIVED, class FACTORGRAPH>
Expand Down
15 changes: 7 additions & 8 deletions gtsam/navigation/tests/testGPSFactor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,17 @@ static const auto& kWGS84 = Geocentric::WGS84();
// *************************************************************************
namespace example {
// ENU Origin is where the plane was in hold next to runway
const double lat0 = 33.86998, lon0 = -84.30626, h0 = 274;
static constexpr double lat0 = 33.86998, lon0 = -84.30626, h0 = 274;

// Convert from GPS to ENU
LocalCartesian origin_ENU(lat0, lon0, h0, kWGS84);
static const LocalCartesian origin_ENU(lat0, lon0, h0, kWGS84);

// Dekalb-Peachtree Airport runway 2L
const double lat = 33.87071, lon = -84.30482, h = 274;\
static constexpr double lat = 33.87071, lon = -84.30482, h = 274;

// Random lever arm
const Point3 leverArm(0.1, 0.2, 0.3);

}
static const Point3 leverArm(0.1, 0.2, 0.3);
} // namespace example

// *************************************************************************
TEST( GPSFactor, Constructor ) {
Expand Down Expand Up @@ -135,7 +134,7 @@ TEST( GPSFactorArmCalib, Constructor ) {

// Calculate numerical derivatives
Matrix expectedH1 = numericalDerivative11<Vector, Pose3>(
[&factor, &leverArm](const Pose3& pose_arg) {
[&factor](const Pose3& pose_arg) {
return factor.evaluateError(pose_arg, leverArm);
},
T);
Expand Down Expand Up @@ -235,7 +234,7 @@ TEST( GPSFactor2ArmCalib, Constructor ) {

// Calculate numerical derivatives
Matrix expectedH1 = numericalDerivative11<Vector, NavState>(
[&factor, &leverArm](const NavState& nav_arg) {
[&factor](const NavState& nav_arg) {
return factor.evaluateError(nav_arg, leverArm);
},
T);
Expand Down
3 changes: 3 additions & 0 deletions gtsam/slam/tests/testRotateFactor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

#include <vector>

#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
using namespace std;
using namespace std::placeholders;
using namespace gtsam;
Expand Down

0 comments on commit 3111a3b

Please sign in to comment.