Simple state estimator using a Kalman filter with a constant velocity model.
Definition at line 72 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.


Public Member Functions | |
| SimpleEstimator2 (const std::string &configFilePath, const int numTotalStates=6, const int numObservStates=4, const float processNoiseScale=1.0, const float measurementNoiseScale=1.0) | |
| Construct a Kalman-filter state estimator from configuration. More... | |
| ~SimpleEstimator2 () | |
| Destroy the simple state estimator. More... | |
| void | reset () override |
| Reset the states and make the age to be zero. More... | |
| Eigen::VectorXd | update (const float dT=1) override |
| Update without any measurement, using the prediction only. More... | |
| Eigen::VectorXd | update (const std::vector< std::tuple< Eigen::VectorXd, Eigen::Matrix2d, bool > > &measurements, const float dT=1) override |
| Given a set of measurements and their covariances, update the estimator and returns the estimated states. More... | |
| Eigen::VectorXd | getStates () const override |
| Return the current estimated states. More... | |
| Eigen::VectorXd | getPredictedStates (const float dT=1) override |
| Predict states without modifying the current estimate. More... | |
| Eigen::MatrixXd | getMeasurementNoiseCovariance () const override |
| Return the measurement-noise covariance matrix. More... | |
| std::tuple< Eigen::VectorXd, Eigen::MatrixXd > | getStatesWithCov () const override |
| Return the current states and their covariance. More... | |
| std::tuple< Eigen::VectorXd, Eigen::MatrixXd > | getPredictedStatesWithCov (const float dT=1) override |
| Predict states and covariance without modifying the current estimate. More... | |
| std::tuple< Eigen::VectorXd, Eigen::MatrixXd > | getPredictedMeasurementsWithCov (const float dT=1) override |
| Predict measurements and covariance without modifying the current estimate. More... | |
| void | overrideState (const Eigen::Vector2d &position, const Eigen::Vector2d &velocity) override |
| Overwrite the position and velocity components for a location estimator. More... | |
| uint32_t | getAge () const override |
| Return the number of estimator updates. More... | |
| const bool | useAspectRatio () const override |
| Return whether the estimator represents size using aspect ratio. More... | |
| const STATE_ESTIMATOR_TYPES | getStateEstimatorType () override |
| Return the configured state-estimator type. More... | |
| SimpleEstimator2 (const std::string &configFilePath, const int numTotalStates=6, const int numObservStates=4, const float processNoiseScale=1.0, const float measurementNoiseScale=1.0) | |
| Construct a Kalman-filter state estimator from configuration. More... | |
| ~SimpleEstimator2 () | |
| Destroy the simple state estimator. More... | |
| void | reset () override |
| Reset the states and make the age to be zero. More... | |
| Eigen::VectorXd | update (const float dT=1) override |
| Update without any measurement, using the prediction only. More... | |
| Eigen::VectorXd | update (const std::vector< std::tuple< Eigen::VectorXd, Eigen::Matrix2d, bool > > &measurements, const float dT=1) override |
| Given a set of measurements and their covariances, update the estimator and returns the estimated states. More... | |
| Eigen::VectorXd | getStates () const override |
| Return the current estimated states. More... | |
| Eigen::VectorXd | getPredictedStates (const float dT=1) override |
| Predict states without modifying the current estimate. More... | |
| Eigen::MatrixXd | getMeasurementNoiseCovariance () const override |
| Return the measurement-noise covariance matrix. More... | |
| std::tuple< Eigen::VectorXd, Eigen::MatrixXd > | getStatesWithCov () const override |
| Return the current states and their covariance. More... | |
| std::tuple< Eigen::VectorXd, Eigen::MatrixXd > | getPredictedStatesWithCov (const float dT=1) override |
| Predict states and covariance without modifying the current estimate. More... | |
| std::tuple< Eigen::VectorXd, Eigen::MatrixXd > | getPredictedMeasurementsWithCov (const float dT=1) override |
| Predict measurements and covariance without modifying the current estimate. More... | |
| void | overrideState (const Eigen::Vector2d &position, const Eigen::Vector2d &velocity) override |
| Overwrite the position and velocity components for a location estimator. More... | |
| uint32_t | getAge () const override |
| Return the number of estimator updates. More... | |
| const bool | useAspectRatio () const override |
| Return whether the estimator represents size using aspect ratio. More... | |
| const STATE_ESTIMATOR_TYPES | getStateEstimatorType () override |
| Return the configured state-estimator type. More... | |
Protected Types | |
| enum | MEASUREMENT_NOISE_OPTION { UNCHANGED, DETECTOR, TRACKER, UNCHANGED, DETECTOR, TRACKER } |
| Options to set constant measurement noise. More... | |
| enum | MEASUREMENT_NOISE_OPTION { UNCHANGED, DETECTOR, TRACKER, UNCHANGED, DETECTOR, TRACKER } |
| Options to set constant measurement noise. More... | |
Protected Member Functions | |
| void | initStates (const Eigen::VectorXd &meas) |
| Initialize the target state from a measurement. More... | |
| void | setTransitionMatrix (const float dT=1) |
| Set the transition matrix based on the input time interval. More... | |
| void | setMeasurementNoiseMatrix (const Eigen::VectorXd &meas, const MEASUREMENT_NOISE_OPTION option=MEASUREMENT_NOISE_OPTION::UNCHANGED) |
| Set measurement noise matrix. More... | |
| void | setProcessNoiseMatrix (const Eigen::VectorXd &meas, const bool isInit=false) |
| Set process noise matrix. More... | |
| void | predict (const float dT=1) |
| Predict the states for a time interval. More... | |
| void | initStates (const Eigen::VectorXd &meas) |
| Initialize the target state from a measurement. More... | |
| void | setTransitionMatrix (const float dT=1) |
| Set the transition matrix based on the input time interval. More... | |
| void | setMeasurementNoiseMatrix (const Eigen::VectorXd &meas, const MEASUREMENT_NOISE_OPTION option=MEASUREMENT_NOISE_OPTION::UNCHANGED) |
| Set measurement noise matrix. More... | |
| void | setProcessNoiseMatrix (const Eigen::VectorXd &meas, const bool isInit=false) |
| Set process noise matrix. More... | |
| void | predict (const float dT=1) |
| Predict the states for a time interval. More... | |
Protected Attributes | |
| SimpleEstimatorParams2 | m_params |
| Stores configuration parameters for the state-estimation module. More... | |
| const int | m_numTotalStates |
| Specifies the total number of estimated states. More... | |
| const int | m_numObservStates |
| Specifies the number of observed states. More... | |
| Eigen::VectorXd | m_X |
| Eigen::VectorXd | m_X_pred |
| Estimated and predicted states. More... | |
| Eigen::MatrixXd | m_A |
| Transition matrix. More... | |
| Eigen::MatrixXd | m_Q |
| Process noise covariance matrix. More... | |
| Eigen::MatrixXd | m_P |
| Eigen::MatrixXd | m_P_pred |
| Estimate and prediction error covariance. More... | |
| Eigen::MatrixXd | m_H |
| Measurement matrix. More... | |
| Eigen::MatrixXd | m_R |
| Measurement noise covariance matrix. More... | |
| Eigen::MatrixXd | m_I |
| Identity matrix. More... | |
| Eigen::MatrixXd | m_K |
| Kalman gain. More... | |
| uint32_t | m_age |
| Counts estimator updates. More... | |
| bool | m_useDynamicCov |
| Indicates whether measurements provide dynamic covariance. More... | |
| Eigen::IOFormat | m_CommaInitFmt |
| Eigen output format used for debug. More... | |
|
protected |
Options to set constant measurement noise.
Definition at line 180 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
|
protected |
Options to set constant measurement noise.
Definition at line 180 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
| SimpleEstimator2::SimpleEstimator2 | ( | const std::string & | configFilePath, |
| const int | numTotalStates = 6, |
||
| const int | numObservStates = 4, |
||
| const float | processNoiseScale = 1.0, |
||
| const float | measurementNoiseScale = 1.0 |
||
| ) |
Construct a Kalman-filter state estimator from configuration.
| [in] | configFilePath | The path to a config file. |
| [in] | numTotalStates | The # of total states to be estimated. |
| [in] | numObservStates | The # of observation (i.e., measurement) states. |
| [in] | processNoiseScale | Scale applied to the location, size, and velocity process-noise variances. |
| [in] | measurementNoiseScale | Scale applied to the detector and tracker measurement-noise variances. |
| SimpleEstimator2::~SimpleEstimator2 | ( | ) |
Destroy the simple state estimator.
| SimpleEstimator2::SimpleEstimator2 | ( | const std::string & | configFilePath, |
| const int | numTotalStates = 6, |
||
| const int | numObservStates = 4, |
||
| const float | processNoiseScale = 1.0, |
||
| const float | measurementNoiseScale = 1.0 |
||
| ) |
Construct a Kalman-filter state estimator from configuration.
| [in] | configFilePath | The path to a config file. |
| [in] | numTotalStates | The # of total states to be estimated. |
| [in] | numObservStates | The # of observation (i.e., measurement) states. |
| [in] | processNoiseScale | Scale applied to the location, size, and velocity process-noise variances. |
| [in] | measurementNoiseScale | Scale applied to the detector and tracker measurement-noise variances. |
| SimpleEstimator2::~SimpleEstimator2 | ( | ) |
Destroy the simple state estimator.
|
inlineoverridevirtual |
Return the number of estimator updates.
Implements IEstimator2.
Definition at line 154 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
References m_age.
|
inlineoverridevirtual |
Return the number of estimator updates.
Implements IEstimator2.
Definition at line 154 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
References m_age.
|
inlineoverridevirtual |
Return the measurement-noise covariance matrix.
Implements IEstimator2.
Definition at line 121 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
References m_R.
|
inlineoverridevirtual |
Return the measurement-noise covariance matrix.
Implements IEstimator2.
Definition at line 121 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
References m_R.
|
overridevirtual |
Predict measurements and covariance without modifying the current estimate.
| [in] | dT | The time step. |
Implements IEstimator2.
|
overridevirtual |
Predict measurements and covariance without modifying the current estimate.
| [in] | dT | The time step. |
Implements IEstimator2.
|
overridevirtual |
Predict states without modifying the current estimate.
| [in] | dT | The time step. |
Implements IEstimator2.
|
overridevirtual |
Predict states without modifying the current estimate.
| [in] | dT | The time step. |
Implements IEstimator2.
|
overridevirtual |
Predict states and covariance without modifying the current estimate.
| [in] | dT | The time step. |
Implements IEstimator2.
|
overridevirtual |
Predict states and covariance without modifying the current estimate.
| [in] | dT | The time step. |
Implements IEstimator2.
|
inlineoverridevirtual |
Return the configured state-estimator type.
Implements IEstimator2.
Definition at line 160 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
References m_params, and SimpleEstimatorParams2::m_stateEstimatorType.
|
inlineoverridevirtual |
Return the configured state-estimator type.
Implements IEstimator2.
Definition at line 160 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
References m_params, and SimpleEstimatorParams2::m_stateEstimatorType.
|
inlineoverridevirtual |
Return the current estimated states.
Implements IEstimator2.
Definition at line 112 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
References m_X.
|
inlineoverridevirtual |
Return the current estimated states.
Implements IEstimator2.
Definition at line 112 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
References m_X.
|
inlineoverridevirtual |
Return the current states and their covariance.
Implements IEstimator2.
Definition at line 124 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
|
inlineoverridevirtual |
Return the current states and their covariance.
Implements IEstimator2.
Definition at line 124 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
|
protected |
Initialize the target state from a measurement.
| [in] | meas | The initial measurement. |
|
protected |
Initialize the target state from a measurement.
| [in] | meas | The initial measurement. |
|
inlineoverridevirtual |
Overwrite the position and velocity components for a location estimator.
| [in] | position | The replacement position. |
| [in] | velocity | The replacement velocity. |
Implements IEstimator2.
Definition at line 143 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
References LOCATION_ESTIMATOR_PROJECTIVE, LOCATION_ESTIMATOR_SIMPLE, m_params, SimpleEstimatorParams2::m_stateEstimatorType, m_X, and m_X_pred.
|
inlineoverridevirtual |
Overwrite the position and velocity components for a location estimator.
| [in] | position | The replacement position. |
| [in] | velocity | The replacement velocity. |
Implements IEstimator2.
Definition at line 143 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
References LOCATION_ESTIMATOR_PROJECTIVE, LOCATION_ESTIMATOR_SIMPLE, m_params, SimpleEstimatorParams2::m_stateEstimatorType, m_X, and m_X_pred.
|
protected |
Predict the states for a time interval.
| [in] | dT | The time step. |
|
protected |
Predict the states for a time interval.
| [in] | dT | The time step. |
|
overridevirtual |
Reset the states and make the age to be zero.
Implements IEstimator2.
|
overridevirtual |
Reset the states and make the age to be zero.
Implements IEstimator2.
|
protected |
Set measurement noise matrix.
| [in] | meas | Input measurement used when noise is proportional to box size. |
| [in] | option | Measurement-noise selection. |
|
protected |
Set measurement noise matrix.
| [in] | meas | Input measurement used when noise is proportional to box size. |
| [in] | option | Measurement-noise selection. |
|
protected |
Set process noise matrix.
| [in] | meas | Input measurement used when noise is proportional to box size. |
| [in] | isInit | Whether the process-noise matrix is being initialized. |
|
protected |
Set process noise matrix.
| [in] | meas | Input measurement used when noise is proportional to box size. |
| [in] | isInit | Whether the process-noise matrix is being initialized. |
|
protected |
Set the transition matrix based on the input time interval.
| [in] | dT | The prediction time interval. |
|
protected |
Set the transition matrix based on the input time interval.
| [in] | dT | The prediction time interval. |
|
overridevirtual |
Update without any measurement, using the prediction only.
| [in] | dT | The time step. |
Implements IEstimator2.
|
overridevirtual |
Update without any measurement, using the prediction only.
| [in] | dT | The time step. |
Implements IEstimator2.
|
overridevirtual |
Given a set of measurements and their covariances, update the estimator and returns the estimated states.
| [in] | measurements | A set of (measurement, covariance, isFromDetector) tuples. Pass a negative identity covariance to select the default measurement noise. A positive covariance(0,0) uses the provided noise. |
| [in] | dT | The time step. |
Implements IEstimator2.
|
overridevirtual |
Given a set of measurements and their covariances, update the estimator and returns the estimated states.
| [in] | measurements | A set of (measurement, covariance, isFromDetector) tuples. Pass a negative identity covariance to select the default measurement noise. A positive covariance(0,0) uses the provided noise. |
| [in] | dT | The time step. |
Implements IEstimator2.
|
inlineoverridevirtual |
Return whether the estimator represents size using aspect ratio.
Implements IEstimator2.
Definition at line 157 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
References m_params, and SimpleEstimatorParams2::m_useAspectRatio.
|
inlineoverridevirtual |
Return whether the estimator represents size using aspect ratio.
Implements IEstimator2.
Definition at line 157 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
References m_params, and SimpleEstimatorParams2::m_useAspectRatio.
|
protected |
Transition matrix.
Definition at line 168 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
|
protected |
Counts estimator updates.
Definition at line 175 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
Referenced by getAge().
|
protected |
Eigen output format used for debug.
Definition at line 177 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
|
protected |
Measurement matrix.
Definition at line 171 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
|
protected |
Identity matrix.
Definition at line 173 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
|
protected |
Kalman gain.
Definition at line 174 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
|
protected |
Specifies the number of observed states.
Definition at line 166 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
|
protected |
Specifies the total number of estimated states.
Definition at line 165 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
|
protected |
Definition at line 170 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
Referenced by getStatesWithCov().
|
protected |
Estimate and prediction error covariance.
Definition at line 170 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
|
protected |
Stores configuration parameters for the state-estimation module.
Definition at line 164 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
Referenced by getStateEstimatorType(), overrideState(), and useAspectRatio().
|
protected |
Process noise covariance matrix.
Definition at line 169 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
|
protected |
Measurement noise covariance matrix.
Definition at line 172 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
Referenced by getMeasurementNoiseCovariance().
|
protected |
Indicates whether measurements provide dynamic covariance.
Definition at line 176 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
|
protected |
Definition at line 167 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
Referenced by getStates(), getStatesWithCov(), and overrideState().
|
protected |
Estimated and predicted states.
Definition at line 167 of file sources/libs/nvmultiobjecttracker/include/modules/Estimatorv2/SimpleEstimator2.hpp.
Referenced by overrideState().