Skip to content

Commit 576021d

Browse files
committed
increased limits on move_pid and rotate_pid + 0.01 Ki
1 parent 4b29501 commit 576021d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/definitions/robot_definitions.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#define WHEEL_DIAMETER_MM 34.0
1919

2020
// Motor Control and mechanical parameters
21-
#define CONTROL_LIMIT 4096 // PWM resolution
21+
#define CONTROL_LIMIT 4095 // PWM resolution
2222

2323
#define MOTOR_LIMIT 70.0 // Mechanical RPM limit speed of used motors
2424
#define MOTOR_CPR 6.0 // Resolution of the encoder
@@ -42,17 +42,17 @@ const float MOTOR_RATIO = MOTOR_CPR*MOTOR_GEAR_RATIO;
4242

4343
// Kinematics control
4444
#define ROTATE_KP_DEFAULT 5.0
45-
#define ROTATE_KI_DEFAULT 0.0
45+
#define ROTATE_KI_DEFAULT 0.01
4646
#define ROTATE_KD_DEFAULT 0.001
4747
#define ROTATE_CONTROL_PERIOD 0.02
48-
#define ROTATE_MAX_SPEED 45.0
48+
#define ROTATE_MAX_SPEED 170.0
4949
#define ROTATE_THRESHOLD 1
5050

5151
#define MOVE_KP_DEFAULT 5.0
52-
#define MOVE_KI_DEFAULT 0.0
52+
#define MOVE_KI_DEFAULT 0.01
5353
#define MOVE_KD_DEFAULT 0.001
5454
#define MOVE_CONTROL_PERIOD 0.02
55-
#define MOVE_MAX_SPEED 45.0
55+
#define MOVE_MAX_SPEED 130.0
5656
#define MOVE_THRESHOLD 3
5757

5858
#define MOVEMENT_DISABLED 0

src/motor_control/motor_control.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "../definitions/robot_definitions.h"
2020
#include "pid_controller.h"
2121

22-
#define CONTROL_LIMIT 4095
22+
//#define CONTROL_LIMIT 4095
2323
#define MEM_SIZE 5
2424
#define CONTROL_MODE_NORMAL 0
2525
#define CONTROL_MODE_LINEAR 1

0 commit comments

Comments
 (0)