Closed shanpenghui closed 4 years ago
We cannot replicate this bug, it works properly in our computers.
I have the same problem, tested on dataset-corridor1_512_16,i found that the picture name of dataset-corridor1_512.txt can not match file name of picture folder(data).I change the path cam0 to cam1,it work.Have a try!
I have the same problem, tested on dataset-corridor1_512_16,i found that the picture name of dataset-corridor1_512.txt can not match file name of picture folder(data).I change the path cam0 to cam1,it work.Have a try!
I solve the problems by adding a function like below, before vstrImages.push_back
string lltoString(string &input)
{
string result;
ostringstream ss;
ss << input;
istringstream is(ss.str());
is >> result;
return result;
}
And then:
stringstream ss;
string rlt = lltoString(s);
string pre = strImagePath + "/";
rlt += ".png";
string fi = pre + rlt;
//cout << fi << endl;
vstrImages.push_back(fi);
change the code by follow:
string lltoString(string &input)
{
string result;
ostringstream ss;
ss << input;
istringstream is(ss.str());
is >> result;
return result;
}
void LoadImages(const string &strImagePath, const string &strPathTimes,
vector<string> &vstrImages, vector<double> &vTimeStamps)
{
ifstream fTimes;
fTimes.open(strPathTimes.c_str());
vTimeStamps.reserve(5000);
vstrImages.reserve(5000);
while(!fTimes.eof())
{
string s;
getline(fTimes,s);
if(!s.empty())
{
stringstream ss;
ss << s;
string rlt = lltoString(s);
string pre = strImagePath + "/";
rlt += ".png";
string fi = pre + rlt;
//cout << fi << endl;
vstrImages.push_back(fi);
double t;
ss >> t;
vTimeStamps.push_back(t/1e9);
}
}
}
I try to run the example of mono_inertial_tum_vi, but error come out when start the .sh file.
The data is Euroc / DSO 512x512 dataset link :
The error like below:
The tum_vi.sh file is
The exec file is in the git
Thanks for helping.