Skip to content

Commit

Permalink
fixed input initialization after loading parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
klaxalk committed Jul 30, 2024
1 parent eede2de commit fc59eea
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,10 @@ class MultirotorModel {
ModelParams getParams(void);
void setParams(const ModelParams& params);

private:
void initializeState(void);

private:

void updateInternalState(void);

MultirotorModel::State state_;
Expand Down
5 changes: 5 additions & 0 deletions include/mrs_multirotor_simulator/uav_system/uav_system.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,17 @@ UavSystem::UavSystem(const MultirotorModel::ModelParams& model_params) {

multirotor_model_.setParams(model_params);

multirotor_model_.initializeState();

initializeControllers();
}

UavSystem::UavSystem(const MultirotorModel::ModelParams& model_params, const Eigen::Vector3d spawn_pos, const double spawn_heading) {

multirotor_model_.setParams(model_params);

multirotor_model_.initializeState();

multirotor_model_.setStatePos(spawn_pos, spawn_heading);

initializeControllers();
Expand Down
1 change: 0 additions & 1 deletion tmux/standalone/session.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ socket_name: mrs
attach: false
tmux_options: -f /etc/ctu-mrs/tmux.conf
# you can modify these
pre_window: export UAV_NAME=uav1; export RUN_TYPE=simulation; export UAV_TYPE=x500
startup_window: goto
windows:
- roscore:
Expand Down
1 change: 0 additions & 1 deletion tmux/standalone_400_uavs/session.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ socket_name: mrs
attach: false
tmux_options: -f /etc/ctu-mrs/tmux.conf
# you can modify these
pre_window: export UAV_NAME=uav1; export RUN_TYPE=simulation; export UAV_TYPE=x500; export BOND=false
startup_window: goto
windows:
- roscore:
Expand Down

0 comments on commit fc59eea

Please sign in to comment.