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.
 | ||||
|   Matrix3 preintMeasCov_; ///< Covariance matrix of the preintegrated measurements (first-order propagation from *measurementCovariance*)
 | ||||
| 
 | ||||
|   /// Default constructor, only for serialization
 | ||||
|   PreintegratedAhrsMeasurements() {} | ||||
| 
 | ||||
|   friend class AHRSFactor; | ||||
| 
 | ||||
|  public: | ||||
| 
 | ||||
|   /// Default constructor, only for serialization and Cython wrapper
 | ||||
|   PreintegratedAhrsMeasurements() {} | ||||
| 
 | ||||
|   /**
 | ||||
|    *  Default constructor, initialize with no measurements | ||||
|    *  @param bias Current estimate of acceleration and rotation rate biases | ||||
|  |  | |||
|  | @ -115,7 +115,6 @@ public: | |||
|    */ | ||||
|   Eigen::Matrix<double, 15, 15> preintMeasCov_; | ||||
| 
 | ||||
|   PreintegratedCombinedMeasurements() {} | ||||
| 
 | ||||
|   friend class CombinedImuFactor; | ||||
| 
 | ||||
|  | @ -123,6 +122,9 @@ public: | |||
|   /// @name Constructors
 | ||||
|   /// @{
 | ||||
| 
 | ||||
|   /// Default constructor only for serialization and Cython wrapper
 | ||||
|   PreintegratedCombinedMeasurements() {} | ||||
| 
 | ||||
|   /**
 | ||||
|    *  Default constructor, initializes the class with no measurements | ||||
|    *  @param bias Current estimate of acceleration and rotation rate biases | ||||
|  |  | |||
|  | @ -78,13 +78,13 @@ protected: | |||
|   Matrix9 preintMeasCov_; ///< COVARIANCE OF: [PreintPOSITION PreintVELOCITY PreintROTATION]
 | ||||
|   ///< (first-order propagation from *measurementCovariance*).
 | ||||
| 
 | ||||
|   /// Default constructor for serialization
 | ||||
| public: | ||||
| 
 | ||||
|   /// Default constructor for serialization and Cython wrapper
 | ||||
|   PreintegratedImuMeasurements() { | ||||
|     preintMeasCov_.setZero(); | ||||
|   } | ||||
| 
 | ||||
| public: | ||||
| 
 | ||||
|  /**
 | ||||
|    *  Constructor, initializes the class with no measurements | ||||
|    *  @param bias Current estimate of acceleration and rotation rate biases | ||||
|  |  | |||
|  | @ -48,6 +48,10 @@ protected: | |||
| 
 | ||||
| public: | ||||
| 
 | ||||
|   /// Default constructor only for Cython wrapper
 | ||||
|   Marginals(){} | ||||
| 
 | ||||
|   /// Copy constructor
 | ||||
|   Marginals(const Marginals&) = default; | ||||
| 
 | ||||
|   /** Construct a marginals class.
 | ||||
|  | @ -93,6 +97,10 @@ protected: | |||
|   FastMap<Key, size_t> indices_; | ||||
| 
 | ||||
| public: | ||||
|   /// Default constructor only for Cython wrapper
 | ||||
|   JointMarginal() {} | ||||
| 
 | ||||
|   /// Copy constructor
 | ||||
|   JointMarginal(const JointMarginal&) = default; | ||||
| 
 | ||||
|   /** Access a block, corresponding to a pair of variables, of the joint
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue