PST SDK  5.1.0.0-e242fa9
Install and Redistribute

Windows

Note
By choosing to install the PST SDK, the PST Interface Service will not be installed as a Windows service. This mean that it will not be possible to start the PST-Client application without first starting the PST-Server application manually from the Windows Start menu. This is done because running an application using the PST SDK while the PST Interface Service is running at the same time can cause conflicts.

There are two different Windows installers available. One installs the 32 bit (x86) version of the PST Software Suite and the other one installs the 64 bit (x64) version of the PST Software Suite. Choose which one to use based on the platform you are developing for.

The PST SDK is installed by selecting the SDK component from the PST installer. This will create a Development directory inside the installation directory. The Development directory is structured as follows:

  • debug_no_redist: Debug versions of the files in the Redist directory. Please do not redistribute those files.
  • docs: This documentation.
  • Drivers: The drivers required to connect to the different types of PST Trackers.
    • PST: The driver used for the standard PST Iris and PST Base trackers.
    • PST-HD: The driver used for the PST Iris HD, PST Base HD and PST Pico trackers.
  • examples: Several examples explaining how to use the PST SDK.
  • include: The header files needed to work with the C++ API.
  • lib: The lib file needed to link to the C++ API.
  • Redist: The dll files and miscellaneous files required to run an application that is using the C++ API.

In order to start working with the PST SDK, create a Visual Studio (2015 or newer) project and add the include directory to the include path. Add the pstsdk.lib file to the linker dependencies and Visual studio should be able to find the C++ API and use it. In order to run an application that is linked to the PST SDK, copy the required files from the Development\Redist directory to the location of the application.

Redistribution on Windows

Windows Installer

Redistribution of the PST SDK can be done in two ways. The first one is by redistributing the complete PST installer application. This way, an end user will get all the required components automatically, but it is likely that the package contains components that are unnecessary to make the end-user application work.

Windows Files

The second way of redistribution is to package a copy of the required files together with the installer of the end-user application. This way only the files that are necessary for the specific use case of the end-user application will be redistributed, lowering the overhead. Depending on which PST Tracker is used, a different set of files will need to be redistributed. The table below shows which files need to be redistributed in which use case.

  • The mandatory files should always be redistributed in order to make the PST SDK work.
  • The PST files are only necessary when making use of a standard PST Iris or PST Base tracker.
  • The PST HD files are only necessary when making use of a PST Iris HD, a PST Base HD or a PST Pico tracker.
  • The PST-Client files are only necessary if the end-user application should be used in combination with the PST-Client application. This would for example be the case if the PST-Client is used for tracker initialization and tracking target training.
  • The PST REST Server executable is only necessary if the end-user application should be used in combination with the stand-alone PST REST Server.
File Mandatory PST PST HD PST-Client PST REST Server
libcurl.dll X
pst-client.exe X
pst-rest.exe X
V3D.dll X
Development\Redist\baslercameraplugin.dll X
Development\Redist\basler_ace.xml X (HD only)
Development\Redist\basler_dart.xml X (Pico only)
Development\Redist\CameraLibrary2015D.dll1 X
Development\Redist\Freeimage.dll X
Development\Redist\GCBase_MD_VC141_v3_1_Basler_pylon.dll X
Development\Redist\GenApi_MD_VC141_v3_1_Basler_pylon.dll X
Development\Redist\iris120cameraplugin.dll X
Development\Redist\iris_120.xml X
Development\Redist\Log_MD_VC141_v3_1_Basler_pylon.dll X
Development\Redist\MathParser_MD_VC141_v3_1_Basler_pylon.dll X
Development\Redist\nlopt-0.dll2 X
Development\Redist\NodeMapData_MD_VC141_v3_1_Basler_pylon.dll X
Development\Redist\PocoFoundation.dll X
Development\Redist\PocoJSON.dll X
Development\Redist\PocoNet.dll X
Development\Redist\pstsdk.dll X
Development\Redist\PylonBase_v6_0.dll X
Development\Redist\PylonUsb_v6_0_TL.dll X
Development\Redist\uxapi_v11.dll X
Development\Redist\XmlParser_MD_VC141_v3_1_Basler_pylon.dll X

1Called CameraLibrary2015x64D.dll for the 64 bit version.
2Called nlopt.dll for the 64 bit version.

Windows Drivers

Depending on which PST Tracker will be used in the end-user application, a different driver will need to be installed on the end-user machine.

For the standard PST Iris or PST Base, the files located in the Development\Drivers\PST directory should be used. Depending on the target operating system, the following commands can be used to install the driver:

  • For a 64bit OS: dpinst64.exe /c /f /sw /PATH npusbio_x64
  • For a 32bit OS: dpinst32.exe /c /f /sw /PATH npusbio (only available in the 32 bit installer)

For the PST Iris HD, the PST Base HD and the PST Pico, the pylon_USB_Camera_Driver.msi file located in the Development\Drivers\PST-HD directory should be used. Executing this installer package will automatically install the required driver for the PST HD and Pico Trackers.

Linux

The situation described above holds for the Windows version of the PST Software Suite. For Linux, installation and redistribution works slightly different. The Linux PST Software Suite is installed using a Debian installer package that installs the full PST Software Suite, including the PST SDK. After installing the package, the PST Software Suite can be found at /opt/ps-tech/pst.

The PST SDK can be found at /opt/ps-tech/pst/Development, which is structured as follows:

  • debug_no_redist: Debug versions of the files in the Redist directory. Please do not redistribute those files.
  • docs: This documentation.
  • Drivers/PST-HD: Configuration scripts to enable communication with the PST Iris HD, PST Base HD and PST Pico trackers.
  • examples: Several examples explaining how to use the PST SDK.
  • include: The header files needed to work with the C++ API.
  • Redist: The shared libraries and miscellaneous files required to run an application that is using the C++ API.
Note
When running the pst-server or any application implementing the PST SDK on Linux, remember to explicitly supply the specific camera configuration that needs to be used. When running the software with the PST HD or PST Base HD, use basler_ace as an argument. When running the software with the PST Pico, use basler_dart as an argument. When running debug versions of the software, use basler_ace_d or basler_dart_d. Without an explicit camera configuration, the software will try to connect to a PST Iris HD or PST Base HD and fail otherwise. Take a look at the examples cpp files and Makefiles to get more information.

In order to start working with the PST SDK, create a Makefile for your project comparable to the ones found in the examples directory. Supply the linker with an rpath in order to point your executable to the location of the shared libraries (-Wl,-rpath=/opt/ps-tech/pst/Development/Redist for release builds, -Wl,-rpath=/opt/ps-tech/pst/Development/debug_no_redist for debug builds). Link your executable to libpstsdk using -lpstsdk for release builds and -lpstsdkD for debug builds. Copy the appropriate camera configuration XML file from the Redist or debug_no_redist directory to the working directory of the executable in order to be able to connect to the PST. It might be necessary to change the path on line 5 of the XML file to the directory containing the libbaslercameraplugin.so file.

Redistribution on Linux

Linux Installer

Like on Windows, redistribution can be done by redistributing the full PST Software Suite together with the end-user application. When the rpath is correctly set the end-user application, there should be no issues locating the required shared libraries. It will probably only be necessary to install the correct XML camera configuration file into the installation directory of the end-user application. However, this way of installation most likely installs many components that are not necessary in order to use the end-user application.

Linux Files

The second way of redistribution is to package a copy of the required files together with the installer of the end-user application. This way only the files that are necessary for the specific use case of the end-user application will be redistributed, lowering the overhead. The table below shows which files need to be redistributed in which use case.

  • The mandatory files should always be redistributed in order to make the PST SDK work and be able to connect to the PST Iris HD, Base HD or Pico.
  • The PST-Client files are only necessary if the end-user application should be used in combination with the PST-Client application. This would for example be the case if the PST-Client is used for tracker initialization and tracking target training.
  • The PST REST Server executable is only necessary if the end-user application should be used in combination with the stand-alone PST REST Server.
File Mandatory PST-Client PST REST Server
pst-client and pst-client-<version> X
pst-rest and pst-rest-<version> X
lib/libV3D.so X
Development/Redist/baslercameraplugin.so.<version> X
Development/Redist/basler_ace.xml X (HD only)
Development/Redist/basler_dart.xml X (Pico only)
Development/Redist/libfreeimage-3.18.0.so X
Development/Redist/libGCBase_gcc_v3_1_Basler_pylon.so X
Development/Redist/libGenApi_gcc_v3_1_Basler_pylon.so X
Development/Redist/libLog_gcc_v3_1_Basler_pylon.so X
Development/Redist/libMathParser_gcc_v3_1_Basler_pylon.so X
Development/Redist/libnlopt.so.0 X
Development/Redist/libNodeMapData_gcc_v3_1_Basler_pylon.so X
Development/Redist/libpstsdk.so.<version> X
Development/Redist/libpylonbase-5.2.0.so X
Development/Redist/libpylon_TL_usb-5.2.0.so X
Development/Redist/libuxapi-5.2.0.so X
Development/Redist/libXmlParser_gcc_v3_1_Basler_pylon.so X
Development/Redist/pylon-libusb-1.0.so X

For the files that include a <version> tag, use the file that includes the full version number or distribute all files with the same name (e.g. libpstlib.so, libpstlib.so.5 and libpstlib.so.5.0.2). The files without version number are symbolic links to the file including the version number.

Linux Driver

The PST tracker requires camera drivers in order to operate. The script required to configure the system to work with the cameras can be found in the /opt/ps-tech/pst/Development/Drivers/PST-HD directory. Run the setup-usb.sh script in order to configure the system. When applying the configuration from a different directory than the PST Software Suite installation directory, adjust the setup-usb.sh script to reflect the correct paths. This script can also be used as a postinst script when creating a Debian installer package.