Skip to content

update #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/definitions/robot_definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#define WHEEL_DIAMETER_MM 34.0

// Motor Control and mechanical parameters
#define CONTROL_LIMIT 4096 // PWM resolution
#define CONTROL_LIMIT 4095 // PWM resolution

#define MOTOR_LIMIT 70.0 // Mechanical RPM limit speed of used motors
#define MOTOR_CPR 6.0 // Resolution of the encoder
Expand All @@ -41,18 +41,18 @@ const float MOTOR_RATIO = MOTOR_CPR*MOTOR_GEAR_RATIO;


// Kinematics control
#define ROTATE_KP_DEFAULT 5.0
#define ROTATE_KI_DEFAULT 0.0
#define ROTATE_KP_DEFAULT 4.0
#define ROTATE_KI_DEFAULT 0.01
#define ROTATE_KD_DEFAULT 0.001
#define ROTATE_CONTROL_PERIOD 0.02
#define ROTATE_MAX_SPEED 45.0
#define ROTATE_MAX_SPEED 170.0
#define ROTATE_THRESHOLD 1

#define MOVE_KP_DEFAULT 5.0
#define MOVE_KI_DEFAULT 0.0
#define MOVE_KP_DEFAULT 4.0
#define MOVE_KI_DEFAULT 0.01
#define MOVE_KD_DEFAULT 0.001
#define MOVE_CONTROL_PERIOD 0.02
#define MOVE_MAX_SPEED 45.0
#define MOVE_MAX_SPEED 130.0
#define MOVE_THRESHOLD 3

#define MOVEMENT_DISABLED 0
Expand Down
2 changes: 1 addition & 1 deletion src/motor_control/motor_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "../definitions/robot_definitions.h"
#include "pid_controller.h"

#define CONTROL_LIMIT 4095
//#define CONTROL_LIMIT 4095
#define MEM_SIZE 5
#define CONTROL_MODE_NORMAL 0
#define CONTROL_MODE_LINEAR 1
Expand Down