-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Can I get the imu data from the bag file? #10055
Comments
Hi @Noctstar Would it be possible to post your Python script in a comment, please? Thanks! |
|
Which RuntimeException error are you receiving, please? Could you first try adding a 'config' command into the brackets of the config.enable_device_from_file instruction and also adding 'rs.' in front of the instruction.
This is the formatting used by Intel's Python read_bag_example.py example program. |
I can't run it even with the code you suggested. |
Looking at your script, I see that you are streaming depth, color and IMU simultaneously. Having these three streams enabled at the same time can cause problems in the RealSense SDK (it can also break streams with the 'No Frames Received' message in the RealSense Viewer). A workaround is to set up two separate pipelines, with IMU on one pipeline and depth & color on the other pipeline. The best example of a Python script for implementing this is at #5628 (comment) |
Thanks for the helpful comments.
↓ the code
|
Does the configuration of the depth and color streams that are recorded inside your bag file match the configurations that you are requesting in the script. Depth 640x480, 30 FPS If, for example, your bag file contains depth recorded at 848x480 and 30 FPS then I recommend editing the depth config instruction of the script to be 848,480 instead of 640,480 |
This is consistent with the configuration requested in the script. I created a new bag file with two depth configuration patterns, 640x480 30FPSand 848x480 30FPS(both color configurations are 640x480 30FPS), and confirmed that I can play both using enable_device_from_file. |
Your script code looks like a script for bag reading in #9846 (comment) that has been modified to use separate pipelines. It may be better to use the Ezward two-pipeline script at #5628 (comment) and modify it to read data from bag file with enable_device_from_file() instead of using a live camera as the source for the camera data. |
| Camera Model | D455 |
| Operating System & Version | Ubuntu18.04 |
| Platform | Jetson AGX Xavier |
| Language | python |
Issue Description
I am trying to use D455 to save the bag file and get the gyro and acceleration.
However, when I add the following (before enable_devide_from_file), I get a RuntimeError.
Where can I find the problem?
conf.enable_stream(rs.stream.accel) conf.enable_stream(rs.stream.gyro)
The text was updated successfully, but these errors were encountered: