From 82abfa9f7a5a4ebde20ac60d16d9afe079eaf92c Mon Sep 17 00:00:00 2001 From: Shankari02 Date: Mon, 27 Jan 2025 19:30:09 +0530 Subject: [PATCH 1/7] Inverse the pitch error condition according to the updated SRA board --- 7_self_balancing/main/self_balancing.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/7_self_balancing/main/self_balancing.c b/7_self_balancing/main/self_balancing.c index c195f18..df0210f 100644 --- a/7_self_balancing/main/self_balancing.c +++ b/7_self_balancing/main/self_balancing.c @@ -134,7 +134,7 @@ void balance_task(void *arg) motor_pwm = bound((motor_cmd), MIN_PWM, MAX_PWM); // Bot tilts upwards - if (pitch_error > 1) + if (pitch_error > -1) { // setting motor A0 with definite speed(duty cycle of motor driver PWM) in Backward direction set_motor_speed(motor_a_0, MOTOR_BACKWARD, motor_pwm); @@ -143,7 +143,7 @@ void balance_task(void *arg) } // Bot tilts downwards - else if (pitch_error < -1) + else if (pitch_error < 1) { // setting motor A0 with definite speed(duty cycle of motor driver PWM) in Forward direction set_motor_speed(motor_a_0, MOTOR_FORWARD, motor_pwm); @@ -191,4 +191,4 @@ void app_main() // xTaskCreate -> Create a new task and add it to the list of tasks that are ready to run xTaskCreatePinnedToCore(&balance_task, "balance task", 4096, NULL, 1, NULL, 0); -} \ No newline at end of file +} From 4f034c74ae27aa61a8bab7c4cdaca2bb2cf53aa7 Mon Sep 17 00:00:00 2001 From: Shankari02 Date: Mon, 27 Jan 2025 19:30:54 +0530 Subject: [PATCH 2/7] Update new tuning values for self balancing --- 7_self_balancing/main/tuning_websocket_server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/7_self_balancing/main/tuning_websocket_server.c b/7_self_balancing/main/tuning_websocket_server.c index 46a8df8..69a94c7 100644 --- a/7_self_balancing/main/tuning_websocket_server.c +++ b/7_self_balancing/main/tuning_websocket_server.c @@ -2,7 +2,7 @@ static const char *TAG = "tuning_websocket_server"; -static pid_const_t pid_constants = {.kp = 27.0, .ki = 0.0, .kd = 2.0, .setpoint = 2.0, .offset = 0.0, .val_changed = true}; +static pid_const_t pid_constants = {.kp = 1.2.0, .ki = 0.0, .kd = 8.0, .setpoint = 4.0, .offset = 0.0, .val_changed = true}; static QueueHandle_t client_queue; const static int client_queue_size = 10; @@ -268,4 +268,4 @@ void start_websocket_server() ws_server_start(); xTaskCreatePinnedToCore(&server_task, "server_task", 3000, NULL, 4, NULL, 1); xTaskCreatePinnedToCore(&server_handle_task, "server_handle_task", 4000, NULL, 3, NULL, 1); -} \ No newline at end of file +} From 5487397ab20498f09a9be61b2b5eaee064c282e4 Mon Sep 17 00:00:00 2001 From: Shankari02 Date: Mon, 27 Jan 2025 19:31:21 +0530 Subject: [PATCH 3/7] Rectify a minor error in the new tuning values --- 7_self_balancing/main/tuning_websocket_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/7_self_balancing/main/tuning_websocket_server.c b/7_self_balancing/main/tuning_websocket_server.c index 69a94c7..e007f73 100644 --- a/7_self_balancing/main/tuning_websocket_server.c +++ b/7_self_balancing/main/tuning_websocket_server.c @@ -2,7 +2,7 @@ static const char *TAG = "tuning_websocket_server"; -static pid_const_t pid_constants = {.kp = 1.2.0, .ki = 0.0, .kd = 8.0, .setpoint = 4.0, .offset = 0.0, .val_changed = true}; +static pid_const_t pid_constants = {.kp = 1.2, .ki = 0.0, .kd = 8.0, .setpoint = 4.0, .offset = 0.0, .val_changed = true}; static QueueHandle_t client_queue; const static int client_queue_size = 10; From b8ac3e38d9580580bc6193371a5976cbfe9b8fc6 Mon Sep 17 00:00:00 2001 From: Shankari02 Date: Mon, 27 Jan 2025 19:32:13 +0530 Subject: [PATCH 4/7] Change the black boundary value for line following --- 6_line_following/main/line_following.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/6_line_following/main/line_following.c b/6_line_following/main/line_following.c index 17e1849..0e1ea40 100644 --- a/6_line_following/main/line_following.c +++ b/6_line_following/main/line_following.c @@ -9,7 +9,7 @@ #define WHITE_MARGIN 0 #define bound_LSA_LOW 0 #define bound_LSA_HIGH 1000 -#define BLACK_BOUNDARY 930 // Boundary value to distinguish between black and white readings +#define BLACK_BOUNDARY 820 // Boundary value to distinguish between black and white readings /* * weights given to respective line sensor @@ -151,4 +151,4 @@ void app_main() { xTaskCreate(&line_follow_task, "line_follow_task", 4096, NULL, 1, NULL); start_tuning_http_server(); -} \ No newline at end of file +} From f94199c3db3f3053e1b2ce644196dfe764c0064a Mon Sep 17 00:00:00 2001 From: Shankari02 Date: Mon, 3 Feb 2025 14:14:12 +0530 Subject: [PATCH 5/7] Update Tuning Parameters for Improved Self-Balancing --- 7_self_balancing/main/tuning_websocket_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/7_self_balancing/main/tuning_websocket_server.c b/7_self_balancing/main/tuning_websocket_server.c index e007f73..b905cb7 100644 --- a/7_self_balancing/main/tuning_websocket_server.c +++ b/7_self_balancing/main/tuning_websocket_server.c @@ -2,7 +2,7 @@ static const char *TAG = "tuning_websocket_server"; -static pid_const_t pid_constants = {.kp = 1.2, .ki = 0.0, .kd = 8.0, .setpoint = 4.0, .offset = 0.0, .val_changed = true}; +static pid_const_t pid_constants = {.kp = 11.0, .ki = 0.0, .kd = 4.0, .setpoint = 9.0, .offset = 0.0, .val_changed = true}; static QueueHandle_t client_queue; const static int client_queue_size = 10; From a8addb3f256852de9dc006f5139e37e2320d0171 Mon Sep 17 00:00:00 2001 From: Shankari02 Date: Mon, 3 Feb 2025 14:29:48 +0530 Subject: [PATCH 6/7] Revert "Inverse the pitch error condition according to the updated SRA board" This reverts commit 82abfa9f7a5a4ebde20ac60d16d9afe079eaf92c. --- 7_self_balancing/main/self_balancing.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/7_self_balancing/main/self_balancing.c b/7_self_balancing/main/self_balancing.c index df0210f..c195f18 100644 --- a/7_self_balancing/main/self_balancing.c +++ b/7_self_balancing/main/self_balancing.c @@ -134,7 +134,7 @@ void balance_task(void *arg) motor_pwm = bound((motor_cmd), MIN_PWM, MAX_PWM); // Bot tilts upwards - if (pitch_error > -1) + if (pitch_error > 1) { // setting motor A0 with definite speed(duty cycle of motor driver PWM) in Backward direction set_motor_speed(motor_a_0, MOTOR_BACKWARD, motor_pwm); @@ -143,7 +143,7 @@ void balance_task(void *arg) } // Bot tilts downwards - else if (pitch_error < 1) + else if (pitch_error < -1) { // setting motor A0 with definite speed(duty cycle of motor driver PWM) in Forward direction set_motor_speed(motor_a_0, MOTOR_FORWARD, motor_pwm); @@ -191,4 +191,4 @@ void app_main() // xTaskCreate -> Create a new task and add it to the list of tasks that are ready to run xTaskCreatePinnedToCore(&balance_task, "balance task", 4096, NULL, 1, NULL, 0); -} +} \ No newline at end of file From 4447a005124dee890b4e7165edcc84f4a458c779 Mon Sep 17 00:00:00 2001 From: Shankari02 Date: Mon, 3 Feb 2025 14:46:56 +0530 Subject: [PATCH 7/7] [Minor] Update the Wall-E version --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0764702..621f3e3 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@

-

Wall-E version 2.3

+

Wall-E version 2.6

- Code repository for Wall-E_v2.3 + Code repository for Wall-E_v2.6

Report Bug