Tuesday, July 10, 2018

Mojo - A Compliant Quadruped Robot (#8) - Raise Your Front Right Leg!

Mojo is ready to start moving!

I finished printing the newly designed SEA actuators.  Replaced the old ones with the new and wired up the Cam Cable to the front right leg and gave it a whirl.  It can twitch now!!




This movement is combination of raising the leg (femur) servo by about 28 degrees and pulling the knee in by about 115 degrees.  

In the video you can see the cam, the disk attached to a servo pull a cable (thread) back. This motion pulls the foot (tarsal) up by bending at the knee.  You can see the SEA spring compress.  Meanwhile, the leg is raising slightly, the combined motion lifts the foot off of the ground surface.  The other legs are in "Stand" position.  All of the servos are energized, so the legs have 'stiffness' to help it stand up.

of course lots of learnings:

  • leg can collide with the cam
  • the cam cable regularly comes off the cam
  • thread for the cam cable will not be durable enough
  • lots of Arduino code to manage


its a small step...  but just the beginning!


Mojo - 9 July 2018
Hey all my coding buddies!!
here is the code for lifting the leg.  It needs refactoring.  What is a better way for me to do this?  please make a suggestion and get back to me!  You know where to find me!

[code]
void leg_lift(int leg, int knee) {
  Serial.println("Leg Lift");
  int stepCount = 28;
  int kneeStartAngle = 25;
  int kneeEndAngle = 140;
  int legStartAngle = 158;
  int legEndAngle = 130;
  int kneeStep = int((kneeEndAngle - kneeStartAngle) / stepCount);
  int legStep = int((legEndAngle - legStartAngle) / stepCount);
  int kneeAngle = kneeStartAngle;
  int legAngle = legStartAngle;
  for (int x = 0; x <= stepCount; x++) {
    pwm.setPWM(knee, 0, anglePulse(kneeAngle));
    pwm.setPWM(leg, 0, anglePulse(legAngle));
    kneeAngle = kneeAngle + kneeStep;
    legAngle = legAngle + legStep;
    Serial.println(legAngle);
    delay(25);
  }
}
[/code]

No comments:

Post a Comment