1. 改变话题名 参考链接:https://blog.csdn.net/ethan_guo/article/details/80262650
rosbag play file.bag /foo:=/bar #/foo是原topic,/bar是新topic
2. 改变frame_id 参考链接:http://wiki.ros.org/bag_tools#change_frame_id.py
(1) 参考说明下载包含bag_tools的srv_tools http://wiki.ros.org/srv_tools
(2) 建立ros工程, 编译项目, source devel/setup.bash
(3) 参考wiki说明
usage: change_frame_id.py [-h] -o OUTPUT_BAGFILE -i INPUT_BAGFILE -f FRAME_ID
-t TOPIC [TOPIC ...]
reate a new bagfile from an existing one replacing the frame id of requested
topics.
optional arguments:
-h, --help show this help message and exit
-o OUTPUT_BAGFILE output bagfile
-i INPUT_BAGFILE input bagfile
-f FRAME_ID desired frame_id name in the topics
-t TOPIC [TOPIC ...] topic(s) to change
终端运行: rosrun bag_tools change_frame_id.py -t /要改的话题 -f 新的frame_id -i 旧.bag -o 新.bag
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)