2

I am building a quadruped robot, and I need to keep all four legs moving continuously and out of phase with respect to each other to produce a smooth gait and to prevent falling over. I wish to achieve this with 4 sets of 2 motors. Each set will move in the same way but not in sync. I have an Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface - PCA9685 for this application. I have considered several implementations; delay () would be a poor choice because of the obvious delay between the current and next step in the gait cycle. I am also considering using ISR that will trigger when a certain time period passes, an estimated time to reach the desired position for example, but the interrupt method would not be much better than delay (). Another idea I have is to create a class that will receive the next position to move to for each leg and will continuously send the signal to the PWM driver. However, timing this would require some trial and error. Is there a conmon well-known method to send control signals with phase shifts?

1
  • 1
    One way could be to use PID controllers and a state machine.
    – Mazaryk
    Mar 25 '17 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.