PointCloudLibrary / PointCloudLibrary/pcl
[io] Check for IR stream capability before creating it in `real_sense_2_grabber` for D415
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 4.7k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 6
Description
Describe the bug
When trying to obtain point clouds from the Intel RealSense D415, in RealSense2Grabber::start(), I get an exception that "Stream is not supported." This comes from the check here. Specifically, when checking the RS2_STREAM_INFRARED stream, realsense throws a runtime error (rs_pipeline.hpp L69), since the D415 has no infrared stream.
Environment
- OS: Windows 10
- Compiler: cl 19.24.28314
- PCL Version: 1.10.0
I am able to circumvent the issue by simply taking out the RS2_STREAM_INFRARED line, and everything works successfully (this is obviously not a general enough solution:
if ( prof.get_stream ( RS2_STREAM_COLOR ).format ( ) != RS2_FORMAT_RGB8 ||
prof.get_stream ( RS2_STREAM_DEPTH ).format ( ) != RS2_FORMAT_Z16)
THROW_IO_EXCEPTION ( "This stream type or format not supported." );
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in io/src/real_sense_2_grabber.cpp around the check linked in RealSense2Grabber::start(), and inspect how RS2_STREAM_INFRARED is requested. Reproduce the D415 failure if possible, then verify stream capability before creating or validating that stream. Done means a D415 can start without the “Stream is not supported” exception while supported color and depth streams remain validated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100