Removing constness causes problems with some no-default-constructor classes. Add dummy default constructors or expose them to public for Cython wrapper only.
Maybe a Cython bug? Both object and pointer object appeared next to each other in the generated cpp file, e.g. JointMarginal p0; JointMarginal* p1; With correct constness, only the pointer object shows up. Maybe related: https://groups.google.com/forum/#!topic/cython-users/HB5yxgKQ6wcrelease/4.3a0
parent
189ce33e1d
commit
ff75d63876
|
@ -38,13 +38,13 @@ class GTSAM_EXPORT PreintegratedAhrsMeasurements : public PreintegratedRotation
|
||||||
Vector3 biasHat_; ///< Angular rate bias values used during preintegration.
|
Vector3 biasHat_; ///< Angular rate bias values used during preintegration.
|
||||||
Matrix3 preintMeasCov_; ///< Covariance matrix of the preintegrated measurements (first-order propagation from *measurementCovariance*)
|
Matrix3 preintMeasCov_; ///< Covariance matrix of the preintegrated measurements (first-order propagation from *measurementCovariance*)
|
||||||
|
|
||||||
/// Default constructor, only for serialization
|
|
||||||
PreintegratedAhrsMeasurements() {}
|
|
||||||
|
|
||||||
friend class AHRSFactor;
|
friend class AHRSFactor;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// Default constructor, only for serialization and Cython wrapper
|
||||||
|
PreintegratedAhrsMeasurements() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default constructor, initialize with no measurements
|
* Default constructor, initialize with no measurements
|
||||||
* @param bias Current estimate of acceleration and rotation rate biases
|
* @param bias Current estimate of acceleration and rotation rate biases
|
||||||
|
|
|
@ -115,7 +115,6 @@ public:
|
||||||
*/
|
*/
|
||||||
Eigen::Matrix<double, 15, 15> preintMeasCov_;
|
Eigen::Matrix<double, 15, 15> preintMeasCov_;
|
||||||
|
|
||||||
PreintegratedCombinedMeasurements() {}
|
|
||||||
|
|
||||||
friend class CombinedImuFactor;
|
friend class CombinedImuFactor;
|
||||||
|
|
||||||
|
@ -123,6 +122,9 @@ public:
|
||||||
/// @name Constructors
|
/// @name Constructors
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
|
/// Default constructor only for serialization and Cython wrapper
|
||||||
|
PreintegratedCombinedMeasurements() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default constructor, initializes the class with no measurements
|
* Default constructor, initializes the class with no measurements
|
||||||
* @param bias Current estimate of acceleration and rotation rate biases
|
* @param bias Current estimate of acceleration and rotation rate biases
|
||||||
|
|
|
@ -78,13 +78,13 @@ protected:
|
||||||
Matrix9 preintMeasCov_; ///< COVARIANCE OF: [PreintPOSITION PreintVELOCITY PreintROTATION]
|
Matrix9 preintMeasCov_; ///< COVARIANCE OF: [PreintPOSITION PreintVELOCITY PreintROTATION]
|
||||||
///< (first-order propagation from *measurementCovariance*).
|
///< (first-order propagation from *measurementCovariance*).
|
||||||
|
|
||||||
/// Default constructor for serialization
|
public:
|
||||||
|
|
||||||
|
/// Default constructor for serialization and Cython wrapper
|
||||||
PreintegratedImuMeasurements() {
|
PreintegratedImuMeasurements() {
|
||||||
preintMeasCov_.setZero();
|
preintMeasCov_.setZero();
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor, initializes the class with no measurements
|
* Constructor, initializes the class with no measurements
|
||||||
* @param bias Current estimate of acceleration and rotation rate biases
|
* @param bias Current estimate of acceleration and rotation rate biases
|
||||||
|
|
|
@ -48,6 +48,10 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/// Default constructor only for Cython wrapper
|
||||||
|
Marginals(){}
|
||||||
|
|
||||||
|
/// Copy constructor
|
||||||
Marginals(const Marginals&) = default;
|
Marginals(const Marginals&) = default;
|
||||||
|
|
||||||
/** Construct a marginals class.
|
/** Construct a marginals class.
|
||||||
|
@ -93,6 +97,10 @@ protected:
|
||||||
FastMap<Key, size_t> indices_;
|
FastMap<Key, size_t> indices_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/// Default constructor only for Cython wrapper
|
||||||
|
JointMarginal() {}
|
||||||
|
|
||||||
|
/// Copy constructor
|
||||||
JointMarginal(const JointMarginal&) = default;
|
JointMarginal(const JointMarginal&) = default;
|
||||||
|
|
||||||
/** Access a block, corresponding to a pair of variables, of the joint
|
/** Access a block, corresponding to a pair of variables, of the joint
|
||||||
|
|
Loading…
Reference in New Issue