Skip to content

Commit

Permalink
The reset method first clears the members of unordered_map.
Browse files Browse the repository at this point in the history
This is necessary to ensure that the latest values are stored to the members of unordered_map correctly when switching back to the same controller.
  • Loading branch information
mmurooka committed May 8, 2024
1 parent 8d4ab6b commit 832157f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/FootManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ void FootManager::reset()
footstepQueue_.clear();
prevFootstep_.reset();

targetFootPoses_.clear();
targetFootVels_.clear();
targetFootAccels_.clear();
footTaskGains_.clear();
trajStartFootPoseFuncs_.clear();
for(const auto & foot : Feet::Both)
{
targetFootPoses_.emplace(foot, ctl().robot().surfacePose(surfaceName(foot)));
Expand Down

0 comments on commit 832157f

Please sign in to comment.