File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -679,13 +679,15 @@ void Arduino_AlvikCarrier::updateKinematics(){
679679 drive (0 , round (rotate_pid->getControlOutput ()/10.0 )*10 );
680680 if (abs (rotate_pid->getError ())<ROTATE_THREASHOLD){
681681 kinematics_achieved=true ;
682+ disableKinematicsMovement ();
682683 }
683684 }
684685 if (kinematics_movement==MOVEMENT_MOVE){
685686 move_pid->update ((kinematics->getTravel ()-previous_travel)*move_direction);
686687 drive (round (move_pid->getControlOutput ()/10.0 )*10 , 0 );
687688 if (abs (move_pid->getError ())<MOVE_THREADSHOLD){
688689 kinematics_achieved=true ;
690+ disableKinematicsMovement ();
689691 }
690692
691693 }
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ const float MOTOR_RATIO = MOTOR_CPR*MOTOR_GEAR_RATIO;
4646#define ROTATE_KD_DEFAULT 0.001
4747#define ROTATE_CONTROL_PERIOD 0.02
4848#define ROTATE_MAX_SPEED 45.0
49- #define ROTATE_THREASHOLD 3
49+ #define ROTATE_THREASHOLD 1
5050
5151#define MOVE_KP_DEFAULT 5.0
5252#define MOVE_KI_DEFAULT 0.0
You can’t perform that action at this time.
0 commit comments