Skip to content

Commit

Permalink
Check changes in refComZ in a robust way.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmurooka committed Nov 3, 2023
1 parent c80b062 commit 88da866
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/centroidal/CentroidalManagerPreviewControlZmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ void CentroidalManagerPreviewControlZmp::reset()
void CentroidalManagerPreviewControlZmp::runMpc()
{
double refComZ = calcRefComZ(ctl().t());
if(refComZ != lastRefComZ_)
constexpr double threRefComZ = 1e-3; // [m]
if(std::abs(refComZ - lastRefComZ_) > threRefComZ)
{
if(config_.reinitForRefComZ)
{
Expand Down

0 comments on commit 88da866

Please sign in to comment.