Skip to content
Snippets Groups Projects
Commit bdea3079 authored by asantamaria's avatar asantamaria
Browse files

added ir_gain. to be tested with real robot

parent 01846cc4
No related branches found
No related tags found
No related merge requests found
...@@ -210,8 +210,11 @@ void CQuadarm_Task_Priority_Ctrl::uam_control(){ ...@@ -210,8 +210,11 @@ void CQuadarm_Task_Priority_Ctrl::uam_control(){
MatrixXd JIR,JIR_pseudo,sigmaIR; MatrixXd JIR,JIR_pseudo,sigmaIR;
task_infrad(JIR,JIR_pseudo,sigmaIR); task_infrad(JIR,JIR_pseudo,sigmaIR);
// Gain
double lambdaIR = this->ctrl_params_.ir_gain;
// task velocity // task velocity
this->ctrl_params_.ir_vel = JIR_pseudo * sigmaIR; this->ctrl_params_.ir_vel = JIR_pseudo * lambdaIR * sigmaIR;
// TASK 1: Visual Servo _________________________________________ // TASK 1: Visual Servo _________________________________________
...@@ -323,7 +326,8 @@ void CQuadarm_Task_Priority_Ctrl::task_infrad(MatrixXd& JIR,MatrixXd& JIR_pseudo ...@@ -323,7 +326,8 @@ void CQuadarm_Task_Priority_Ctrl::task_infrad(MatrixXd& JIR,MatrixXd& JIR_pseudo
inf_radius(0,0) = this->ctrl_params_.inf_radius; inf_radius(0,0) = this->ctrl_params_.inf_radius;
// Task vector // Task vector
sigmaIR = d_obs.transpose()*d_obs-inf_radius; Eigen::MatrixXd euc_d_obs = (d_obs.transpose()*d_obs).array().sqrt();
sigmaIR = inf_radius-euc_d_obs;
// Task Jacobian // Task Jacobian
JIR = MatrixXd::Zero(1,4+this->arm_.nj); JIR = MatrixXd::Zero(1,4+this->arm_.nj);
......
...@@ -97,6 +97,7 @@ typedef struct{ ...@@ -97,6 +97,7 @@ typedef struct{
MatrixXd vs_vel; // Primary task velocity. MatrixXd vs_vel; // Primary task velocity.
double vs_alpha_min; // Alpha value for gain matrix pseudo inverse. double vs_alpha_min; // Alpha value for gain matrix pseudo inverse.
MatrixXd vs_delta_gain; // Delta values (min and max) for gain matrix pseudo inverse W. MatrixXd vs_delta_gain; // Delta values (min and max) for gain matrix pseudo inverse W.
double ir_gain; // Gain of Inflation radius task.
double inf_radius; // Security distance to an obstacle (Inflation radius) to prevent Collisions. double inf_radius; // Security distance to an obstacle (Inflation radius) to prevent Collisions.
double cog_gain; // Gain of CoG alignment secondary task. double cog_gain; // Gain of CoG alignment secondary task.
MatrixXd cog_vel; // Secondary task velocity. MatrixXd cog_vel; // Secondary task velocity.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment