当前位置:网站首页>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
边栏推荐
- 晒晒我这两年的私活单,业余时间月入6k,有份副业也太香啦
- Hongshi electric appliance rushes to the Growth Enterprise Market: the annual revenue is 600million yuan. Liujinxian's equity was frozen by Guangde small loan
- HMS Core新闻行业解决方案:让技术加上人文的温度
- How to open an account in flush? Is online account opening safe?
- 『忘了再学』Shell流程控制 — 38、while循环和until循环介绍
- [graduation project] Research on emotion analysis based on semi supervised learning and integrated learning
- 大佬们好,初次使用MySQL cdc 报错
- OOP 多重收纳(类模板)
- 又可以这样搞nlp(分类)
- Simulation Keil et vspd
猜你喜欢

GBASE现身说 “库” 北京金融科技产业联盟创新应用专委会专题培训

What happened to those who didn't go to college

百行代码实现基于Redis的可靠延迟队列

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

KEIL仿真和vspd

推进兼容适配,使能协同发展 GBase 5月适配速递

mysql如何修改存储引擎为innodb

推進兼容適配,使能協同發展 GBase 5月適配速遞

Driving the efficient growth of the manufacturing industry, UFIDA u9 cloud is constantly improving the password behind it

Fast and accurate point cloud registration based on minimizing 3D NDT distance
随机推荐
二分查找(整数二分)
基于最小化三维NDT距离的快速精确点云配准
Ask if you want to get the start of sqlserver_ Is there a good way for LSN?
Scala语言学习-05-递归和尾递归效率对比
ROS2前置基础教程 | 使用CMakeLists.txt编译ROS2节点
"Software defines the world, open source builds the future" 2022 open atom global open source summit will open at the end of July
建议自查!MySQL驱动Bug引发的事务不回滚问题,也许你正面临该风险!
New hybrid architecture iformer! Flexible migration of convolution and maximum pooling to transformer
曾经,我同时兼职5份工作,只为给女友买个新款耳环......
模板特例化 template<>
The MIHA tour club in June is hot! 500+ posts, more than HC, just this summer (with internal promotion method)
FPGA采集DHT11温湿度
Is it difficult for flush to open an account? Is it safe to open an account online?
希尔排序的简单理解
[graduation project] Research on emotion analysis based on semi supervised learning and integrated learning
做自媒体视频博主,必备的32个素材网站分享
New load balancing webclient CRUD
Those confusing user state & kernel state
Follow up to the "June 21" gas explosion accident in Tai'an, Shandong Province: comprehensive investigation and remediation of potential gas safety hazards in restaurants
I took a private job and earned 15250. Is it still necessary to do my main business?