File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -170,25 +170,28 @@ namespace KDL
170170
171171 void ChainIkSolverVel_pinv::SortJntArrayMaxToMin (JntArray& Smaxtomin)
172172 {
173- int n=Smaxtomin.rows ();
174- for (int i=0 ; i<n; i++){
173+ unsigned int n = Smaxtomin.rows ();
174+ for (unsigned int i=0 ; i<n; ++i)
175+ {
175176 double S_max = Smaxtomin (i);
176- int i_max = i;
177- for (int j=i+1 ; j<n; j++){
177+ unsigned int i_max = i;
178+ for (unsigned int j=i+1 ; j<n; ++j)
179+ {
178180 double Sj = Smaxtomin (j);
179- if (Sj > S_max){
181+ if (Sj > S_max)
182+ {
180183 S_max = Sj;
181184 i_max = j;
182185 }
183186 }
184- if (i_max != i){
187+ if (i_max != i)
188+ {
185189 /* swap eigenvalues */
186190 double tmp = Smaxtomin (i);
187- Smaxtomin (i)=Smaxtomin (i_max);
188- Smaxtomin (i_max)= tmp;
191+ Smaxtomin (i) =Smaxtomin (i_max);
192+ Smaxtomin (i_max) = tmp;
189193 }
190194 }
191- return ;
192195 }
193196
194197 const char * ChainIkSolverVel_pinv::strError (const int error) const
You can’t perform that action at this time.
0 commit comments