MP: FIX replicant walk-entry floor -- gate on standSpeed not walkStrideLength (task #50)
The prior floor gated on walkStrideLength*0.5, but walkStrideLength is a stride METRIC (~22.0), not the walk velocity (~6.1) -- so the condition sd > 11 was never true for a walking peer and the floor never fired. The replicant's derived speedDemand (== actual velocity 6.13) sits BELOW standSpeed (6.83), so the leg SM's stand->walk gate (standSpeed < demand) never tripped and the peer slid forward in the Standing pose. Gate on standSpeed instead: floor the demand to standSpeed*1.05 when the peer is clearly walking (demand in (standSpeed*0.5, standSpeed*1.05)). Verified live: uvel=6.13 -> spd=7.169 floored, legState enters 5 (walk) on frame 1 with no Standing-pose slide. standSpeed=6.8277 confirmed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
936c34c997
commit
2aba89f962
@@ -1968,8 +1968,10 @@ void
|
||||
// so the CADENCE still matches the actual travel (no foot-slip). Reverse
|
||||
// needs no floor -- its entry gate is `commandedSpeed < ZeroSpeed`, which
|
||||
// any negative demand already trips.
|
||||
if (sd > walkStrideLength * 0.5f && sd < standSpeed * 1.1f)
|
||||
sd = standSpeed * 1.1f;
|
||||
// (CORRECTED threshold: walkStrideLength is a STRIDE metric ~22, NOT
|
||||
// the walk velocity ~6.1 -- gate on standSpeed, the actual gate value.)
|
||||
if (sd > standSpeed * 0.5f && sd < standSpeed * 1.05f)
|
||||
sd = standSpeed * 1.05f;
|
||||
replMppr->speedDemand = sd;
|
||||
// REPLICANT TURN-STEP (user-reported: a turning peer
|
||||
// statue-rotates while the local mech steps): the leg SM's
|
||||
@@ -2060,6 +2062,8 @@ void
|
||||
<< " spd=" << replMppr->speedDemand
|
||||
<< " legState=" << (int)legStateAlarm.GetLevel()
|
||||
<< " legFrm=" << legAnimation.currentFrame
|
||||
<< " standSp=" << standSpeed
|
||||
<< " walkStr=" << walkStrideLength
|
||||
<< " nu-lp=" << (nextUpdate.ticks - lastPerformance.ticks)
|
||||
<< " dt=" << dt << "\n" << std::flush;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user