Skip to content

Commit

Permalink
[mc_control] Avoid more issues due to invalidated configuration objects
Browse files Browse the repository at this point in the history
Similar to a96d61a
  • Loading branch information
gergondet committed Feb 13, 2023
1 parent 42e42d0 commit 1651fa9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mc_control/MCController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ MCController::MCController(const std::vector<std::shared_ptr<mc_rbdyn::RobotModu
auto config_robots_keys = config_robots.keys();
for(const auto & rname : config_robots_keys)
{
auto rconfig = config_robots(rname);
auto rconfig = config("robots")(rname);
if(rname == robot().name())
{
if(config.has("init_pos") && rconfig.has("init_pos"))
Expand Down Expand Up @@ -290,6 +290,7 @@ MCController::MCController(const std::vector<std::shared_ptr<mc_rbdyn::RobotModu
}
auto & robot = loadRobot(rm, rname);
load_robot_config(robot);
rconfig = config("robots")(rname);
init_robot(rname, rconfig);
}
}
Expand Down

0 comments on commit 1651fa9

Please sign in to comment.