Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to play rosbag with pyrealsense but get the error: Invalid file format, file does not contain topic "/file_version #7825

Closed
zeidlitz opened this issue Nov 20, 2020 · 2 comments
Labels

Comments

@zeidlitz
Copy link

Hello! I've recorded a rosbag using the intel realsense depth camera D455. I'm playing the rosbag in one terminal on loop and trying to initialize a pyrealsense2 pipeline but I get the following error:

RunTimeError: Failed to resolve request. Request to enable_device_from_file("testBag.bag") was invalid, Reason: Failed to create ros reader: Invalid file fromat, file does not contain topic "/file_version" nor "/FILE_VERSION"

Here's a code snippit from where the error occours:

import rospy
import cv2
import pyrealsense2 as rs
from sensor_msg.msg import Image
from cv_bridge import CvBridge

def process_image(msg):
    pipeline = rs.pipeline()
    cfg = rs.config()
    cfg.enable_device_from_file("testBag.bag")
    profile = pipeline.start(cfg)

Thanks in advance for any help I can get!

@MartyG-RealSense
Copy link
Collaborator

Hi @IcookTacos If you recorded the rosbag in a ROS terminal then it may not be entirely compatible with being read by the RealSense SDK (librealsense). The reasons for this are described in the discussion in the link below, which is about a RealSense Python user who experienced the same error.

#3020

@zeidlitz
Copy link
Author

Thanks for the response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants