Watch: Single Leg Prototype - Test 3 (Walk cycle, ground contact interaction)
Over the summer I worked on a simple walk cycle, ensuring the smoothness and precision of the movements. I installed an accelerometer that allows me to simulate a change in ground inclination: the algorithm changes the leg walking cycle, adapting it to the simulated terrain slope. The limit switch discussed in the previous post works simultaneously, raising the leg when an obstacle is encountered. This behaviour would not make sense in a real-world environment, but it is a good starting point for future more complex leg-ground contact interactions.
Watch: Single Leg Prototype - Test 2 (Smooth control, ground contact reaction)
As discussed in the previous post, smoothness is something I want to work on: it helps reduce vibrations that a clunky mechanical movement would otherwise cause. In addition, it is more visually appealing.
I used the pigpio library, and I controlled the motors smoothly using a function that I called servo_smooth(motor, angle, speed)
. The distance between the current servo angle and the target angle is subdivided into small steps that act as a time delay: by changing this value, it is possible to control the movement speed. Additionally, using the function servo_sync(motor1, angle1, speed1, motor2, angle2, speed2)
in multithreading, two threads run the servos (one each), allowing me to set a certain angle and the speed I want the motor to run, moving synchronously and smoothly. Finally, I implemented a simple ground contact check by snap-fitting a limit switch in the lower plastic linkage. The program I was running in the video lifts the leg as much as possible, reacting when a force is applied to the foot. This is just an "ON/OFF" configuration, which is quite not the best solution for sensing the ground correctly.