Merge branch 'develop' into fix/refactor_cartesian_product
commit
3111a3bcc0
|
@ -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 =
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -138,8 +138,10 @@ public:
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
//*************************************************************************
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 ) {
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue