diff --git a/Code/Control/Laptop_Code/README.md b/Code/Control/Laptop_Code/README.md index 16fa2cbb921756723a618b3451de1b1ebe719301..fbdeb708b80ea00c3bc27feea54f787ba6ad518a 100644 --- a/Code/Control/Laptop_Code/README.md +++ b/Code/Control/Laptop_Code/README.md @@ -2,6 +2,34 @@ ## 1 Main structure +├─ball_detection +│ ├─distance-detection-torch +│ │ └─__pycache__ +│ ├─model_weights +│ └─__pycache__ +├─basic_comm_test +│ ├─ESP32_master +│ └─ESP32_slave +├─ESP32_AT +│ └─__pycache__ +├─ESP32_slave +├─Figs +├─main_backup +├─previous_high_level +├─Previous_low_level +│ ├─ESP32_master +│ └─ESP32_slave +├─simple_pid +│ └─__pycache__ +├─system_description +├─Test_keyboard +├─Test_PID +│ └─test_pid +├─Two_Lidars_comm_test +│ ├─ESP32_master +│ └─ESP32_slave +└─__pycache__ + ## 2 Software Requirements ### Step 1: @@ -38,6 +66,67 @@ pip install pyserial pip install pygame # install cv2 pip install opencv-python -# install +# install torch +conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch +# install pupil-apriltags +pip install pupil-apriltags +``` + +## 3 Main_code + +There are two files about main code: + +- constants.py: it stores global variables that can be changed easily + +- main_keyboard: it has keyboard interruption and it contains all the functions that we need. + +### 3.1 Flowchart + + + +### 3.2 Functions name and their inputs outputs + +All function: + +``` +init() +auto_init() +auto_control() + main_control() + ball_detect() + ball_capture() + goal_detect() + move2goal() + rotate_one_direction() + move2ball() + +serial_port_out() + +``` + + + +```python +init() + """ + Description: + + Input: + no + Output: + no + """ +``` + +```python +auto_init() +""" + Description: + + Input: + no + Output: + no +""" ```