鱼香ROS社区
    • 版块
    • 最新
    • 未解决
    • 已解决
    • 群组
    • 注册
    • 登录
    紧急通知:禁止一切关于政治&VPN翻墙等话题,发现相关帖子会立马删除封号
    提问前必看的发帖注意事项: 社区问答规则(小鱼个人)更新 | 高质量帖子发布指南

    ros2要怎么从指定时间开始回放bag

    已定时 已固定 已锁定 已移动
    ROS 2相关问题
    ros2-foxy 回放数据
    3
    5
    1.3k
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • 32023198723
      TheNeverLemon
      最后由 编辑

      我想要像rosbag play -s一样从指定时间回放bag在ros2中要怎么做呢

      小鱼小 1 条回复 最后回复 回复 引用 0
      • 小鱼小
        小鱼 技术大佬 @3202319872
        最后由 编辑

        @小伊 在 ros2要怎么从指定时间开始回放bag 中说:

        像rosbag play -s一样从指定时间回放bag在ros2中要怎么做呢

        新书配套视频:https://www.bilibili.com/video/BV1GW42197Ck/

        32023198723 1 条回复 最后回复 回复 引用 0
        • 小伊小
          机器人小伊
          最后由 编辑

          在ROS 2中,可以使用以下命令从指定时间开始回放bag文件:

          ros2 bag play --start <start_time> <bag_file>
          

          其中,<start_time>是回放的起始时间,格式为YYYY-MM-DD-HH:MM:SS,例如2022-02-20-10:30:00,<bag_file>是要回放的bag文件名。

          此外,还可以使用-s或--seek选项在回放过程中跳转到指定时间:

          ros2 bag play --seek <seek_time> <bag_file>
          

          其中,<seek_time>是要跳转到的时间,同样需要指定格式。

          需要注意的是,ROS 2中的ros2 bag命令行工具与ROS 1中的rosbag工具略有不同,需要使用ros2关键字调用,而不是直接使用rosbag命令。


          以上为生成回答,仅供参考~

          我是小伊,已接入ChatGpt,所有回复,仅供参考~

          1 条回复 最后回复 回复 引用 0
          • 32023198723
            TheNeverLemon @小鱼
            最后由 编辑

            @小鱼 9fe80b71-baa5-497d-b59f-77c2507dc13e-图片.png
            根据他反馈给我的命令运行是错误的,去掉时间就会显示--start和--seek是为识别参数。带上时间就会把时间当作文件然后显示找不到文件

            1 条回复 最后回复 回复 引用 0
            • 小伊小
              机器人小伊
              最后由 编辑

              It seems that there might be an issue with the command provided by "小鱼" for installing ROS. It's possible that the command may not be compatible with the user's system or may have some syntax errors.

              If the command is not working as expected, the user can try searching for alternative ways to install ROS, such as following the official installation instructions provided on the ROS website.

              As for the specific error mentioned, it's not clear what command the user is referring to or what they are trying to achieve. Without more information, it's difficult to provide specific guidance on how to resolve the issue.


              以上为生成回答,仅供参考~

              我是小伊,已接入ChatGpt,所有回复,仅供参考~

              1 条回复 最后回复 回复 引用 0
              • 第一个帖子
                最后一个帖子
              皖ICP备16016415号-7
              Powered by NodeBB | 鱼香ROS