Skip to content

ros2 bag play error on windows foxy - [rosbag2_transport]: Failed to play: cannot get file size #175

@karthiknit1

Description

@karthiknit1

when there is only rosbag2_2021_09_27-09_11_59.db3 file and no metadata.yaml file, when I tried to play the bag file using the command "ros2 bag play rosbag2_2021_09_27-09_11_59.db3", the following error is encountered in ROS 2 Foxy terminal on windows.

[ERROR] [1652675142.815790900] [rosbag2_transport]: Failed to play: cannot get file size: The file pointer cannot be set on the specified device or file.

As per the discussion here, this is an issue in rcpputils package - ros2/rosbag2#1019.

This issue is seen happening only with larger bag files.

Expected Behavior
Bag file should be played successfully.

Actual Behavior
ros2 bag play rosbag2_2021_09_27-09_11_59.db3
ros2 bag info rosbag2_2021_09_27-09_11_59.db3
Both the above commands are leading to the below error on windows only:
[ERROR] [1652675142.815790900] [rosbag2_transport]: Failed to play: cannot get file size: The file pointer cannot be set on the specified device or file.

To Reproduce
** Steps to reproduce the behavior, e.g.

record a bag file.(around 8GB) in ROS 2 Foxy terminal.
play the bag using "ros2 bag play bagFileName". Here instead of bag folder, provide bag file name(.db3)
System (please complete the following information)
OS: Windows
ROS 2 Distro: Foxy
Version: Installed binary of latest Foxy

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions