错误如下:
ghp@ghp:~/SLAMBOOK2/Code/slambook2/ch3/examples/build$ ./plotTrajectory
terminate called after throwing an instance of 'std::ios_base::failure[abi:cxx11]' what(): basic_filebuf::underflow error reading the file: iostream error
Aborted (core dumped)
ghp@ghp:~/SLAMBOOK2/Code/slambook2/ch3/examples/build$
解决办法:
把原程序的第11行:
string trajectory_file = "./examples/trajectory.txt";
改为自己的文件路径即可。
KDevelop显示行数: