Once you have determined good gains for the PID controller, you can start tuning the leg for walking. You will still need the leg to be on the benchtop so you can initiate swing and see how well it follows the trajectory to determine if any more changes need to be made.

It is important to already have picked out good gains before trying to have it follow the swing trajectory to prevent undesirable behavior. We recommend setting 'l' or the swing period long. 5 seconds is a good spot to start. Keep bringing it down until you are at least around  second. When you go into the walking controller you should be in stance. When you squeeze and release the GCS, as long as you have you linear potentiometers calibrated which the video explains how to do, you should send the leg into swing. Try squeezing and releasing with the e-stop clicked to ensure that it goes into swing.

When you are ready, you can squeeze and release the GCS, but make sure to move your hand away quickly to prevent any injury. From here you can keep adjusting your gains to ensure it can follow the trajectory well.

Once you put the leg on, you might need to further adjust gains if you don't have enough toe clearance. Furthermore, you can keep bringing down the swing period so it will match your walking speed. We use 0.8 seconds, but it could be shorter as well.

 

Tuning and Demonstration

Code Walkthrough