Creating a program in Linux to control the mobile platform
Now that you can control your servos using basic commands, let's control them using a program.
Prepare for lift off
So, you know that you can talk to your servo motor controller and set your servos. In this section, you'll create a Python SW program that will let you talk to your servos a bit more intuitively. You'll issue commands that tell a servo to go to a specific angle, and it will go to that angle. You can then add a set of such commands to allow your legged mobile robot to lean left, lean right, or even take a step forward.
Engage thrusters
Let's start with a simple program that will make your legged mobile robot's servos go to 90 degrees. This should be somewhere close to the middle of the 180 degrees you can set. However, the center, maximum, and minimum values can vary from servo to servo, so you may need to calibrate these values. To keep things simple, we will not cover that here. The following is the code:
The explanation...