🧼 Splits motions state to own files

This commit is contained in:
Rune Harlyk
2024-11-12 12:09:06 +01:00
committed by Rune Harlyk
parent 8283e24407
commit dcfce13f4b
10 changed files with 365 additions and 337 deletions
@@ -0,0 +1,18 @@
#pragma once
#include <gait/state.h>
class RestState : public GaitState {
protected:
const char *name() const override { return "Rest"; }
void step(body_state_t &body_state, ControllerCommand command, float dt = 0.02f) override {
body_state.omega = 0;
body_state.phi = 0;
body_state.psi = 0;
body_state.xm = 0;
body_state.ym = getDefaultHeight() / 2;
body_state.zm = 0;
body_state.updateFeet(default_feet_pos);
}
};