User Manual
Table Of Contents
- 1. Premise
- 2. Raspberry Pi System Installation and Developmen
- 3 Log In to The Raspberry Pi and Install The App
- 4 Raspberry Pi Structure Assembly and Precautions
- 5 Controlling A Robot via WEB App
- 6 Common Problems and Solutions(Q&A)
- 7 Set The Program to Start Automatically
- 8 Remote Operation of Raspberry Pi Via MobaXterm
- 9 How to Control WS2812 RGB LED
- 10 How to Control The Servo
- 11 Calling the API to Control the Robot
- 12 Automatic Stabilization Function
- 13 Gait Generation Method of A Hexapod Robot
- 14 Make A Police Light or Breathing Light
- 15 Real-Time Video Transmission
- 16 Why OpenCV Uses Multi-threading to Process Vide
- 17 OpenCV Learn to Use OpenCV
- 18 Using OpenCV to Realize Color Recognition and T
- 19 Machine Line Tracking Based on OpenCV
- 20 Create A WiFi Hotspot on The Raspberry Pi
- 21 Install GUI Dependent Item under Window
- 22 How to Use GUI
- 23 Enable UART
- 24 Control Your Adeept_RaspClaws with An Android D
- Conclusion
79
13 Gait Generation Method of A Hexapod Robot
●For the hexapod robot, the gait generation method is almost the most complicated part of the program,
because it needs to coordinate dozens of servos to move at the same time, and keeps every moment when
walking forward and backward there must be at least three legs on the ground, which means that only three
legs can be in the swing pair at least at any moment, and at least three legs should be in the support pair.
● In order to make it more intuitive, we represent the position of each leg of the robot as 1, 2, 3, 4
respectively and divide the robot legs into two groups.
T
aking forward heading of the robot as forward direction,
we name `I` including the left front leg, the left back leg, and the right middle leg; `II` including the right front leg,
the right back leg, and the left middle leg.
Code/Global Gait
1
2
3
4
I
1
2
3
4
II
3
4
1
2
● For example, when the first group of legs in the global gait is in the `1` position, the second group of legs
is in the `3` position.
● When the global gait changes to a cycle of 1, 2, 3, 4, 1, 2, ..., the robot moves forward in a diagonal gait.
● When the global gait changes to a cycle of 4, 3, 2, 1, 4, 3, ..., the robot walks backward in a diagonal
gait.
● When the three legs on the right side of the robot walk forward and the two legs on the left side walk
backward, the robot turns to the left.
●When the left three legs of the robot walk forward and the left two legs walk backward, the robot turns to
the right.
●The codes related to the robot gait are as shown below:
#Fast gait
def move(step_input, speed, command):
step_I = step_input
step_II = step_input + 2
if step_II > 4:
step_II = step_II - 4
if speed == 0: