I am currently working on a legged hexapod which moves around using a tripod gait. I have two sets of code to control the tripod.
Set 1: Time based control
In this code set, I set the tripod motor set to move at their rated rpm for a required amount of time before shifting to the other tripod motor set.
PID control would be based on counting the number of transitions using an optical speed encoder, Calculating the error based on difference between actual speed and required speed and then adjusting the error with fixed Kd and Ki values.
Set 2: Transitions based control
In this code set I count to the number of transitions required to complete one rotation of the leg(tripod motor set) before starting the other leg(tripod motor set).
PID control would be time based. Calculation of error would be the difference in time taken for individual motors of the motor set.
Query: The set 2 shows promising results even without PID control, but the first set does not.Why so? The motors are basically set to move 1 rotation before the other set moves.
Would the speed differences between the motors cause it to destabilize?
How often do I update the PID loop?
My robot seems to drag a little bit. How do I solve this?