Learning ROS: Recording and playing back data
本文主要部分来源于ROS官网的Tutorials.
Description: This tutorial will teach you how to record data from a running ROS system into a .bag file, and then to play back the data to produce similar behavior in a running system.
roscore &
rosrun turtlesim turtlesim_node &
rosrun turtlesim turtle_teleop_key
rostopic list -v # examine the full list of topics that are currently being published in the running system. # making a temporary directory to record data and then running rosbag record with the option -a
mkdir ~/bagfiles
cd ~/bagfiles
rosbag record -a # Now all published topics will be accumulated in a bag file.
现在可以用方向键控制乌龟运动,所有Topics都会被记录到*.bag文件,本例文件名是当前时间。
接下来回放:
rosbag play <your bagfile>
可以看到乌龟根据回放的message运动。
Recording a subset of the data
rosrun turtlesim turtlesim_node
rosrun turtlesim turtle_teleop_key rosbag record -O subset /turtle1/cmd_vel /turtle1/pose # 只记录感兴趣的topics, 记录到subset.bag中
The limitations of rosbag record/play
play(回放模拟)的效果可能和record(真实历史)时不完全一样,因为:
- rosbag是通过记录topics来回放模拟历史msgs信息。
- 仿真的轨迹与 初始状态有关系。
- 考虑到系统调度的复杂性,难以保证时间完全精确, 仿真的轨迹与 微小的时间差 也有关系。
Learning ROS: Recording and playing back data的更多相关文章
- Recording and playing back data
Recording and playing back data This tutorial will teach you how to record data from a running ROS s ...
- Learning ROS for Robotics Programming Second Edition学习笔记(七) indigo PCL xtion pro live
中文译著已经出版,详情请参考:http://blog.csdn.net/ZhangRelay/article/category/6506865 Learning ROS forRobotics Pro ...
- Learning ROS for Robotics Programming - Second Edition(《学习ROS机器人编程-第二版》)
Learning ROS for Robotics Programming - Second Edition <学习ROS机器人编程-第二版> ----Your one-stop guid ...
- 论文笔记之:Playing for Data: Ground Truth from Computer Games
Playing for Data: Ground Truth from Computer Games ECCV 2016 Project Page:http://download.visinf.tu- ...
- Learning ROS for Robotics Programming Second Edition学习笔记(十) indigo Gazebo rviz slam navigation
中文译著已经出版,详情请参考:http://blog.csdn.net/ZhangRelay/article/category/6506865 moveit是书的最后一章,由于对机械臂完全不知,看不懂 ...
- Learning ROS forRobotics Programming Second Edition学习笔记(八)indigo rviz gazebo
中文译著已经出版,详情请参考:http://blog.csdn.net/ZhangRelay/article/category/6506865 Learning ROS forRobotics Pro ...
- Learning ROS for Robotics Programming Second Edition学习笔记(六) indigo xtion pro live
中文译著已经出版,详情请参考:http://blog.csdn.net/ZhangRelay/article/category/6506865 Learning ROS for Robotics Pr ...
- Learning ROS for Robotics Programming Second Edition学习笔记(五) indigo computer vision
中文译著已经出版,详情请参考:http://blog.csdn.net/ZhangRelay/article/category/6506865 Learning ROS for Robotics Pr ...
- Learning ROS for Robotics Programming Second Edition学习笔记(四) indigo devices
中文译著已经出版,详情请参考:http://blog.csdn.net/ZhangRelay/article/category/6506865 Learning ROS for Robotics Pr ...
随机推荐
- VSCode 使用
运行时,如何弹出cmd命令窗口:将launch.json文件中的 externalConsole设置为true,并按F5运行(不要按右上角的运行按钮) 如何cin:先再命令窗口通过g++ *.cpp生 ...
- leetcode 987 二叉树的垂序遍历
题目解析 题目意思很简单,就是给你一个二叉树,然后告诉你每个节点都是有位置信息的,即每个节点可以用(x,y)来表示.然后节点位置信息为(x,y)的节点的左节点位置为(x+1,y-1),右节点位置为(x ...
- Hadoop 3.1.1 - 概述 - 单节点安装
Hadoop: 单节点安装 目标 本文描述了如何安装和配置单机的 Hadoop,这样你可以使用 Hadoop MapReduce 和 Hadoop 分布式文件系统(HDFS)快速地尝试简单的操作. 前 ...
- Java 使用 Apache commons-math3 线性拟合、非线性拟合实例(带效果图)
Java 使用 CommonsMath3 的线性和非线性拟合实例,带效果图 例子查看 GitHub Gitee 运行src/main/java/org/wfw/chart/Main.java 即可查看 ...
- k8s入门你至少需要会哪些
body { margin: 0; overflow: auto; font: normal 14px Verdana; background: rgba(255, 255, 255, 1); pad ...
- netty系列之:中国加油
目录 简介 场景规划 启动Server 启动客户端 消息处理 消息处理中的陷阱 总结 简介 之前的系列文章中我们学到了netty的基本结构和工作原理,各位小伙伴一定按捺不住心中的喜悦,想要开始手写代码 ...
- Java 7 新特性之try-with-resources实践理解
想象这么一个情景,我们需要使用一个资源,在使用完之后需要关闭该资源,并且使用该资源的过程中有可能有异常抛出.此时我们都会想到用try-catch语句,在finally中关闭该资源.此时会有一个问题,如 ...
- MySQL的函数使用
目录 COUNT()函数基本使用 SUM( )函数基本使用 AVG()函数基本使用 MAX()函数基本使用 MIN()函数基本使用 字符函数 concat()和concat_ws() LEFT()与R ...
- Java8 新特性 Stream Api 之集合遍历
前言 随着java版本的不断更新迭代,java开发也可以变得甜甜的,最新版本都到java11了,但是后面版本也是不在提供商用支持,需要收费,但是java8 依然是持续免费更新使用的,后面版本也更新很快 ...
- Servlet中的HttpServletResponse 类
HttpServletResponse 类的作用: 理解:顾名思义 就是响应客户端的内容, HttpServletResponse 类和 HttpServletRequest ...