Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
60 Views

Trying to play rosbag with pyrealsense but get the error: Invalid file format, file does not [...]

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!

Labels (1)
0 Kudos
1 Reply
Highlighted
Moderator
30 Views

Hi,


Thanks for reaching out to us.

This forum primarily support queries related to issues with intel distribution of python. RealSense queries are not supported here. Please submit RealSense queries here: 

https://support.intelrealsense.com/hc/en-us/requests/new

We wouldn't be monitoring this thread further. Please feel free to raise a new thread in case of issues with Intel distribution of python.



Thanks.



0 Kudos