cmvr-es/third_party/mech-eye-sdk/samples/cpp/profiler/TransformPointCloud/README.md
2025-08-21 13:56:39 +08:00

3.2 KiB

TransformPointCloud Sample

With this sample, you can obtain and save the point clouds in the custom reference frame.

If you have any questions or have anything to share, feel free to post on the Mech-Mind Online Community. The community also contains a specific category for development with Mech-Eye SDK.

Build the Sample

Prerequisites and instructions for building the sample on Windows and Ubuntu are provided.

Windows

Prerequisites

The following software are required to build this sample. Please download and install these software.

Instructions

  1. Make sure that the sample is stored in a location with read and write permissions.

  2. Run Cmake and set the source and build paths:

    Field Path
    Where is the source code xxx/TransformPointCloud
    Where to build the binaries xxx/TransformPointCloud/build
  3. Click the Configure button. In the pop-up window, set the generator and platform according to the actual situation, and then click the Finish button.

  4. When the log displays Configuring done, click the Generate button. When the log displays Generating done, click the Open Project button.

  5. In Visual Studio toolbar, change the solution configuration from Debug to Release.

  6. In the Solution Explorer panel, right-click the sample, and select Set as Startup Project.

  7. Click the Local Windows Debugger button in the toolbar to run the sample.

  8. Enter the index of the laser profiler to which you want to connect, and press the Enter key. The obtained files are saved to the build folder.

Ubuntu

Ubuntu 18 or above is required.

Prerequisites

  • Update the software source list.

    sudo apt-get update
    
  • Install required tools.

    sudo apt-get install -y build-essential pkg-config cmake
    
  • Install Mech-Eye SDK (latest version).

    Note: If you have installed Mech-Eye SDK before, please uninstall it first with the following command:

    sudo dpkg -P MechEyeApi
    
    • If the system architecture is AMD64, execute the following command:

      sudo dpkg -i 'Mech-Eye_API_x.x.x_amd64.deb'
      
    • If the system architecture is ARM64, execute the following command:

      sudo dpkg -i 'Mech-Eye_API_x.x.x_arm64.deb'
      

Instructions

  1. Navigate to the directory of the sample.

    cd xxx/TransformPointCloud/
    
  2. Configure and build the sample.

    sudo mkdir build && cd build
    sudo cmake ..
    sudo make
    
  3. Run the sample.

    sudo ./TransformPointCloud
    
  4. Enter the index of the laser profiler to which you want to connect, and press the Enter key. The obtained files are saved to /TransformPointCloud/build.