Index:

  • Prerquisites
  • Generating and building project
  • Building Wrappers – C# and Python
  • Locating DLLs and Python Libraries

 

Prerequisites


The software listed below should be installed prior to starting this process:

  • FRAMOS Software package (LINK to download)
  • Cmake > Link to Website
  • MS Visual Studio Integrated Development Environment (IDE)  
  • Gitclient: eg. Tortoise GIT, Smartgit, etc.

 

INFORMATION : Copy the SDK source files to another directory for building process that is writeable. Compiling them from their default  “Program files” directory will cause errors during the build process as this folder is not writeable.

Source Path to copy: C:\Program Files\FRAMOS\librealsense2

 

Generating and Building Project


Start the CMAKE application and input the paths for the source code and build folders. For example:

  • Source code folder: C:/Users/<your_windows_user>/Documents/librealsense2/src
  • Build folder: C:/Users/<your_windows_user>/Documents/librealsense2/Build/

The picture below shows an example with the paths already inputted in the corresponding fields:

 

Notice that for the case in which the “Where to build the binaries” folder does not exist, the CMAKE application will ask to create this folder.

Click on Configure to select which IDE is being used to create a project, select the type of platform, and then click Finish. This article describes how to create a project for MS Visual Studio 2017 for x64 platforms. 

 

Remove unneeded build flags before generating the project as shown below: 

  • Remove TM2 flag (useful for other types of cameras besides D400e)

 

  • Remove FW flag (additional firmware is provided for FRAMOS ethernet based cameras)

 

Add the path for the local installation: 

  • Define the installation folder using the CMAKE_INSTALL_PREFIX. For example, <YourPath>\librealsense2\build\install

Click on Generate. Once the project has been created, click on Open project. 

The following steps are specific to the MS Visual Studio IDE. If you are using another IDE, you will need to replicate the configuration setup described below as closely as possible.

With the IDE open to your new project, a selection dropdown list is presented for the desired build type:

  • Release: is the release version with no debug information
  • Debug: contains the debug information needed to step through the code
  • Additional configurations can be created, as needed, with different compile and link options



Once all configurations have been defined, build the complete project. Go to the right menu, select the ALL_BUILD option and then click on Build



Optional: To create and setup the install folder, select the INSTALL option and then click on Build.



After the build process is complete, go to the path you defined as Install folder and check to ensure that have the same folders listed below:


Building Wrappers - C# and Python

Go back to the CMAKE application and select the corresponding fields according to the instructions below.

  • Add C#.NET bindings by checking the BUILD_CSHARP_BINDINGS option
    1. Make sure your IDE has C++ components installed prior to building this wrapper

 

  • Add Python bindings by checking the BUILD_PYTHON_BINDINGS option

 

  1. The program will automatically search for the Python configuration that is defined in the system variables. In case there is more than one python version, please specify the path to the executable of the desired python version to use. 

 

Once all the selections have been made, rebuild the project following the steps in the previous section. 

Locating DLLs and Python Libraries


All the needed information can be found in installation directory of the FRAMOS Software package or in the newly created “Install” folder that was generated by the Install build process listed in the previously. Here the picture again



For C++/C#:

Within your software project, you will need to add references to where all the prerequisite include files (include folder path) and lib files (lib folder path) are stored. Additionally, place all needed DLLs and application executables inside bin folder . 

For Python:

Copy the Python libraries and DLLs, found under /bin folder[DB2] , into the same directory where the python scripts are running.