ethz-asl / ethzasl_msf

MSF - Modular framework for multi sensor fusion based on an Extended Kalman Filter (EKF)
Other
1k stars 437 forks source link

Error in MSF_Measurement.h, time & time_ ? #153

Closed AlexisTM closed 1 week ago

AlexisTM commented 7 years ago

I am not sure, but the time comparator compares MSF_MeasurementBase<EKFState_T>->_time but it seems to be declared as time in the class.

A rapid search of time_ shows nowhere time_ is initialised.

The class (truncated) :

template<typename EKFState_T>
class MSF_MeasurementBase {
 public:
  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
  MSF_MeasurementBase(bool isabsoluteMeasurement, int sensorID,
                      bool enable_mah_outlier_rejection,
                      double mah_threshold);
  virtual ~MSF_MeasurementBase() {}
  /**
   * \brief The method called by the msf_core to apply the measurement
   * represented by this object.
   */
  virtual void Apply(shared_ptr<EKFState_T> stateWithCovariance,
                     MSF_Core<EKFState_T>& core) = 0;
  virtual std::string Type() = 0;
  int sensorID_;
  bool isabsolute_;
  double time;  ///< The time_ this measurement was taken.
}

the comparaison :

template<typename EKFState_T>
class sortMeasurements {
 public:
  /**
   * Implements the sorting by time.
   */
  bool operator()(const MSF_MeasurementBase<EKFState_T>& lhs,
                  const MSF_MeasurementBase<EKFState_T>& rhs) const {
    return (lhs.time_ < rhs.time_);
  }
};
AlexisTM commented 1 week ago

Outdated.