cmvr-es/third_party/mech-eye-sdk/samples/cpp/profiler/TriggerNonStopAcquisition
2025-08-22 16:57:29 +08:00
..
CMakeLists.txt feat:add eye hand calibration and pose follow 2025-08-22 16:57:29 +08:00
README.md feat:add eye hand calibration and pose follow 2025-08-22 16:57:29 +08:00
TriggerNonStopAcquisition.cpp feat:add eye hand calibration and pose follow 2025-08-22 16:57:29 +08:00

TriggerNonStopAcquisition Sample

With this sample, you can trigger data acquisition with signals input from software, trigger line scans at a fixed rate, and then retrieve and save the acquired data.

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. Add the following directories to the Path environment variable:

    • xxx/opencv/build/x64/vc14/bin
    • xxx/opencv/build/x64/vc14/lib
  3. Run Cmake and set the source and build paths:

    Field Path
    Where is the source code xxx/TriggerNonStopAcquisition
    Where to build the binaries xxx/TriggerNonStopAcquisition/build
  4. 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.

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

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

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

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

  9. 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'
      
  • Install third-party libraries: OpenCV is required.

    • Install OpenCV (latest version):

      sudo apt update && sudo apt install -y unzip
      wget -O opencv.zip https://github.com/opencv/opencv/archive/4.x.zip
      unzip opencv.zip
      mkdir build && cd build
      cmake ../opencv-4.x
      cmake --build .
      sudo make install
      

Instructions

  1. Navigate to the directory of the sample.

    cd xxx/profiler/TriggerNonStopAcquisition/
    
  2. Configure and build the sample.

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

    sudo ./TriggerNonStopAcquisition
    
  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 /TriggerNonStopAcquisition/build.