-
Notifications
You must be signed in to change notification settings - Fork 11
Sensor SDK User Guide for Windows
(https://github.com/QuanergySystems/quanergy_client/wiki/images/cover-win.png)
-
Sensor SDK User Guide for Windows
- 1. Getting Started
- 2. Accessing the SDK Build Instructions
- 3. Installing Prerequisite Software
- 4. Setting Environment Variables
- 5. Downloading the SDK
- 6. Installing OpenNI and OpenNI2 Libraries
- 7. Creating Solution Files
- 8. Preparing the Executable for Visualizing Data
- 9. Finding the Sensor’s IP Address
- 10. Visualizing Data
- 11. Troubleshooting
- 12. Using the Code
- Appendix 1: Connecting Without a Router
Revision History
Version | Date | What Changed |
---|---|---|
A | 10/12/2020 | Released for open-source. |
Open-source Ubuntu® is the operating system of choice for Quanergy products. However, the Quanergy LiDAR sensor system offers plenty of flexibility for setting up alternative computing environments for users who prefer a different platform.
Users who prefer collecting and visualizing LiDAR data via the Windows® 7 operating system can take the actions explained in this user guide to acquire and use Quanergy’s software development kit (SDK) to achieve a suitable computing environment.
NOTE: With this non-Ubuntu environment, users can visualize a basic point cloud, but cannot immediately manipulate it beyond rotating and zooming. However, to manipulate the data in more significant ways, users are welcome to write their own software solutions.
The Windows 7 computing environment must be:
- x86-64 architecture.
- Capable of initiating a TCP connection with the sensor.
The latest versions of essential Quanergy user guides are downloadable through these links:
-
M8™ Sensor User Guide — https://quanergy.desk.com/customer/portal/articles/2687038
-
S3™-1 and S3-2 User Guide — https://quanergy.desk.com/customer/portal/articles/2916055
-
Sensor SDK User Guide for Windows — https://quanergy.desk.com/customer/portal/articles/2688870
-
Q-View™ User Guide — https://quanergy.desk.com/customer/portal/articles/2717074
Other materials such as data sheets and other user guides are available through:
- Documents list — https://quanergy.desk.com/customer/portal/articles/2725667
Depending on how you acquired your sensor, you may need to purchase and/or request access to the SDK source code called quanergy_client
using this process:
-
Email your GitHub username to your support representative with the subject line Request GitHub SDK Access. While you await a response, continue to the next section.
-
After the details of your request are confirmed, and you have been given permission by email to access the SDK, refer to Figure 1 while you:
-
Log in to your account at https://github.com.
-
Navigate to https://github.com/QuanergySystems, where SDK clients are listed.
-
Accept the invitation to join QuanergySystems by clicking the View invitation button.
-
Click the Join QuanergySystems button in the confirmation window that appeared.
-
View a confirmation of your acceptance and the populated website.
- Select the
quanergy_client
item, as shown in Figure 1.
Figure 1. GitHub Quanergy Systems Private Repository
On the resulting QuanergySystems/quanergy_client page (Figure 2), you can see an upper list of sample source code packages and a lower list of OS-specific links to Build Instructions, which are associated with the latest release.
If you prefer other releases or recent pre-releases:
- Click the releases heading to see notes for each release.
- Click the branches drop-down menu to access a specific release listed there.
Figure 2. GitHub quanergy-client Source Code
- Determine which version you plan to use, and click its Build Instructions link (Figure 2):
- For Visual Studio 2015, select Windows 7 VS2015.
- For Visual Studio 2013, select Windows 7 VS2013.
The README page that opens offers the following:
-
Links to essential software.
-
Steps for installing prerequisite software and environment variables, downloading the source code, configuring the solution, building the code, and testing the build by visualizing the point cloud.
- Follow the steps listed there or continue in this user guide for a detailed approach.
In this section, two tested approaches for installing required software are shared:
- The “Newer VS 2015 Build,” starting below.
- The "Older VS 2013 Build,” starting on page 21.
NOTE: Whenever a computer window pops up to ask if you want to open an executable file or allow the app to make changes, click the Yes button.
Specific newer versions of various essential software packages were tested and proven to work well with Quanergy’s client-server model via Windows 7 64-bit. If you are missing any of the following four packages.
- Visual Studio 2015: Community Edition with Update 3, Visual C++ Installed (below)
- CMake Version 3.9.4 (see page 14)
- Windows SDK for Windows 8.1 (see page 16)
- PCL 1.8.0 All-In-One Installer MSVC2015 x64 (see page 18)
Install them in the order above, as instructed below, then update the environment variables as explained on page 28.
Visual Studio: Community 2015 is Microsoft’s integrated development environment (IDE) that enables the development of cross-platform solutions in native code and managed code formats. If you don’t already have it:
- Download Visual Studio 2015 as follows:
-
Navigate to the following URL in a web browser: https://www.visualstudio.com/vs/older-downloads
-
In the 2015 section near the top of the webpage, click the Download button (Figure 3 top).
-
If you don’t already have a free, perpetual subscription to the Dev Essentials program, a window appears where you can sign up and access the application (Figure 3 bottom).
-
This subscription gives you access to the older versions. Click the Download button for the Visual Studio Community 2015 with Update 3 (Figure 4).
Figure 3. New: VS 2015 Select 2015 Version (top), Subscribe Dev Essentials (bottom)
Figure 4. New: VS 2015 Download
-
Navigate to the computer’s Downloads folder where the
en_visual_studio_ community_2015_with_update_3_x86_x64_web_installer_8922963
file was saved, then double-click the file to launch it. -
The Visual Studio wizard displays a timer while initializing setup. When complete, the wizard offers several opportunities (Figure 5 left):
-
Confirm that the installation location filepath is:
C:\Program Files (x86)\Microsoft Visual Studio 14.0
-
Select the Custom type of installation, then leave all the options enabled that make sense. It’s especially important to enable C++.
-
Read the License Terms and Privacy Statement if you wish.
-
Click the Install button.
- The Visual Studio window displays Acquiring and Applying visual timers (not shown). Click the Launch button when the process is complete (Figure 5 right).
Figure 5. New: VS 2015 Destination, Installation, License/Privacy (left), Launch (right)
-
A Welcome window appears. Sign in or sign up for an account, or proceed without signing in by clicking the Not now, maybe later link (Figure 6 left).
-
A Start window appears where you select an environment from the Development Settings menu, select a color theme, then click the Start Visual Studio button (Figure 6 right).
-
Click the X button in the upper right corner to quit Visual Studio.
-
Continue to the next section to install the CMake application.
Figure 6. New: VS 2015 Welcome/Sign In (left), Setup/Start (right)
CMake Version 3.9.4 is an open-source, cross-platform suite of software tools for building, testing, and packaging software solution files that can be opened in Visual Studio. It supports complicated directory hierarchies and applications that rely on multiple libraries. If you don’t already have it:
-
Navigate to the following URL in a web browser (or click the CMake link in the GitHub Build Instructions) to automatically download the application: https://cmake.org/files/v3.9/cmake-3.9.4-win64-x64.msi
-
Navigate to the computer’s Downloads folder where the
cmake-3.9.4-win64-x64.msi
file has been saved, then double-click the file to launch the CMake Setup Wizard instructions for installing CMake. -
Click the Welcome window’s Next button (Figure 7 left).
-
Read through the licensing terms if you wish, and when you’re done check the I accept the terms... checkbox (Figure 7 right) and click the Next button.
Figure 7. New: CMake Welcome (left), License Agreement(right)
-
From the list of installation options that appears, select the second option Add CMake to the system PATH for all users, check the Create CMake Desktop Icon checkbox, and click the Next button (Figure 8 left).
-
In the Destination Folder window that appears, confirm or update the path for where all CMake-generated files will be stored, and click the Next button (Figure 8 right).
Figure 8. New: CMake System PATH (left), Destination Folder (right)
-
In the Ready to install CMake window, click the Install button (Figure 9 left).
-
When the installation has completed, select the Finish button (Figure 9 right).
Figure 9. New: Ready to Install CMake (left), Finish (right)
- Continue to the next section to install the Windows SDK for Windows 8.1.
The Windows Software Development Kit (SDK) for Windows 8.1 contains headers, libraries, and tools necessary for creating apps that run on the Windows OS. If you don’t already have it, install it as follows:
-
Navigate to the following URL in a web browser (or click the SDK link in the GitHub Build Instructions): https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk
-
On the web page, click the Install and download button (Figure 10).
Figure 10. New: Windows SDK Download
-
Navigate to the computer’s Downloads folder where the
sdksetup.exe
file has been saved, then double-click the file to launch it. -
In the Specify Location window that appears, accept the default installation path by clicking the Next button (Figure 11 left).
-
In the Join the Customer Experience Improvement Program (CEIP) window that appears, make your selections as preferred, and click the Next button (Figure 11 right).
Figure 11. New: Windows SDK Specify Location (left), CEIP (right)
-
In the License Agreement window that appears, click the Accept button (Figure 12 left).
-
In the Select the features... window that appears, accept defaults, and click the Install button (Figure 12 right).
-
The Installing Features window displays a visual timer, then displays a Welcome message when complete (Figure 12 bottom).
-
Click the window’s Close button (not shown).
Figure 12. New: Windows SDK License (left), Features (right), Welcome (bottom)
- Continue to the next section to install PCL 1.8.0.
PCL 1.8.0 All-In-One Installer MSVC2015 x64 is an installer for rapidly building a development environment for the open source point cloud library (PCL) of three-dimensional point cloud processing using pre-built binaries with Visual Studio 2015. If you don’t already have it:
-
Navigate to the following URL in a web browser (or click the PCL 1.8.0... link in the GitHub Build Instructions): http://unanancyowen.com/en/pcl18
-
On the page that appears, scroll down until you reach the Visual Studio 2015 section, as shown in Figure 13, and click the CL 1.8.0 All-in-one Installer MSVC2015 x64 item.
Figure 13. New: PCL 1.8.0 All In One Selection
-
You may need to sign into a Microsoft account and set up a OneDrive account.
-
Navigate to the computer’s Downloads folder where the
PCL-1.8.0-AllInOne-msvc2015-win64
executable file has been saved, then double-click the file to launch it. -
After the Welcome message appears, click the Next button (Figure 14 left).
-
Read the license agreement if you wish, then click the I Agree button (Figure 14 right).
Figure 14. New: PCL 1.8.0 Welcome (left), License (right)
-
From the list of installation options that appears, select the Add PCL to the system PATH for all users option, and click the Next button (Figure 15 left).
-
In the Destination Folder field that appears, confirm the automatically generated path,
C:\Program Files\PCL 1.8.0
, and click the Next button (Figure 15 right).
Figure 15. New: PCL 1.8.0 Options (left), Destination (right)
-
In the Choose Start Menu Folder window, confirm that the correct folder name is printed in the field, and click the Next button (Figure 16 left).
-
In the Choose Components window, confirm that the checkboxes for both PCL and 3rd Party Libraries component features are checked, and click the Install button (Figure 16 right).
Figure 16. New: PCL 1.8.0 Start Menu Folder (left), Features (right)
-
An Installing window displays a visual timer.
-
The PCL wizard opens an OpenNI wizard. In the OpenNI Destination Folder window that appears, click the Install button (Figure 17 left).
-
When a query appears to make sure it’s okay to continue, click the Install button.
-
When the OpenNI “Completed...” message appears, click the Finish button (Figure 17 right) to resume to the PCL wizard.
Figure 17. New: OpenNI Destination (left), Complete (right)
- When the PCL wizard’s “Completing...” message appears, click the Finish button (Figure 18) to close the installation wizard.
Figure 18. New: PCL 1.8.0 Install Completion
- Skip to page 28 to update the environment variables.
Specific older versions of various essential software packages were tested and proven to work well with Quanergy’s client-server model via Windows 7 64-bit. If you are missing any of the following four packages.
- Visual Studio 2013: Community Edition with Update 5 (see below)
- CMake Version 3.9.4 (see page 24)
- Visual C++ Redistributable Packages for Visual Studio 2013 (see page 25)
- PCL 1.8.0 All-In-One Installer MSVC2013 x64 (see page 27)
Install them in the order above, as instructed below, then update the environment variables as explained on page 28.
Visual Studio: Community 2013 is Microsoft’s integrated development environment (IDE) that enables the development of cross-platform solutions in native code and managed code formats. If you don’t already have it:
- Download Visual Studio 2013 as follows:
-
Navigate to the following URL in a web browser: https://www.visualstudio.com/vs/older-downloads
-
In the 2013 section midway down the webpage, click the Download button (Figure 3 top, on page 11).
-
If you don’t already have a free, perpetual subscription to the Dev Essentials program, a window may appear where you can sign up and access the application (Figure 3 bottom, on page 11).
-
This subscription gives you access to the older versions. Click the Download button for the Visual Studio Community 2013 with Update 5 (Figure 19).
Figure 19. Old: VS 2013 Download
-
Navigate to the computer’s Downloads folder where the
en_visual_studio_ community_2013_with_update_6_x86_6816332
file was saved, then double-click the file to launch it. -
The Visual Studio wizard displays a timer while initializing setup. When complete, the wizard offers several opportunities (Figure 20 left):
-
Confirm that the installation location filepath is
C:\Program Files (x86)\Microsoft Visual Studio 12.0
-
Read the License Terms and Privacy Policy if you wish, click the I agree checkbox.
-
Click the Next button that appears.
- The next Visual Studio window appears and recommends Optional features to install (Figure 20 right). Click the Select All checkbox (or select all items that make sense), then click the Install button.
Figure 20. Old: VS 2013 Destination/License/Privacy (left), Features (right)
- The Visual Studio window displays Acquiring and Applying visual timers (Figure 21 left). Click the Launch button when the process is complete (Figure 21 right).
Figure 21. Old: VS 2013 Acquiring/Applying (left), Launch (right)
-
After a wait, a Welcome window appears. Sign in or sign up for an account, or proceed without signing in by clicking the Not now, maybe later link (Figure 22 left).
-
A Visual Studio startup window appears. Select an environment from the Development Settings drop-down menu, then select a color theme (Figure 22 right).
-
After making selections, click the Start Visual Studio button (Figure 22 right).
Figure 22. Old: VS 2013 Welcome/Sign In (left), Setup/Start (right)
- The Visual Studio application opens with a Start Page window of relevant news links (Figure 23). Click the application window’s upper right X button to quit Visual Studio.
Figure 23. Old: Visual Studio Start Page Tab
- Continue to the next section to install the CMake application.
The installation of CMake Version 3.9.4 was previously explained. If you don’t already have it installed on your host computer:
-
Complete the “CMake Version 3.9.4” instructions starting on page 14.
-
Continue with the “Visual C++ Redistributable Packages for Visual Studio 2013” section starting on page 25.
Visual C++ Redistributable Packages for Visual Studio 2013
provides the run-time components that are necessary to run C++ applications that are built through the Visual Studio 2013 IDE. If you don’t already have it:
-
Open the following URL in a web browser: https://www.microsoft.com/en-us/download/details.aspx?id=40784
-
On the homepage for that software, select a preferred language, then click the Download button, as shown in Figure 24.
Figure 24. Old: Visual C++ Redist. Packages Home Page
- In the Choose the download... window that appears, select the vcredist_x64.exe option, and click the Next button (Figure 25).
Figure 25. Old: Visual C++ Redist. Packages Request Download
-
Navigate to the computer’s Downloads folder where the
vcredist_x64.exe
file has been saved, then click the file to launch it. -
Read through the license terms and conditions if you wish, check the checkbox agreeing to them, and click the Install button to begin the automatic installation process (Figure 26 left).
-
When installation is complete and the Setup Successful message appears, click the Close button (Figure 26 right).
Figure 26. Old: Visual C++ Redist. Packages Terms/Conditions (left), Success (right)
PCL 1.8.0 All-In-One Installer MSVC2013 x64 is an installer for rapidly building a development environment for the open source point cloud library (PCL) of three-dimensional point cloud processing using pre-built binaries with Visual Studio 2013. If you don’t already have it:
-
Navigate to the following URL in a web browser (or click the PCL 1.8.0... link in the GitHub Build Instructions): http://unanancyowen.com/en/pcl18
-
On the page that appears, scroll down until you reach the Visual Studio 2013 section, as shown in Figure 13, and click the PCL 1.8.0 All-in-one Installer MSVC2013 x64 item.
Figure 27. Old: PCL 1.8.0 All In One Selection
-
You may need to sign into a Microsoft account and set up a OneDrive account.
-
Navigate to the computer’s Downloads folder where the
PCL-1.8.0-AllInOne-msvc2013-win64.exe
file was saved, then double-click the file to launch it. -
Complete the “PCL 1.8.0 All-In-One Installer MSVC2015 x64” instructions starting with Step 5 on page 13. The screenshots reference 2015 instead of 2013, but the sequence is the same with one exception: the wizard may not enable installation of the OpenNI libraries. (You will have the opportunity to install them later, as instructed on page 34.)
-
Continue with the “Setting Environment Variables” section starting on page 28.
Set a few user variables and system variables. In Windows 7, for example:
-
Click the Microsoft Start icon (https://github.com/QuanergySystems/quanergy_client/wiki/images/fig27-PCL-180-all-in-one.png) and right-click the Computer item to reveal the Open context menu (Figure 28).
-
From the Open menu, select the Properties item (Figure 28).
Figure 28. Windows 7 Context Menu for Properties
- In the Control Panel Home window that appears (Figure 29), select the Advanced system settings item.
Figure 29. Windows 7 Control Panel Home
- In the System Properties window that appears (Figure 30 left):
a. Select the Advanced tab.
b. Select the Environment Variables button.
- In the Environment Variables window that appears:
a. In the upper User variables for <username> section (Figure 30 right), click the New button.
b. The New User Variable pop-up window appears (Figure 30 bottom):
* In the *Variable name* field, type `PCL_Root`<br>
* In the *Variable value* field, type `C:\Program Files\PCL 1.8.0`<br>
* Click the *OK* button to apply the change and close the New User Variable window.
Figure 30. Windows 7 System Properties (left) > Environment (right) > New User (bottom)
- In the Environment Variables window (Figure 31):
a. Scroll through the lower System variables section, then select the Path variable.
b. Click the Edit button.
c. In the Edit System Variable pop-up window that appears, append the following list of directories applies (separated by semicolons) to the path that is already in the Variable value field:
For Visual Studio 2015:
;%OPENNI2_REDIST64%
;%PCL_ROOT%\bin
;%PCL_ROOT%\3rdParty\VTK\bin
;%PCL_ROOT%\3rdParty\FLANN\bin
;C:\
;C:\Program Files\CMake\bin
;C:\Program Files\OpenNI\Bin64
;C:\Program Files\PCL 1.8.0
;C:\Program Files\PCL 1.8.0\3rdParty\VTK\bin
For Visual Studio 2013:
;%OPENNI2_REDIST64%
;%PCL_ROOT%\bin
;%PCL_ROOT%\3rdParty\VTK\bin
;%PCL_ROOT%\3rdParty\FLANN\bin
;C:\Program Files\PCL 1.8.0\3rdParty\VTK\bin
d. Click the OK button in the Edit System Variable window to apply the change and close the window.
e. Click the OK button in the Environment Variables window to close it.
Figure 31. Windows 7 System Variables Section and Edit System Variable
-
In the System Properties window (Figure 30 left), click the OK button to close it.
-
Reboot the computer.
Now that prerequisites are complete, refer to Figure 32 and download the sensor SDK:
-
Navigate to the GitHub QuanergySystems/quanergy_client page, which includes an upper list of sample source code packages and a lower list of OS-specific Build Instruction links.
-
Click the green Clone or download button to download the source code to the Local Disk (C:) drive.
-
In the dialog box that appears, select the Download Zip button.
Figure 32. GitHub quanergy_client Source Code
-
Navigate to the computer’s Downloads folder where the
quanergy_client-master
zip file has been saved. -
Extract the source code as follows:
- Right-click the zipped file, then select Extract All from the menu that pops up.
- In the browser window that appears, navigate to the Local Disk (C:) drive.
- Click the Select Folder button.
- Click the Extract button.
-
Navigate to the Local Disk (C:) drive, and open the extracted folder:
C:\Quanergy_client-master\
-
In that folder (Figure 33), right-click or press Ctrl+Shift+N, then select the menu items to make a new folder.
-
At the highlighted text, type a name for the empty folder, which must be called
Build
(Figure 33).
Figure 33. SDK quanergy_client Build Path
The OpenNI and OpenNI2 libraries are essential, and they should have already been installed when you downloaded PCL 1.8.0 (page 18). However, sometimes they get skipped, so you can make sure by installing them directly, one at a time, as follows:
-
Open the following URL in a web browser to automatically download OpenNI: http://openni.ru/wp-content/uploads/2013/11/OpenNI-Win64-1.5.7.10-Dev.zip
-
Navigate to the computer’s Downloads folder where the zip file was saved.
-
Double-click the zip file, then double-click the file inside to launch the setup wizard.
-
In the Destination Folder window that appears, confirm the automatically generated path or change it, then click the Install button (Figure 34 left).
Figure 34. OpenNI Destination Folder (left), Installation Confirmation Query (right)
-
In the Windows Security window that pops up to confirm your intent to proceed, click the Install button (Figure 34 right).
-
During the rapid installation process:
- A visual timer indicates the remaining time.
- An error message may indicate the library is already installed.
- When the installation process is complete, the Completed the OpenNI... window appears. Click the Finish button (Figure 35).
Figure 35. OpenNI Completing the Setup
-
Repeat the above steps of this procedure to install the OpenNI2 library, substituting the following URL in Step 1 above. The Setup Wizard windows are nearly identical. http://openni.ru/wp-content/uploads/2013/01/OpenNI-Windows-x64-2.1.0.zip
-
Continue to the next section to create the solution files.
Configure CMake to convert cmake files into Visual Studio solutions, as follows.
NOTE: CMake uses forward slashes in its filepaths.
-
Open the CMake application from the Microsoft Start menu or by double-clicking the CMake icon (https://github.com/QuanergySystems/quanergy_client/wiki/images/icon-cmake-app.png) installed on the dock.
-
In the CMake window (Figure 36), set two specific directories:
-
In the Where is the source code field, type or Browse to the path for the quanergy_client:
C:/quanergy_client-master
-
In the Where to build the binaries field, type or Browse the filepath to the Build folder:
C:/quanergy_client-master/Build
-
Click the Configure button.
Figure 36. CMake Set Filepaths and Add Entries
-
In the CMake window’s menu bar, click the Add Entry button (Figure 36).
-
In the Add Cache Entry window that appears (Figure 37), repeat the following steps for each applicable variable defined in Table 1:
- In the Name field, type the name.
- In the Type pull-down menu, select
PATH
orBOOL
.
- In the Value field, enter the value, which is a filepath or a checkmark (for true).
- Click the OK button to save the variable definition and put away the window.
- In the CMake window, click the Configure button (Figure 36).
Figure 37. CMake Add Cache Entry Window with BOOL Type (left), PATH Type (right)
Table 1. Variable Definitions for Boost Installation
Name | Type | Value | Example |
---|---|---|---|
Boost_USE_STATIC_LIBS | BOOL | ✔ (Check the Boolean check box for True) | Figure 37 left |
BOOST_LIBRARYDIR | PATH | C:/Program Files/PCL 1.8.0/3rdParty/Boost/lib | |
BOOST_INCLUDEDIR | PATH | C:/Program Files/PCL 1.8.0/3rdParty/Boost/include/boost-1_61 | Figure 37 right |
- For first-time users, or when the
Build
folder is empty, the Specify the generator window pops up (Figure 38).
- Click and drag the pull-down menu to specify the appropriate generator:
- For Visual Studio 2015, select Visual Studio 14 2015 Win64
- For Visual Studio 2013, select Visual Studio 12 2013 Win64
-
Select the Use default native compilers radio button.
-
Click the Finish button (Figure 38) to apply the selections and close the window.
Figure 38. CMake Specify the Generator Window
-
Observe that the configuration takes place so that values and any warnings are updated and displayed in red in the lower section of the CMake window (Figure 39).
-
Click the Generate button in the CMake window (Figure 39) to build the solution files of
quanergy_client
for Visual Studio. They are automatically saved in theBuild
folder. -
Click the X button in the upper right corner to quit CMake.
Figure 39. CMake Configure Libraries
In order to collect data, you need to have an All Build project open and running, as explained below:
- Open the Visual Studio application from the Microsoft Start menu (Figure 40).
-
The Visual Studio application window opens with a Start Page window of relevant news links (Figure 23). Click Start Page tab’s X button to close the news tab.
-
Figure 40 calls out important GUI features of the application as it will look later in the process.
Figure 40. Visual Studio Application Window (bottom) with Enlarged Menu Bar (top)
- In the upper left corner of the menu bar, click the File menu, hover over the menu’s Open item, and select the Project/Solution... item, as shown in Figure 41.
Figure 41. Visual Studio Opening a Project/Solution
- In the Open Project window that appears (Figure 42), navigate to
C:\quanergy_client-master\Build\ALL_BUILD
and click the Open button.
Figure 42. Visual Studio Opening the All Build Project
- The Solution Explorer window and Properties window (Figure 40) now populate the right side of the screen. If they do not appear:
- Click the Window tab in the menu bar (Figure 41).
- From the drop-down menu, select the Reset Window Layout item.
- From the Are you sure you want to... dialog box, click the Yes button.
- For the Debug Build. On the menu bar are two white fields (Figure 40):
-
If the Debug item is not visible in the left white field (called the Solution Configurations field when you hover over it), click that field’s down arrow, and select the Debug item in the drop-down menu, so that it is displayed as shown in Figure 40.
-
In the Solution Explorer window, right-click the
ALL_BUILD
solution, and select the Build item from the pop-up menu (Figure 43). The Visualizer application is placed inC:\quanergy_client-master\Build\Debug\
(Figure 44 top). -
If any errors are produced when building the Debug version of the visualizer, step through the code using the Debugger, and fix them before creating the Release version.
Figure 43. Visual Studio Choose All Build Project
Figure 44. Visual Studio Visualizer Application in Debug (top), Release (bottom) Folders
- For the Release Build. On the menu bar:
-
Open the drop-down menu in the Solution Configurations field and change the selected item from Debug to Release, as shown in Figure 40.
-
In the Solution Explorer window, right-click the
ALL_BUILD
solution, and select the Build item from the pop-up menu (Figure 43). The Visualizer application is placed inC:\quanergy_client-master\Build\Release\
(Figure 44 bottom).
-
By now, the quanergy_client-master Build folder should have all items shown in Figure 45.
-
Click the X button in the upper right corner to quit Visual Studio.
Figure 45. Contents of quanergy_client-master Build Folder
To visualize data through the PCL CloudViewer or other applications, you must know the sensor’s IP address. Quanergy’s free, downloadable Q-View application allows you to discover the IP address, as well as to reveal diagnostic information, visualize data, record data, and calibrate sensors.
Instructions for making a sensor detectable to the host computer via a router, discovering the IP address, and so forth are provided in the Q-View User Guide, downloadable from https://quanergy.desk.com/customer/portal/articles/2717074. In addition:
-
If you want to connect directly to the computer without a router, follow the instructions in Appendix 1, which starts on page 51.
-
If you prefer an alternative method for discovering a dynamically assigned IP address — such as executing the
ipconfig
command (to discover subnet mask and gateway of the connected host machine, router, and sensor) and a third party application (such as Advanced IP Scanner, free at http://www.advanced-ip-scanner.com/) — you may need to know the following about Quanergy sensors: -
The first six digits of the MAC addresses are D4:C9:B2.
-
The last six digits of the MAC address (e.g., 00:12:8D) are the sensor’s abbreviated QP serial number without the leading zeroes (e.g., QP128D), which is stated on a sticker affixed to the sensor.
-
When everything is in place, open a command line interface, and execute the following command to confirm that there is communication between the host computer and the sensor:
ping
<sensor ip address>
The ping
command is shown with its example result in Figure 46.
-
The sensor’s router-assigned IP address should remain the same unless you unplug it from the router and plug it back into the router or another network port. To prevent such dynamic changes to the sensor’s IP address, we recommend that you assign a static IP address to the sensor, as explained in the “Managing the Sensor” section’s “Edit Network” instructions in the M8 Sensor User Guide, which is downloadable from https://quanergy.desk.com/customer/portal/articles/2687038.
-
Then, if you prefer, you can connect the sensor directly to the computer through its network port. You will need to configure the network port and assign the computer a static IP address that is on the same gateway as the sensor’s static IP address, as explained in Appendix 1, which starts on page 51.
Figure 46. Ping Command to Confirm Connection
The Visualizer application created in Visual Studio uses the quanergy_client to establish a TCP connection and begin collecting the sensor's status information and range data packets.
-
Open a command line interface, and navigate to this directory:
C:\quanergy_client-master\Build\Release
where the Release build of the Visualizer application is located (Figure 44 bottom).
-
Launch the PCL Cloud Viewer at the command line by executing the following command, substituting the sensor’s actual IP address for the italicized term.
visualizer --host *xx.xx.xx.xx*
An example of the command line is shown in Figure 47.
Figure 47. PCL Cloud Viewer Launch
-
After a brief delay of up to thirty seconds, verify that the data packets are displayed as a point cloud, which automatically appears in the PCL Cloud Viewer, as shown in Figure 48, for example.
-
If the point cloud doesn’t appear, move or rotate the mouse wheel to pop the X, Y, Z axes, and then the point cloud, into view.
NOTE: The PCL CloudViewer is only one way to visualize the data packets, and users may recall or record the data packets in different formats.
Figure 48. PCL Cloud Viewer in Default (left) and Mouse-Adjusted (right) Views
- At the command line, press Control+C to stop all visualization processes.
Clicking the X button in the upper right corner is another way to stop visualization, but it may also generate a notification, as shown in Figure 49. If necessary, click the Close program button to quit the application.
Figure 49. PCL Cloud Viewer Termination Notification
If you discover, after installing all the prerequisite software, that CMake solutions don’t compile properly, you may need to repair or modify the Visual Studio installation, as follows:
-
Quit Visual Studio by clicking the X button in the upper right corner if it’s currently running.
-
Start the Visual Studio installer by navigating to the Downloads folder and double-clicking the relevant installer:
2015:
en_visual_studio_community_2015_with_update_3_x86_x64_web_installer_8922963
2013:
en_visual_studio_community_2013_with_update_6_x86_6816332
- When the wizard offers options, try the following:
-
Repair. Click the Repair button, and after installation concludes, check if that solves the problem.
-
Modify. Click the Modify button, select most if not all of the features, and after installation concludes, check if that solves the problem.
- Call support if necessary.
Some questions that have been asked and answered about the SDK include the following:
-
Q: Why does the code initialize
last_azimuth
to 65000?
A: The last_azimuth
is set to an arbitrary number, which for historic reasons happens to be 65000. Once the sensor starts, it will have a new, significant value.
-
Q: In your code,
packet_counter
is never initialized, only incremented. Is that okay?
A: Actually, the packet_counter
is initialized in PointCloudGeneratorM8()
with 0.
-
Q: Is it possible for the M8 sensor to spin in two directions? We saw an
if(spin)
in the m8client code and weren't sure why that was there.
A: No, our M8 sensor rotates in only one direction. We are working on this feature, but right now we cannot change the spin direction.
-
Q: What is
bool spin
for? Can the sensor scan while not spinning?
A: The bool spin
was there because we could not control the spin direction in an early version. Please use the newest version of the SDK.
-
Q: How is the
intensity
measurement from LiDAR represented?
A: LiDAR intensity is a unit less measure of the return strength of the laser. It is related to target reflectivity, among other things.
- Q: Can we adjust the code to get ALL returns, or to get only one return?
A: It may be more convenient to adjust the number of returns through the GUI discussed in the M8 Sensor User Guide, “Managing the Sensor > Edit Settings > Return Data Select” section, https://quanergy.desk.com/customer/portal/articles/2687038. However, the launch file that comes with the SDK includes a return
argument, so you could just amend it to return:=all
or substitute the preferred value 1
, 2
, or 3
. These return values are defined in the M8 Sensor User Guide, “Multiple Returns” section.
If you prefer to connect your sensor directly to the computer, instead of through a router, make sure you assign a static IP address to the sensor first (Figure 50), as explained in the “Managing the Sensor” section’s “Edit Network” instructions in the M8 Sensor User Guide, https://quanergy.desk.com/customer/portal/articles/2687038.
Figure 50. Static IP Pop-Up Window with Good Sample Values
NOTE: It is possible to configure a DHCP server so that the sensor doesn’t need to have a static assignment, but that is not explained in this user guide.
You must then set up the computer’s network port as follows, referring to Figure 51:
-
Connect the sensor to the computer’s network port.
-
In your Windows host machine, open the Control Panel item, and select the Network and Internet item, then the Network Connection item.
-
In the Network Connections window, select the Local Area Connection tab.
-
In the Local Area Connection Properties dialog box, select the Networking tab, and click the Configure button.
-
In the Internet Protocol Version 4 (TCP/IPv4) Properties dialog box, fill in the values as follows, and refer to the good sample values shown in Figure 50 and Figure 51 to make sure the sensor and the Windows host computer share the same local area network gateway, such as 10.0.0:
-
Select the Use the following IP address radio button.
-
In the IP address field, type a static address for the computer, with the shared gateway (e.g., 10.0.0) and a host address that is any number from 2-254 that is available, that is, does not conflict.
-
In the Subnet mask field, type the subnet that both computer and sensor are on.
-
In the Default gateway field, after the shared gateway (e.g., 10.0.0), the last field is typically 1.
-
Select the OK button to apply the changes and close the dialog box.
- In the Local Area Connection Properties dialog box, select the OK button to close the box.
Figure 51. Setting Subnet Mask and Gateway with Good Sample Values
-
Open a command line interface, then execute the following command to confirm that there is communication between the host computer and the sensor.
ping
<sensor ip address>
A successful result is shown in Figure 46.
Notices
Copyright © 2018, Quanergy Systems, Inc. All rights reserved.
This document is protected by copyright law, whereby all rights established therein remain with Quanergy Systems, Inc. Reproduction of this document or parts of this document is only permissible within the limits of the legal determination of Copyright Law. Alteration or abridgment of the document is not permitted without the explicit written approval of Quanergy.
The Quanergy logo is a trademark of Quanergy Systems, Inc. All other trademarks or registered trademarks are the property of their respective owners.
Specifications are subject to change without notice.
ISO 9001:2008 Certified
Contact
Quanergy Systems, Inc.
482 Mercury Drive
Sunnyvale, CA 94085-4706
http://quanergy.com
For purchases made directly from Quanergy contact: [email protected]
For purchases from a third party such as value-added reseller/system integrator: contact them for support
(https://github.com/QuanergySystems/quanergy_client/wiki/images/q-symbol-white-bg.png)