视觉SLAMS十四将ch3/3.7/examples,plotTrajectory.cpp生成的可执行程序无法运行的问题

在尝试运行SLAMbook2的ch3/examples/plotTrajectory.cpp程序时,遇到了'iostream error'导致的终止运行问题。错误信息显示为'basic_filebuf::underflow error reading the file'。解决方法是将代码中读取轨迹文件的路径改为实际的文件路径。通过修改第11行代码,将字符串变量trajectory_file设置为正确路径,可以成功解决该问题。此外,提供了KDevelop显示行号的链接和相关参考资料。
摘要由CSDN通过智能技术生成

错误如下:

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显示行数:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值