Ask Your Question

Revision history [back]

Hello Akshay,

I have been working on it. What I found the solution is,

Change the whole section with the bellow section, it will works properly. Note: I am working on ROS groovy.

TransformG readTranform(const string & filename) {

boost::numeric::ublas::matrix<double> mat(4,4);

ifstream file((char*) filename.c_str(), ifstream::in);

string line;

int row = 0;

while(getline(file,line)){

    string e1;

    stringstream lineStream(line);

    int col = 0;

    while(getline(lineStream, e1, ',')){

        mat(row,col) = atof(e1.c_str());

            col +=1;

    }

    row += 1;

}

TransformG transG(mat);

return transG;

}

Have a look and let me know, If you still face any issue. Remember you might need to sort of changes in some other file too.