@@ -383,7 +383,7 @@ static void computeJacobianActivated( Task* taskSpec,
383
383
for ( int i=0 ;i<Jt.cols ();++i )
384
384
{
385
385
if (! controlSelec (i) )
386
- {for ( int j= 0 ;j< Jt.rows ();++j ) { Jt (j,i)= 0 .; } }
386
+ { Jt.col (i). setZero (); }
387
387
}
388
388
}
389
389
else
@@ -557,7 +557,7 @@ computeControlLaw( dynamicgraph::Vector& control,const int& iterTime )
557
557
/* **/ sotCOUNTER (2 ,3 ); // compute JK
558
558
559
559
/* --- COMPUTE Jt --- */
560
- if ( 0 <iterTask ) Jt = JK*Proj; else { Jt = JK; }
560
+ if ( 0 <iterTask ) Jt. noalias () = JK*Proj; else { Jt = JK; }
561
561
/* **/ sotCOUNTER (3 ,4 ); // compute Jt
562
562
563
563
/* --- COMPUTE S --- */
@@ -619,8 +619,8 @@ computeControlLaw( dynamicgraph::Vector& control,const int& iterTime )
619
619
/* --- COMPUTE QDOT AND P --- */
620
620
/* DEBUG: normally, the first iter (ie the test below)
621
621
* is the same than the other, starting with control_0 = q0SIN. */
622
- if ( iterTask==0 ) control += Jp*err; else
623
- control += Jp*(err - JK*control);
622
+ if ( iterTask==0 ) control. noalias () += Jp*err;
623
+ else control += Jp*(err - JK*control);
624
624
/* **/ sotCOUNTER (7 ,8 ); // QDOT
625
625
626
626
/* --- OPTIMAL FORM: To debug. --- */
0 commit comments