当前位置:网站首页>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
边栏推荐
- 618, you may be able to wake up a little bit
- Small example of regular expression--validate email address
- spark operator-textFile operator
- 硬盘分区和永久挂载
- Spark source code - task submission process - 6-sparkContext initialization
- What impact does CIPU have on the cloud computing industry?
- wc、grep、tar、vi/vim
- 7 steps to complete cloud monitoring
- 入门文档06 向流(stream)中添加文件
- Technology Sharing Miscellaneous Technologies
猜你喜欢

硬盘分区和永久挂载

What are some things that you only know when you do operation and maintenance?

NIO works is analysed

Introductory document 05-2 use return instructions the current task has been completed

lvm logical volume and disk quota

深度 Zabbix 使用指南——来自惨绿少年

Cloud computing - osi seven layers and TCP\IP protocol

Account and Permission Management

The highlight moment of operation and maintenance starts with intelligence

网络不通?服务丢包?看这篇就够了
随机推荐
vim教程:vimtutor
VLAN details and experiments
增长:IT运维发展趋势报告
VRRP概述及实验
正则表达式小实例--验证邮箱地址
TCP/IP four-layer model
Spark source code-task submission process-6.2-sparkContext initialization-TaskScheduler task scheduler
The problem come from line screening process
网络不通?服务丢包?看这篇就够了
618,你也许可以清醒亿点点
路由器和静态路由的配置
dsf5.0 弹框点确定没有返回值的问题
spark source code - task submission process - 3-ApplicationMaster
OpenCV3.0 is compatible with VS2010 and VS2013
时间复杂度和空间复杂度
The highlight moment of operation and maintenance starts with intelligence
IP packet format (ICMP protocol and ARP protocol)
Getting Started 03 Distinguish between development and production environments ("hot update" is performed only in the production environment)
Growth: IT Operations Trends Report
入门文档12 webserve + 热更新