用rosbag这个类读取bag包里的数据,程序编译没错,运行的时候报错:
all processes on machine have died, roslaunch will exit
std::vector<std::string> topics;
topics.push_back("/odom");
topics.push_back("/scan");
之前报错是因为odom和scan前面没加/, 加了以后就没有报错了。
(之前用std:: string scan_topic = "/scan"; topics.push_back(scan_topic);好像也报错)
本文讨论了使用rosbag类读取ROS bag文件中特定主题数据时遇到的错误,详细介绍了如何通过正确设置主题名称前缀来避免运行时错误,强调了主题名称格式对数据读取的重要性。
5847

被折叠的 条评论
为什么被折叠?



