12 using namespace Eigen;
21 const LinearMatrixComponent& linear_matrix_component,
22 const Eigen::Ref<const Eigen::MatrixXd>& noise_covariance_matrix,
23 const
unsigned int seed
25 LinearModel(linear_matrix_component, noise_covariance_matrix, seed),
26 simulated_state_model_(std::move(simulated_state_model))
35 input_description_ = simulated_state_model_->getStateModel().getStateDescription();
38 MatrixXd noise_covariance;
39 bool valid_noise_covariance;
40 std::tie(valid_noise_covariance, noise_covariance) = getNoiseCovarianceMatrix();
41 if (!valid_noise_covariance)
42 throw(std::runtime_error(
"ERROR:SIMULATEDLINEARSENSOR::CTOR. A valid noise covariance matrix from getNoiseCovarianceMatrix() is required."));
43 input_description_.add_noise_components(noise_covariance.rows());
50 std::size_t meas_linear_size = 0;
51 std::size_t meas_circular_size = 0;
53 for (std::size_t i = 0; i < H_.rows(); ++i)
55 Eigen::MatrixXf::Index state_index;
56 H_.row(i).array().abs().maxCoeff(&state_index);
58 if (state_index < input_description_.linear_size())
63 measurement_description_ =
VectorDescription(meas_linear_size, meas_circular_size);
69 std::unique_ptr<SimulatedStateModel> simulated_state_model,
70 const LinearMatrixComponent& linear_matrix_component,
71 const Eigen::Ref<const Eigen::MatrixXd>& noise_covariance_matrix
73 SimulatedLinearSensor(std::move(simulated_state_model), linear_matrix_component, noise_covariance_matrix, 1)