🕊️ Renames gait folder

This commit is contained in:
Rune Harlyk
2024-11-12 13:29:44 +01:00
committed by Rune Harlyk
parent 622e15278f
commit 7f03790cf7
8 changed files with 0 additions and 0 deletions
@@ -0,0 +1,28 @@
#pragma once
#include <gait/phase_state_base.h>
class FourPhaseWalkState : public PhaseGaitState {
protected:
const char *name() const override { return "Four phase walk"; }
int num_phases() const override { return 4; }
float phase_speed_factor() const override { return 6; }
float swing_stand_ratio() const override { return 1.0f / (num_phases() - 1); }
public:
FourPhaseWalkState() {
uint8_t contact[4][4] = {{1, 0, 1, 1}, {1, 1, 1, 0}, {1, 1, 1, 0}, {1, 0, 1, 1}};
for (int i = 0; i < 4; ++i) {
for (int j = 0; j < 4; ++j) {
contact_phases[i][j] = contact[i][j];
}
}
}
void step(body_state_t &body_state, ControllerCommand command, float dt = 0.02f) override {
return PhaseGaitState::step(body_state, command, dt);
}
};