From 11e91dec889273c90ad9e70150d713d0e6b6c138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Jirou=C5=A1ek?= Date: Tue, 30 Jul 2024 10:59:24 +0200 Subject: [PATCH] Fix bug: rotor count not updating and causing seg fault --- .../mrs_multirotor_simulator/uav_system/multirotor_model.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/mrs_multirotor_simulator/uav_system/multirotor_model.hpp b/include/mrs_multirotor_simulator/uav_system/multirotor_model.hpp index 70a3c7f..a1b5337 100644 --- a/include/mrs_multirotor_simulator/uav_system/multirotor_model.hpp +++ b/include/mrs_multirotor_simulator/uav_system/multirotor_model.hpp @@ -373,6 +373,8 @@ void MultirotorModel::operator()(const MultirotorModel::InternalState& x, Multir void MultirotorModel::setParams(const MultirotorModel::ModelParams& params) { params_ = params; + + initializeState(); } //}