Skip to content

Commit

Permalink
update gain adaptation, update abag parameters
Browse files Browse the repository at this point in the history
* gain saturation must be between 0 and 1
* tune ABAG params with focus on z axis
  • Loading branch information
minhnh committed Jul 3, 2020
1 parent e7743df commit ffc0290
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion generated/abag.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void gainAdapater_sched(double const * e_bar, double const * gain_threshold, dou

/* saturation saturateGain */
if (*adapted_gain > 1.) *adapted_gain = 1.;
else if (*adapted_gain < -1.) *adapted_gain = -1.;
else if (*adapted_gain < 0.) *adapted_gain = 0.;

/* update output ports */
}
Expand Down
6 changes: 3 additions & 3 deletions src/control_kinova.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ void example_cyclic_torque_control (
const std::vector<double> cart_force_limit {5.0, 5.0, 5.0, 5.0, 5.0, 5.0}; // N

// ABAG parameters
const double alphaPosition[3] = { 0.75, 0.75, 0.75 };
const double alphaPosition[3] = { 0.8, 0.9, 0.95 };
const double biasThresPos[3] = { 0.000407, 0.000407, 0.000407 };
const double biasStepPos[3] = { 0.000400, 0.000400, 0.000400 };
const double gainThresPos[3] = { 0.502492, 0.502492, 0.502492 };
const double gainStepPos[3] = { 0.002, 0.002, 0.002 };
const double gainThresPos[3] = { 0.502492, 0.55, 0.550000 };
const double gainStepPos[3] = { 0.002, 0.003, 0.003 };
double desiredPosistion[3] = { 0.0 };
double errorPos[3] = { 0.0 };
double commandPos[3] = { 0.0 };
Expand Down

0 comments on commit ffc0290

Please sign in to comment.