1.首先打开ros工作空间

source /opt/ros/galactic/setup.bash

2.启动rviz2

rviz2

3.在bag路径下打开ros工作空间

source /opt/ros/galactic/setup.bash

4.输入播放bag命令

ros2 bag play bag包名字

5.如果播放bag有问题换个命令试一下

ros2 bag play bag包名字 --qos-profile-overrides-path /路径下/durability_override.yaml

/tf_static:
durability: transient_local
history: keep_all
/map:
durability: transient_local
history: keep_all
/global_costmap/costmap:
durability: transient_local
history: keep_all
/local_costmap/costmap:
durability: transient_local
history: keep_all


版权声明:本文为weixin_47397805原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/weixin_47397805/article/details/123852336