16 state_model_(std::move(pf_prediction.state_model_)),
17 exogenous_model_(std::move(pf_prediction.exogenous_model_)) { };
22 state_model_ = std::move(pf_prediction.state_model_);
24 exogenous_model_ = std::move(pf_prediction.exogenous_model_);
38 state_model_ = std::move(state_model);
44 return *exogenous_model_;
50 exogenous_model_ = std::move(exogenous_model);
55 Ref<MatrixXf> pred_states, Ref<VectorXf> pred_weights)
57 VectorXf sorted_cor = prev_weights;
58 std::sort(sorted_cor.data(), sorted_cor.data() + sorted_cor.size());
59 float threshold = sorted_cor.tail(6)(0);
61 exogenous_model_->setProperty(
"ICFW_DELTA");
63 for (
int j = 0; j < prev_weights.rows(); ++j)
65 VectorXf tmp_states = VectorXf::Zero(prev_states.rows());
67 if (!getSkipExogenous())
68 exogenous_model_->propagate(prev_states.col(j), tmp_states);
70 tmp_states = prev_states.col(j);
72 if (!getSkipState() && prev_weights(j) <= threshold)
73 state_model_->motion(tmp_states, pred_states.col(j));
75 pred_states.col(j) = tmp_states;
78 pred_weights = prev_weights;
StateModel & getStateModel() override
void predictStep(const Eigen::Ref< const Eigen::MatrixXf > &prev_states, const Eigen::Ref< const Eigen::VectorXf > &prev_weights, Eigen::Ref< Eigen::MatrixXf > pred_states, Eigen::Ref< Eigen::VectorXf > pred_weights) override
DrawFwdKinPoses() noexcept
~DrawFwdKinPoses() noexcept
DrawFwdKinPoses & operator=(DrawFwdKinPoses &&pf_prediction) noexcept
ExogenousModel & getExogenousModel() override
void setExogenousModel(std::unique_ptr< ExogenousModel > exogenous_model) override
void setStateModel(std::unique_ptr< StateModel > state_model) override