replace Eigen::Index with auto to support older Eigen3 versions
This commit is contained in:
@@ -195,7 +195,7 @@ int ChainIkSolverPos_LMA::CartToJnt(const KDL::JntArray& q_init, const KDL::Fram
|
||||
|
||||
svd.compute(jac);
|
||||
original_Aii = svd.singularValues();
|
||||
for (Eigen::Index j=0;j<original_Aii.rows();++j) {
|
||||
for (auto j=0;j<original_Aii.rows();++j) {
|
||||
original_Aii(j) = original_Aii(j)/( original_Aii(j)*original_Aii(j)+lambda);
|
||||
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace KDL
|
||||
}
|
||||
|
||||
void Jacobian::changeRefPoint(const Vector& base_AB){
|
||||
for(Eigen::Index i=0;i<data.cols();i++)
|
||||
for(auto i=0;i<data.cols();i++)
|
||||
this->setColumn(i,this->getColumn(i).RefPoint(base_AB));
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace KDL
|
||||
}
|
||||
|
||||
void Jacobian::changeBase(const Rotation& rot){
|
||||
for(Eigen::Index i=0;i<data.cols();i++)
|
||||
for(auto i=0;i<data.cols();i++)
|
||||
this->setColumn(i,rot*this->getColumn(i));;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace KDL
|
||||
}
|
||||
|
||||
void Jacobian::changeRefFrame(const Frame& frame){
|
||||
for(Eigen::Index i=0;i<data.cols();i++)
|
||||
for(auto i=0;i<data.cols();i++)
|
||||
this->setColumn(i,frame*this->getColumn(i));
|
||||
}
|
||||
|
||||
|
||||
@@ -89,9 +89,9 @@ namespace KDL {
|
||||
Wq_V.noalias() = Wq * V;
|
||||
|
||||
// tmp = (Si*Wy*U'*y),
|
||||
for (Eigen::Index i = 0; i < J.cols(); i++) {
|
||||
for (auto i = 0; i < J.cols(); i++) {
|
||||
double sum = 0.0;
|
||||
for (Eigen::Index j = 0; j < J.rows(); j++) {
|
||||
for (auto j = 0; j < J.rows(); j++) {
|
||||
if (i < Wy_t.rows())
|
||||
sum += U(j, i) * Wy_t(j);
|
||||
else
|
||||
|
||||
@@ -70,8 +70,8 @@ namespace KDL
|
||||
rotate=false;
|
||||
rotations=0;
|
||||
//Perform rotations between columns of B
|
||||
for(Eigen::Index i=0;i<B.cols();i++){
|
||||
for(Eigen::Index j=i+1;j<B.cols();j++){
|
||||
for(auto i=0;i<B.cols();i++){
|
||||
for(auto j=i+1;j<B.cols();j++){
|
||||
//calculate plane rotation
|
||||
double p = B.col(i).dot(B.col(j));
|
||||
double qi =B.col(i).dot(B.col(i));
|
||||
@@ -111,7 +111,7 @@ namespace KDL
|
||||
}
|
||||
//Only calculate new U and S if there were any rotations
|
||||
if(rotations!=0){
|
||||
for(Eigen::Index i=0;i<U.rows();i++) {
|
||||
for(auto i=0;i<U.rows();i++) {
|
||||
if(i<B.cols()){
|
||||
double si=sqrt(B.col(i).dot(B.col(i)));
|
||||
if(si==0)
|
||||
@@ -134,8 +134,8 @@ namespace KDL
|
||||
rotate=false;
|
||||
rotations=0;
|
||||
//Perform rotations between rows of B
|
||||
for(Eigen::Index i=0;i<B.cols();i++){
|
||||
for(Eigen::Index j=i+1;j<B.cols();j++){
|
||||
for(auto i=0;i<B.cols();i++){
|
||||
for(auto j=i+1;j<B.cols();j++){
|
||||
//calculate plane rotation
|
||||
double p = B.row(i).dot(B.row(j));
|
||||
double qi = B.row(i).dot(B.row(i));
|
||||
@@ -179,7 +179,7 @@ namespace KDL
|
||||
|
||||
//Only calculate new U and S if there were any rotations
|
||||
if(rotations!=0){
|
||||
for(Eigen::Index i=0;i<V.rows();i++) {
|
||||
for(auto i=0;i<V.rows();i++) {
|
||||
double si=sqrt(B.row(i).dot(B.row(i)));
|
||||
if(si==0)
|
||||
V.col(i) = B.row(i);
|
||||
|
||||
Reference in New Issue
Block a user