Legs going to random positions
klaasnicolaas opened this issue · 0 comments
Hello my name is Klaas Schoute and for my minor project in robotics we are creating the kangal quadruped model. We are already at an advanced stage with building, but we are running into a problem that we cannot immediately explain.
Setup
We put the robot on a stand (so it's free in movements) and the ESP32 is directly connected to our laptop, so that we can give serial commands via platformio.
The Problem
When we flash the firmware on the ESP32 and press the space bar directly, the legs are moving to random positions causing it to get stuck. The big question is why this happened? As far as our knowledge goes, this seems to be mainly a software problem. The PCA9658 could send random position to the servo when there is an energy peak, but I don't think this is an issue in this case.
Workaround
How we've been able to work around this problem so far:
- Flash the ESP32
- Check if the walking mode is off
- Move the robot to a forward position of 1521
- Press the space bar
When we run it in this order the robot will neatly raise or lower all its legs (switch between normal or transport modes).
Logs
--- More details at https://bit.ly/pio-monitor-filters
--- Miniterm on COM3 115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
-----------------------
�setup start !!! : heap:245884, psram:0
MPU6050 connection failed
[STEP] x: 30.000, y: 30.000, z: 20.000
setStepsPerSec: 7.00
tipOffsetX:-20.00
user data LOADED !!!
[target] x: 0.000, y: 0.000, z:-45.000
[dir_inc] x: 0.000, y: 0.000, z: -0.045
setup finished !!!
RC: 1500 1500 1500 1500
RC: 1500 1500 1500 1521
Walking: on (1)
Walking: off (0)
[target] x: 0.000, y: 0.000, z: 0.000
[dir_inc] x: 0.000, y: 0.000, z: 0.045
Stand: normal (1)