-
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
about rs-pointcloud crashed #9584
Comments
Hi @zma69650 If you are adapting RealSense SDK example programs then that may not be the best way to learn about building a project that you have created yourself. This is because the set of SDK examples use a build process that is different from the way in which a program that you have built yourself from the beginnning would be compiled. Basically, if one of the example programs is modified then you can go to the librealsense SDK's build folder and input a make command. This rebuilds only what has been changed instead of rebuilding the entire SDK. A RealSense user who commented on the above case later posted their own guide to the example rebuilding process. When you feel ready to start creating your own RealSense project in Visual Studio, a RealSense community member has created a guide to setting up a Visual Studio project with the three RealSense props files provided in the SDK folder. https://github.com/EduardoWang/visual-studio-real-sense-record-and-playback-project |
In regard to your code, I cannot see anything obviously wrong with your custom stream configuration process. You have set up the cfg definition, correctly formatted the cfg.enable_stream lines (which will generate both a depth and color stream) and then placed 'cfg' in the brackets of the pipe start instruction so that the program will use your custom configuration. In regard to your modification of rs-post-processing, would it be possible to paste your modified script in a comment below so that I can chck the code please? |
Thank you for your reply@MartyG-RealSense In order to color the point cloud, I set a color flow. Similarly, I defined a queue for storing pictures, and added pictures to the queue when the thread reads data.
} ‘’‘ |
I note that in your script you are requesting streams of resolution 640, 0. This is an invalid resolution request because that resolution is not supported by the RealSense SDK. They should be 640, 480. |
Thank you for your reply@MartyG-RealSense https://dev.intelrealsense.com/docs/api-how-to I am learning the API of realsense. The example of Do Processing on a Background-Thread has a line of code 'rs2::depth_frame frame'; but I wrote it like this but an error occurred: there is no default constructor. |
Did you use the background thread example as a standalone test script or incorporate it into your own script, please? If you adapted it into your own script then there is the potential for the { and } brackets to introduce errors, because if there are too few or too many of these brackets added (or the brackets are inserted into the script in the wrong place) then it can break the code in other parts of the script. The similar C++ example in the SDK's Frame Buffering Management documentation may be easier to use. |
Thank you for your reply@MartyG-RealSense I use the background thread example as an independent test script, can I convert rs::frame to rs::depth_frame? |
The link below discusses converting rs2::frame into rs2::depth_frame. |
Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):
All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)
Issue Description
I am using rs-pointcloud provided by realsense. But when I added my own code, the program crashed.I just added the following code to read the data.
‘’‘
rs2::config cfg;
//// Use a configuration object to request only depth from the pipeline
cfg.enable_stream(RS2_STREAM_DEPTH, 640, 480, RS2_FORMAT_Z16, 30);
cfg.enable_stream(RS2_STREAM_COLOR, 640, 480, RS2_FORMAT_BGR8, 30);
// Start streaming with default recommended configuration
pipe.start(cfg);
’‘’
I also use rs-post-processing. When I color the point cloud according to the rs-pointcloud method, the program cannot display the screen. Is this a problem with my approach or is this program not able to perform coloring?
The text was updated successfully, but these errors were encountered: