Skip to Main Content






Kinova Gen 3: Controlling with Code Guide

Change the IP Address, UserID, and Password 

Change the IP Address, UserID, and Password on the code that will be run. 

Creating a New Build Configuration

1. Open the project directly from the opening interface:

2. Select the CMakeLists.txt file from kortex_master -> api_cpp -> example

 

3. Once the project is opened, the CMake Build can be configured:

  1. Select the chosen compiler on the Toolchain: File -> Setting -> Build, Execute, Deployment -> Toolchain.
    1. Click on the "+" to add Toolchain:
    2. Select the right architecture for the PC:

      Note: "amd64" works for "x64", but "x82" will not work for "x64" devices.

  • Open CMake configuration
  • Give Configuration a name
  • Select Build type by observing the folder name on the lib folder in kortex_api -> lib. In the case of "windows_x86-64_msvc-2019" API, it is "release" 
  • Add the following for the CMake option:
    -DUSE_CONAN=OFF -DDOWNLOAD_API=OFF

Building the Project in Visual Studio

Building the project will create a Cmake cache. Loading the project in IDE will automatically prebuild the project, which creates the cache. 

 

  • Therefore, the cache generated in the pre-build has to be deleted before rebuilding:

  • Once the cache is deleted, an information bar will pop up for regenerating the cache:

Creating New Build Configuration in Visual Studio

1.    Open the CMakeLists.txt from the directory: kortex_master -> api_cpp -> example -> CMakeLists.txt

2. Open the Manage Configurations to configure the build setting:

3.  Edit the Json file:

  1. Create a new configuration by clicking on “+”
  2. Give the configuration a name
  3. Select the CMake_Build_Type by observing the folder name on the lib folder in kortex_api -> lib. In case of the “windows_x86-64_msvc-2019” API, it is “release”.
  4. Select the right Toolset according to the pc architecture. “msvc_x64_x64” is for 64-bit OS with msvc x64 version.
  5. Using visual studio C++ compiler(MSVC) will not require to define the toolchain file location.
  6. Scroll down the configuration menu to add the following CMAKE command argument:
    -DUSE_CONAN=OFF -DDOWNLOAD_API=OFF
  7. Scroll down to the bottom and click on the “Show advanced settings”
    • Select the CMake generator.
  8. Save the configuration.

Prerequisite of Building Example  

To build the project, the CMakeList.txt file has to be ran. The chosen IDE has to be configured properly to build the project without any errors.

The CMakeList.txt has been developed to build the project with/without using Conan (package manager) but it has to be defined before building the program.

The CMakeList.txt has been programmed to download the API but this has already been done manually; therefore, it must be defined before the build re-downloads it and causes redundancy.