Closed FancyBrush closed 4 years ago
If you are using Windows 10 then there is a pre-built executable version of this example in the SDK folder so that it does not have to be compiled. Its folder location on Windows should be:
C: > Program Files (x86) > Intel RealSense SDK 2.0 > Tools
and the filename is rs-record-playback.
Guidance about methods for setting up the RealSense dependencies in your own project can be found in the link below:
Hi @FancyBrush You are going about CMake wrong - instead of running CMake on individual CMakeList.txt files, you need to run CMake on the top level one to general single solution for the SDK. At that level, you can enable / disable wrappers and everything should be building no problem
Thank you for your suggestion!
@FancyBrush I believe what is being referred to by @dorodnic is building Librealsense with CMake, and using 'flags' in the build instruction to specify exactly which features you want to include ('true') and which you want to not be included in the build ('false').
A list of the CMake build customization flags can be found here:
https://github.com/IntelRealSense/librealsense/wiki/Build-Configuration
If you scroll down the list, you can see references to flags about building 'bindings'. This refers to adding specific types of wrapper to your Librealsense build (Python, MATLAB, C#, NodeJS, etc).
Re-reading your original question though, it looks as though you decided not to use the MATLAB wrapper and to use C++ instead. So you should not need to add a wrapper if you only want to program in C++.
So, the first step then would be to build the basic RealSense SDK with support enabled for examples. It would be a good idea to add support for "graphical" examples at the same time (programs such as RealSense Viewer and Depth Quality Tool that use OpenGL graphics). So the basic CMake build instruction to build the Librealsense SDK with examples support may be like this:
cmake ../ -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true
If you did decide later to build Librealsense with the MATLAB wrapper included then the CMake installation instruction may look like this:
cmake ../ -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true -DBUILD_MATLAB_BINDINGS=true
You only need to include a particular flag in your CMake instruction if you need a feature that is not installed by default (make it 'True' instead of 'False') or there is a function that is enabled by default and and you want to make sure that it is not enabled (make it 'False' instead of 'True'). For this reason, most peoples' CMake instructions only need to have two or three flags in them.
An example of this is a computer system that does not have a monitor screen (known as "headless"). In that case, the person doing the installation may want to set 'BUILD_GRAPHICAL_EXAMPLES' to False because the lack of a monitor means that they do not need to install support for graphical programs such as the RealSense Viewer.
Thank you! I will try to CMake another time.
Also, if you don't want to deal with CMake, you can install the SDK (from Releases page here). It comes with most examples already pre-build, as well as clean Visual Studio SLN that does not require CMake.
@dorodnic Thank you for your suggestion. I tried pre-build rs-record-playback.exe. But I'm so sad that whenever I press "record" button, the program crash and the window disappear.
It is trying to write near the executable, probably permission issue with program files. You can try copying the folder to my documents or some place else it can write to
Sent with GitHawk
This case will be closed after 7 days from the date of writing this if there are no further responses. Thanks!
OS: windows 10 VS: 2019 community device: SR300 CMake: 3.17 Very grateful for attention :
try saving bag file with a C++ example. Here is the detailed procedure I went through :
Then I build "RealsenseExamplesRecord-Playback.sln", but receive LINK errors: I think I did not miss head and library files, maybe it is that the problem?
Thank you in advance !