当前位置:网站首页>ROS2下使用ROS1 bag的方法
ROS2下使用ROS1 bag的方法
2022-08-05 05:22:00 【howtoloveyou】
- Galactic版本以上不适用的方法:
要求:同时拥有ROS1和ROS2
sudo apt install ros-<ros2-version>-rosbag2 ros-<ros2-version>-rosbag2*
source /opt/ros/<ros1-version>/setup.bash # eg: source /opt/ros/noetic/setup.bash
source /opt/ros/<ros2-version>/setup.bash # eg: source /opt/ros/foxy/setup.bash
ros2 bag info -s rosbag_v2 path/to/ros1bag.bag # eg: ros2 bag play -s rosbag_v2 ~/slam-dataset/rgbd.bag
ros2 bag play -s rosbag_v2 path/to/ros1bag.bag # eg: ros2 bag play -s rosbag_v2 ~/slam-dataset/rgbd.bag
- ROS2版本均适用的方法:
要求:了解topic在ROS2中的正确格式
pip install rosbags
rosbags-convert path/to/ros1bag.bag # eg: rosbags-convert ~/slam-dataset/rgbd.bag
# 会在bag目录下生成ROS2格式的bag文件夹
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp # 默认的fastrtps中间件无法监听话题
ros2 bag play path/to/ros1bag # eg: rosbags-convert ~/slam-dataset/rgbd
转化过后可能会报错有的话题找不到正确的格式,所以需要自己对生成的metadata.yaml进行手动修改,比如我对tf这个话题进行了修改:tf/msg/tfMessage to tf2_msgs/msg/TFMessage
边栏推荐
- 【Machine Learning】1 Univariate Linear Regression
- 监控系统的内卷,有什么讲究?
- Hugo搭建个人博客
- CIPU, what impact does it have on the cloud computing industry?
- Call the TensorFlow Objection Detection API for object detection and save the detection results locally
- [Day6] File system permission management, file special permissions, hidden attributes
- I/O performance and reliability
- 网络层协议介绍
- spark source code - task submission process - 5-CoarseGrainedExecutorBackend
- The problem of redirecting to the home page when visiting a new page in dsf5.0
猜你喜欢
随机推荐
spark source code-RPC communication mechanism
vim的三种模式
Quick question and quick answer - FAQ of Tencent Cloud Server
Dsf5.0 bounced points determine not return a value
Getting Started 04 When a task depends on another task, it needs to be executed in sequence
NAT实验
Hard Disk Partitioning and Permanent Mounting
传输层协议(TCP3次握手)
微信小程序页面跳转传参
Getting Started 05 Using cb() to indicate that the current task is complete
[Day1] (Super detailed steps) Build a soft RAID disk array
NIO works is analysed
入门文档09 独立的watch
Introductory document 05-2 use return instructions the current task has been completed
618,你也许可以清醒亿点点
Insight into the general trend of the Internet, after reading this article, you will have a thorough understanding of Chinese domain names
Cloud computing - osi seven layers and TCP\IP protocol
Small example of regular expression--validate email address
spark source code - task submission process - 3-ApplicationMaster
js动态获取屏幕宽高度







![[Day1] (Super detailed steps) Build a soft RAID disk array](/img/40/cda8e5522c2795e03c0d47e8a689f8.png)

