当前位置:网站首页>Simulation time and bag operation in ROS
Simulation time and bag operation in ROS
2022-06-29 07:56:00 【Hermit_ Rabbit】
ROS Time type
ROS There are two kinds of time :
ROS::Time[/Duration/Rate]:ROS Time —— Sources can be considered as modifications such as acceleration / Slow down / Pause .ROS::WallTime[WallDuration/WallRate]:ROS Absolute time —— Immutable " real " Time .
be-all ros::node If there is a setting at startup [ros::param] \use_sim_time = true The of the node ROS::Time from /clock In order to get , Otherwise, its value and ROS::WallTime Agreement .
Observe the phenomenon :
stay ROS_INFO The difference between the two can be observed in the output timestamp . First we set up rosparam set /use_sim_time true Then start the following code :
ROS_INFO("%lf,%lf",(double)(ros::WallTime::now().toSec()),
(double)(ros::Time::now().toSec()));

Input :rostopic pub /clock rosgraph_msgs/Clock "clock: secs: 1 nsecs: 0" Then run the above code
![ROS_INFO The output timestamp format is [WallTime,Time ].ROS::Time by /clock The latest time message content .](/img/90/25e69495a0a2cfbfe03921bf259656.png)
Input :rosparam delete /use_sim_time Rerun code 
use
ROS Time and time stamp stamp Yes, some rosnode It's crucial :
such as rviz and tf Will msg Of header/stamp And rosnode Current time comparison to discard invalid data (OLD_DATA).
ActionClient The current time will be automatically added to stamp Send to ActionServer, and ActionSerer Will compare the new msg And history msg Of stamp To determine whether it is legal data .
Recording rosbag When msg/header/stamp The timestamp is the value of the recording time . May cause the current ROS Time A mismatch with the timestamp results in : Throw an exception , What's more, the direct function is abnormal .
We can set use_sim_time Restart node , change ROS Time source . And through the rosbag ... --clock Parameter let rosbag Release /clock drive ROS Time
边栏推荐
- 【深度之眼吴恩达机器学习作业班第四期】逻辑回归编程实现
- 自动化测试 - uiautomator2框架应用 - 自动打卡
- [FreeRTOS] interrupt mechanism
- 4年工作经验,多线程间的5种通信方式都说不出来,你敢信?
- 【工控老马】基于西门子S7-200PLC的跑马灯控制系统的设计方案详解
- Dump (cl\alv\tree\base================================cp|set\items\for\column) when expanding node or clicking toolbar button
- Gateway controller communication protocol
- [industrial control old horse] detailed design of PLC six way responder system
- SQL injection bypass (6)
- Fluent imitates uiswitch
猜你喜欢

Behaviortree in ros2

Detailed design of PLC program control system for washing machine

【工控老马】洗衣机PLC程序控制系统设计详解
![Detailed explanation of communication principle between [industrial control old horse] single chip microcomputer and Siemens S7-200](/img/56/b300c0c3606dbc328e301092615bff.jpg)
Detailed explanation of communication principle between [industrial control old horse] single chip microcomputer and Siemens S7-200

How to permanently set Mysql to utf8 encoding?

搭建jenkins环境并自动关联打包好的工程jar进行自动发布

Software testing

Compiling principle: the king's way

软件测试鸾音鹤信
![[repair collection function, update login interface] knowledge payment applet, blog applet, full version open source code, resource realization applet, with 299 whole station resource data](/img/77/328bd10e97d1d78708464c5d59153a.png)
[repair collection function, update login interface] knowledge payment applet, blog applet, full version open source code, resource realization applet, with 299 whole station resource data
随机推荐
jsp学习部分
【工控老马】西门子PLC s7-300SCL编程详解
Improvement direction of programming ability
SQL Server 开启cdc
js:Array.reduce累加计算、合并数组
在iframe标签中操作外层dom
【工控老马】基于西门子S7-200PLC的跑马灯控制系统的设计方案详解
【工控老马】单片机与西门子S7-200通信原理详解
Detailed explanation of route (Jiuyang Scripture)
How to share the virtual environment of pycharm to jupyter Lab
AC自动机
从Nacos客户端谈Nacos配置中心
Vulnhub's dc6 target
【深度之眼吴恩达第四期作业班】多元线性回归Linear Regression with multiple variables总结
Time operation - time format conversion
Explanation of swing transformer theory
Detailed explanation of top and free commands
MongoDB-使用mongo/mongosh命令行连接数据库
JS XOR obfuscation code
Common MySQL errors and solutions summarized painstakingly (II)