BOB808 - Peter Šeban, Jerguš Greššák
Task
The first goal was to build the robot BOB. After building the robot, our task was to learn (program) it walking. We were also supposed to set this walking choreography as an initial movement sequence when BOB is switched on.
Solution
Calibration
Initially, we had to calibrate the servo motors so they were in a central position. When all of them were in a central position, we proceeded to the setting of a direction of movement. This is necessary to know when performing the actual movement of the particular servo motor. It tells us whether moving from 90 degrees (a central position) to the direction of higher angles is a movement forward or backward. To do this, we used already preset Aurduino code. Thanks to the calibration, we can afterwards program the movement by simply changing the size of angles at particular degrees of freedom.
Algorithm
In order to make the robot walk, similarly to human, we would need to make use of concurrent movements. Unfortunately, our Arduino code for Otto doesn't support concurrent movements. Therefore, we have to simulate concurrent movements by smaller steps. The initial position for every motor is 90 degrees.
For walking forward, we use four motors. Two motors for moving left and right leg and two motors for moving left and right foot. The movement is conducted as follows: the left leg is moving forward and its foot is stretching. At the same time the right leg is moving backward and its foot is flexing. After reaching the maximum position, legs and foots return to the initial position. Then it is time to repeat the sequence starting with the other leg. Code for the whole procedure is below.
@1 1 100 1 2 100 1 3 100 1 4 100 1 1 110 1 2 110 1 3 110 1 4 110 1 1 120 1 2 120 1 3 120 1 4 120 1 1 110 1 2 110 1 3 110 1 4 110 1 1 100 1 2 100 1 3 100 1 4 100 1 1 90 1 2 90 1 3 90 1 4 90 1 1 80 1 2 80 1 3 80 1 4 80 1 1 70 1 2 70 1 3 70 1 4 70 1 1 60 1 2 60 1 3 60 1 4 60 1 1 70 1 2 70 1 3 70 1 4 70 1 1 80 1 2 80 1 3 80 1 4 80 1 1 90 1 2 90 1 3 90 1 4 90 0 0 0
Photos
Video