You are browsing as a guest. Sign up (or log in) to start making projects!

8h 22m 17s logged

I have added more to the inverse kinematics of my robot dog. Targeting the bottom left leg, I:

  • Created the functions Calc_femur, Calc_tibia, and Calc_hip to individually calculate the designated angles for each part based on the variables x, y, and z.
    • The code had already implemented the math from my Desmos demonstrations in the previous devlogs, but this allowed for a more organized system.
  • Created a void move_to_position function that collected outputs from Calc_femur, Calc_tibia, and Calc_hip, using them to run the servos in turn.
  • Used an array system to realize the pins of the servos (on the PCA9685) and their respective max and min PWM (based on calibration)

What’s great is that the femur is working as intended! In comparing its position to the position on the Desmos graph, the calculations are accurate.

On the other hand, I’m still struggling to properly calculate the angle for the servo moving the tibia. The issue is that I have to take into account the angle offset (the angle the servo is turning is not the same as the resulting angle between the femur and tibia) and the fact that the rotating femur influences the angle of the tibia.

Another thing I have to fix is the discrepancy between the math for the hip servo and the output. Yet another issue to handle (TT-TT)

But it’s a learning process that I’m happy to take part in :)

0
7

Comments 0

No comments yet. Be the first!