当前位置:网站首页>Rosbag使用命令
Rosbag使用命令
2022-06-22 14:32:00 【王不偏】
rosbag是一个基于ros系统的话题数据录制和回放工具,在实际应用中,可以使用 bag 文件来保存和恢复系统的运行状态,常用于初始数据采集及DEBUG。
常用到的指令包括:
1 - record:用指定的话题录制一个 bag 包
2 - info:显示一个 bag 包的基本信息,比如包含哪些话题
3 - play:回放一个或者多个 bag 包
4 - reindex:重新索引一个或多个损坏 bag 包
一、bag录制
(1)录制所有话题数据
rosbag record -a
(2)录制指定话题数据
rosbag record <topic_name1> <topic_name2> <topic_name3> …
(3)指定数据包名称
rosbag record -O <topic_name1> <topic_name2> <topic_name3> …
注意:-O需要大写
结合自己的相机命令使用**************
1.使用ros打开相机和IMU :roslaunch realsense2_camera lee_test.launch
2.调整IMU 发布频率:rosrun topic_tools throttle messages /camera/imu 150.0 /imu
3.录制命令为:rosbag record -O D455 /imu /camera/color/image_raw
二、bag信息查看
rosbag info指令可以数据包中包含的话题名称,话题数量,话题消息类型等信息:
(1)rosbag info
#三、bag播放
(1)回放指定bag
rosbag play
(2)回放当前目录下所有bag
rosbag play *
(3)从指定时间(n = 指定时间s)开始回放bag
rosbag play -s n
(4)延时指定时间(n = 延时时间s)开始回放bag
rosbag play -d n
(5)播放指定时间(n = 指定秒数)的bag
rosbag play -u n
(6)从指定时间(n = 开始时间s)开始播放指定时间(m = 指定播放时间s)的bag
rosbag play -s n -u m
(7)按指定倍率(n = 倍率)回放bag
rosbag play -r n
三、bag修复
回放不成功,提示 reindex ,则:
rosbag reindex
原文链接:https://blog.csdn.net/chen_mp/article/details/123381936
边栏推荐
- keil MDK 中使用虚拟串口调试串口
- 架构师之路,从「存储选型」起步
- Using virtual serial port to debug serial port in keil MDK
- 壹连科技冲刺深交所:年营收14亿 65%收入来自宁德时代
- C # implements insertion sorting
- 天安科技IPO被终止:曾拟募资3.5亿 复星与九鼎是股东
- mysql如何修改存储引擎为innodb
- "Software defines the world, open source builds the future" 2022 open atom global open source summit will open at the end of July
- KEIL仿真和vspd
- Is the encryption market a "natural disaster" or a "man-made disaster" in the cold winter?
猜你喜欢

Show me my personal work list for the past two years. I earn 6K a month in my spare time. It's so delicious to have a sideline
![Found several packages [runtime, main] in ‘/usr/local/Cellar/go/1.18/libexec/src/runtime;](/img/75/d2ad171d49611a6578faf2d390af29.jpg)
Found several packages [runtime, main] in ‘/usr/local/Cellar/go/1.18/libexec/src/runtime;

What are strong and weak symbols in embedded systems?

Using virtual serial port to debug serial port in keil MDK

Exploration and practice of dewu app data simulation platform

天安科技IPO被终止:曾拟募资3.5亿 复星与九鼎是股东

Fast and accurate point cloud registration based on minimizing 3D NDT distance

“软件定义世界,开源共筑未来” 2022开放原子全球开源峰会7月底即将开启

"Software defines the world, open source builds the future" 2022 open atom global open source summit will open at the end of July

基于最小化三维NDT距离的快速精确点云配准
随机推荐
ROS2前置基础教程 | 小鱼教你用CMake依赖查找流程
专业“搬砖”老司机总结的 12 条 SQL 优化方案,非常实用!
TDengine 连接器上线 Google Data Studio 应用商店
英国考虑基于国家安全因素让Arm在伦敦上市
HMS Core新闻行业解决方案:让技术加上人文的温度
向量2(友元及拷贝构造)
『忘了再学』Shell流程控制 — 38、while循环和until循环介绍
向量6(继承)
Exploration and practice of dewu app data simulation platform
Ros2 pre basic tutorial | using cmakelists Txt compile ros2 node
模板特例化 template<>
快速玩转CI/CD图形化编排
还整成这样
迷宫问题(BFS记录路径)
Promoting compatibility and adaptation, enabling coordinated development of gbase may adaptation Express
Mitsubishi manipulator demo program
数据资产管理:数据发现,发现什么,怎么发现?
mysql如何将字段修改为not null
Method of using inout signal in Verilog
(pytorch进阶之路二)word embedding 和 position embedding