🐹 Fixes crawl gait body shift order

This commit is contained in:
Rune Harlyk
2024-10-27 11:43:48 +01:00
parent 7849f77712
commit 7dd5797481
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -237,9 +237,9 @@ export class EightPhaseWalkState extends PhaseGaitState {
];
protected shifts = [
[-0.05, 0, -0.2],
[0.3, 0, -0.2],
[0.3, 0, 0.2],
[-0.05, 0, 0.2],
[0.3, 0, 0.2]
[0.3, 0, -0.2]
];
protected swing_stand_ratio = 1 / (this.num_phases - 1);
+1 -1
View File
@@ -188,7 +188,7 @@ class EightPhaseWalkState : public PhaseGaitState {
EightPhaseWalkState() {
uint8_t contact[4][8] = {
{1, 0, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 0, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 0, 1, 1, 1, 1}};
float shift_values[4][3] = {{-0.05f, 0, -0.2f}, {0.25f, 0, -0.2f}, {-0.05f, 0, 0.2f}, {0.25f, 0, 0.2f}};
float shift_values[4][3] = {{-0.05f, 0, -0.2f}, {0.25f, 0, 0.2f}, {-0.05f, 0, 0.2f}, {0.25f, 0, -0.2f}};
for (uint8_t i = 0; i < 4; ++i) {
for (uint8_t j = 0; j < 8; ++j) {
contact_phases[i][j] = contact[i][j];