RealSenseRecorder.cpp fails to start UI due to empty frame
- Dominant language
- C++
- Stars
- 14k
- Forks
- 2.6k
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 6
Description
**Describe the bug**
When running `examples/cpp/RealSenseRecorder.cpp` with L515 camera` rs.CaptureFrame(true, align_streams).ToLegacyRGBDImage(); ` returns an empty image of dimensions 0x0.
Therefore the UI fails with:
```
terminate called after throwing an instance of 'std::runtime_error'
what(): [Open3D Error] (int main(int, char**)) /home/pointclouduser/Documents/Open3D/examples/cpp/RealSenseRecorder.cpp:180: Window creation failed!
[Open3D WARNING] GLFW Error: Invalid window size 0x0
[Open3D WARNING] Failed to create window
```
The camera is working with the realsense-viewer like charm and is detected.
**To Reproduce**
run `RealSenseRecorder.cpp` with options `-V --config examples/test_data/rs_default_config.json`
**Expected behavior**
Visualizing the sensor streams without an error.
**Screenshots**
full output:
```
[Open3D DEBUG] RS2_FORMAT_ANY -> ANY
[Open3D DEBUG] RS2_FORMAT_ANY -> ANY
[Open3D INFO] [0] Intel RealSense L515: f0246296
[Open3D INFO] depth_fps: [30]
[Open3D INFO] depth_resolution: [1024,768 | 320,240 | 640,480]
[Open3D INFO] depth_format: [RS2_FORMAT_Z16]
[Open3D INFO] color_fps: [15 | 30 | 6 | 60]
[Open3D INFO] visual_preset: [RS2_L500_VISUAL_PRESET_CUSTOM | RS2_L500_VISUAL_PRESET_DEFAULT | RS2_L500_VISUAL_PRESET_LOW_AMBIENT | RS2_L500_VISUAL_PRESET_MAX_RANGE | RS2_L500_VISUAL_PRESET_NO_AMBIENT | RS2_L500_VISUAL_PRESET_SHORT_RANGE]
[Open3D INFO] color_resolution: [1280,720 | 1920,1080 | 640,360 | 640,480 | 960,540]
[Open3D INFO] color_format: [RS2_FORMAT_BGR8 | RS2_FORMAT_BGRA8 | RS2_FORMAT_RGB8 | RS2_FORMAT_RGBA8 | RS2_FORMAT_Y16 | RS2_FORMAT_YUYV]
[Open3D INFO] Open3D only supports synchronized color and depth capture (color_fps = depth_fps).
[Open3D DEBUG] RS2_FORMAT_ANY -> ANY
[Open3D DEBUG] RS2_FORMAT_ANY -> ANY
[Open3D DEBUG] RS2_VISUAL_PRESET_DEFAULT -> Default
[Open3D INFO] {
"color_format" : "RGB8",
"depth_format" : "Z16",
"depth_scale" : 3999.999755859375,
"device_name" : "Intel RealSense L515",
"fps" : 30.0,
"height" : 720,
"intrinsic_matrix" :
[
907.80670166015625,
0.0,
0.0,
0.0,
908.43914794921875,
0.0,
636.9954833984375,
345.21963500976562,
1.0
],
"serial_number" : "f0246296",
"stream_length_usec" : 0,
"width" : 1280
}
[Open3D INFO] In the visulizer window, press [ESC] to exit.
[Open3D INFO] Capture started with RealSense camera f0246296
[Open3D DEBUG] GLFW init.
terminate called after throwing an instance of 'std::runtime_error'
what(): [Open3D Error] (int main(int, char**)) /home/pointclouduser/Documents/Open3D/examples/cpp/RealSenseRecorder.cpp:180: Window creation failed!
[Open3D WARNING] GLFW Error: Invalid window size 0x0
[Open3D WARNING] Failed to create window
Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
```
**Environment:**
- Operating system:Ubuntu 18.04
- Open3D version: 76c2baf9debd460900f056a9b51e9a80de9c0e64
- Is this remote workstation?: no
- How did you install Open3D?: build from source with cuda, tf_ops, torch_ops, open3d_ml
- Compiler version: gcc 9.4.0
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.