1. 改变话题名 参考链接:https://blog.youkuaiyun.com/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