Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix stand controllers tracking wrong pose due to float32 time quantization#14

Merged
shafeef901 merged 1 commit into
mainfrom
fix/stand-controller-time-quantization
May 29, 2026
Merged

Fix stand controllers tracking wrong pose due to float32 time quantization#14
shafeef901 merged 1 commit into
mainfrom
fix/stand-controller-time-quantization

Conversation

@shafeef901

Copy link
Copy Markdown
Collaborator

The Go2/G1 stand controllers derived their interpolation phase from a "time" observation that stored wall-clock time.time() in a float32 tensor. At the current epoch (~1.78e9) float32 resolves only ~128 s steps, so the elapsed time (obs["time"] - start_time) collapsed to 0.0 for up to ~128 s. This pinned phase = tanh(0) = 0, making STAND_UP hold the stand-down pose (and STAND_DOWN hold the stand-up pose) instead of ramping between them.

Compute elapsed time directly from time.time() (float64) in Go2StandUpController, Go2StandDownController and G1LowLevelController, matching the approach already used by the RL and gain-tuning controllers.

…ation

The Go2/G1 stand controllers derived their interpolation phase from a
"time" observation that stored wall-clock time.time() in a float32 tensor.
At the current epoch (~1.78e9) float32 resolves only ~128 s steps, so the
elapsed time (obs["time"] - start_time) collapsed to 0.0 for up to ~128 s.
This pinned phase = tanh(0) = 0, making STAND_UP hold the stand-down pose
(and STAND_DOWN hold the stand-up pose) instead of ramping between them.

Compute elapsed time directly from time.time() (float64) in
Go2StandUpController, Go2StandDownController and G1LowLevelController,
matching the approach already used by the RL and gain-tuning controllers.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings May 29, 2026 17:44
@shafeef901 shafeef901 self-assigned this May 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes stand-controller interpolation timing by computing elapsed time from time.time() directly instead of subtracting start_time from a float32 time observation, avoiding wall-clock quantization that froze pose transitions.

Changes:

  • Updates Go2 stand-up and stand-down phase calculation to use float64 wall-clock elapsed time.
  • Updates G1 low-level controller stage timing to use direct elapsed wall-clock time.
  • Removes now-unused obs_manager.compute(state) calls from the affected timing paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/controllers/stand_controller.py
Comment thread src/controllers/stand_controller.py
@shafeef901 shafeef901 merged commit eed0697 into main May 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants