Skip to content

Commit

Permalink
[Replay] Only remove robots published by the controller
Browse files Browse the repository at this point in the history
  • Loading branch information
gergondet committed Oct 31, 2023
1 parent 291678b commit 3763fef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/Replay/src/Replay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ void Replay::reset(mc_control::MCGlobalController & gc)
robots_ = mc_rbdyn::Robots::make();
// Note: we copy the output robots here not the control robots
gc.robots().copy(*robots_);
gc.controller().gui()->removeCategory({"Robots"});
for(const auto & r : *robots_)
{
gc.controller().gui()->removeElement({"Robots"}, r.name());
gc.controller().gui()->addElement({"Robots"},
mc_rtc::gui::Robot(r.name(), [&r]() -> const mc_rbdyn::Robot & { return r; }));
}
Expand Down

0 comments on commit 3763fef

Please sign in to comment.