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
78
X = accelerometer_data['x']
X = kalman_filter_X.kalman(X)
Y = accelerometer_data['y']
Y = kalman_filter_Y.kalman(Y)
'''''
Carry out Kalman filtering on the data
'''
X_fix_output += -X_pid.GenOut(X - target_X)
X_fix_output = ctrl_range(X_fix_output, steady_range_Max, -steady_range_Max)
Y_fix_output += -Y_pid.GenOut(Y - target_Y)
Y_fix_output = ctrl_range(Y_fix_output, steady_range_Max, -steady_range_Max)
#LEFT_I
left_I_input = ctrl_range((X_fix_output + Y_fix_output), steady_range_Max, steady_range_Min)
left_I(0, 35, left_I_input)
#LEFT_II
left_II_input=ctrl_range((abs(X_fix_output*0.5)+Y_fix_output),steady_range_Max,steady_range_M
in)
left_II(0, 35, left_II_input)
#LEFT_III
left_III_input = ctrl_range((-X_fix_output + Y_fix_output), steady_range_Max, steady_range_Mi
n)
left_III(0, 35, left_III_input)
#RIGHT_III
right_III_input = ctrl_range((X_fix_output - Y_fix_output), steady_range_Max, steady_range_Mi
n)
right_III(0, 35, right_III_input)
#RIGHT_II
right_II_input=ctrl_range((abs(-X_fix_output*0.5)-Y_fix_output),steady_range_Max,steady_range
_Min)
right_II(0, 35, right_II_input)
#RIGHT_I
right_I_input = ctrl_range((-X_fix_output-Y_fix_output), steady_range_Max, steady_range_Min)
right_I(0, 35, right_I_input)