I need help with figuring out the following things:

I'm developing a hexapod R-Hex type model with a tripod gait. However, the angles obtained during the robot's walking in real life are not perfectly aligned. Because of this the robot often collapses and falls even on perfectly straight terrain.

My configuration is:

  • 60 rpm dc motors for each leg
  • H-bridge motor drivers for each dc motor
  • Atmega 8

Should I change the gait type?

Or is Tripod sufficiently stable?

Are DC motors providing fine enough control or do I need servos?

Do I need a DC motor with an Encoder? What will be its benefits?

What could be done to improve performance of the robot?

Added: Would a Stepper motor work as well, instead of a servo?

  • $\begingroup$ Can you add a picture of the robot? $\endgroup$ Commented Mar 13, 2013 at 10:44
  • $\begingroup$ It is useful to make the distinction between servomotors and hobby (aka RC) servos. If you already have DC motors and motor drivers, adding an encoder could be an easy way to give your system closed loop control and turn your motors into servomotors. Personally, I can't imagine trying to do complex movement with a robot without closed loop control. $\endgroup$
    – Mark Booth
    Commented Mar 13, 2013 at 11:14
  • $\begingroup$ Are you saying that the joint angles among the 3 standing legs are not coming out equal, even though you are commanding them to be equal? $\endgroup$
    – Ian
    Commented Mar 14, 2013 at 19:20
  • $\begingroup$ Yes. Precisely that Ian. In my adams simulation it comes out to be exactly equal but there seem to be different variations in my experimental runs on the physical prototype. These variations(like an extra 90 degrees rotation on one of the legs) often cause the prototype to collapse. $\endgroup$
    – Naresh
    Commented Mar 15, 2013 at 4:39

1 Answer 1


Tripod gait is a stable gait. Moreover, it is a statically stable gait, meaning that if you lock the joints with 3 legs down and turn the power off, the robot will not topple. This implies that you don't need to dynamically balance the robot while walking.

The reason when a legged robot falls down is that its center of gravity does not fall on its support polygon (in tripod gait case, it is a triangle with each corner on one leg that's touching the ground). So what you should do is to measure the center of gravity and guarantee that it never leaves the support polygon of your robot while walking via adjusting your leg motion. Of course, this is all for a statically stable gait. Dynamically stable gaits allow the center of gravity to leave the support polygon in a controlled manner. But as I said, the tripod gait is statically stable.

I'm assuming that you are using naked DC motors without encoders or gear trains. There are two issues about this:

  • First, make sure that you are getting enough total torque at each leg triplet that lift the robot. It may be the case that the DC motors cannot lift the robot on their own without a gear train.
  • Second, errors tend to grow without bound when performing such a task, angular position errors being one example. This is simply due to noise and imperfect modeling of the motor. So in a sense, DC motors are not actually "controlled", you just apply an input while not knowing what the output is. You must apply closed loop control, which is done via getting feedback from an encoder. Then, you can sense what the angular position on your motor is, determine your error, and apply an input to correct that error.

Both of these problems are addressed in a servomotor, which is basically a DC motor, a gear train to increase torque and reduce angular velocity, and an encoder. I very much suggest using servos for your leg joints.

  • $\begingroup$ Thanks for the detailed help- I've been considering to buy servos for closed loop control and have placed an order after understanding its additional utility ! In addition, while initializing the R-Hex prototype I'm facing a 'annoying' problem where all but one of the 'legs' initialize to the correct angle. This happens sometimes only and not always. What could possibly be the reason for that? $\endgroup$
    – Naresh
    Commented Mar 15, 2013 at 4:59
  • $\begingroup$ Unfortunately, I cannot say much unless you give more details about your problem. It could be anything from a faulty motor to a software bug. I would suggest asking this in a separate question with relevant details. $\endgroup$ Commented Mar 15, 2013 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.