Giter Club home page Giter Club logo

kinova_gen3's Introduction

STEP 1 Install https://github.com/FreeSpacenav

STEP 2 Install kinova libraries

STEP 3 clone this rep

STEP 4 cp kortex_api into kinova_gen3 folder

STEP 5

Setup (C++ environment)

Set up PC environment

CMake

The C++ example projects in this repository use CMake.
The following link has the instructions to install CMake.

GCC 5.4 compiler (preferred)

To check which version of GCC is installed on Windows or Linux
Note: This procedure only works on Windows if you add the MinGW bin directory path to the PATH environment variable

gcc --version

Procedure to install GCC 5.4 under Linux (Ubuntu 16.04 and higher)

sudo apt-get install build-essential

Procedure to install GCC 5.4 under Windows

Because GCC is not coded for the Windows operating system, a GCC port of MinGW-w64 for Windows is required. The '-w64' suffix indicates that it can support a 32-bit or 64-bit environment. The 32-bit versions are still available and one of them will be used to compile the affected project.

  1. Go to https://sourceforge.net/projects/mingw-w64
  2. Start the installer and click 'Next' until you reach the installation options page
  3. On the options page ensure that the options look exactly like this (all options are the default values, except for version, which is the version of GCC we want to install - 5.4 in this case)

Gcc Setting

  1. Click 'Next' until the end of the installation. The install directory by default is the one set in the build script included with the project.
  2. Optional: You can add the path of the bin directory to the system path to make all the MinGW commands and tools available system wide.

Install C++ Kortex API and the required dependencies

Manual installation using downloaded archive:

  • Download the archive via Kinova's Google Drive: kortex_api
  • Uncompress the content of the archive and place in the sub-directory kortex_api

Ensure that you respect one of the following directory hierarchies.
1. using content of a specific Kortex API OS_Compiler_Architecture

examples/kortex_api  
┬  
├ include/
├ lib/  
└   ┬  
    ├ debug/  
    └ release/

2. using KORTEX_SUB_DIR cmake argument to specify the Kortex API OS_Compiler_Architecture

examples/kortex_api  
┬  
├ OS_Compiler_Architecture/
└   ┬  
    ├ include/
    ├ lib/  
└       ┬  
        ├ debug/  
        └ release/

Build instructions

Linux Ubuntu
mkdir build  
cd build  
cmake .. -DCMAKE_BUILD_TYPE=release [-DKORTEX_SUB_DIR=<OS_Compiler_Architecture dir name>]
make  

(note that the name of the executable is mingw32-make.exe, even for the 64-bit version) Windows - using GCC
mkdir build  
cd build  
cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=release [-DKORTEX_SUB_DIR=<os_arch dir name>]  
mingw32-make  

Windows - using Visual Studio 2017
mkdir build  
cd build  
cmake .. -G "Visual Studio 15 2017 [arch]" -DCMAKE_SH=CMAKE_SH-NOTFOUND -DCMAKE_BUILD_TYPE=release [-DKORTEX_SUB_DIR=<os_arch dir name>]  

Windows - using command-line MSVC build
call "C:\Program Files (x86)\Microsoft Visual > Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsamd64_x86.bat"
 
:: Add the cl.exe path the Windows Environment PATH
set PATH=%PATH%;C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64

mkdir build  
cd build  
cmake .. -G "NMake Makefiles" -DCMAKE_SH=CMAKE_SH-NOTFOUND -DCMAKE_BUILD_TYPE=Release  
nmake

How to use examples with the Gen3 robot

We assume the robot is using its default IP address: 102.168.1.12

Before you start make sure you run the test in a safe area - some examples contain movement. Also verify that your Gen3 device is correctly afixed to your working surface.

Prerequisites:

  • The examples require a wired connection to your computer
  • Configure a static IP on your network interface (e.g: 192.168.1.11/24)
  • Add a route to arm actuators:
    • under Windows
      route ADD -p 10.10.0.0 MASK 255.255.255.0 102.168.1.12 METRIC 1
    • under Linux
      ip route add 10.10.0.0/24 via 102.168.1.12

Now you're ready to compile the example. There are two ways to build the example: build all, or by sub directory.

To build all, you need change the current directory to the example directory. To build a sub directory you need to change the current directory to the parent directory of the one you want to build. The build instruction below is the same.

examples/kortex_api  
┬  
├ api_cpp/
└   ┬  
    ├ doc/
    ├ examples/     (Here to build all example)
    └   ┬  
        ├ 000-Getting_started/  (Here to build this specific directory)
        └ .../

Create a build directory

mkdir build

Change the current directory to the build directory and build the example using one of the following commands:

cd build
[Windows]:    cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release .. && minGW32-make
[Linux]:      cmake -DCMAKE_BUILD_TYPE=Release .. && make

Each example have it's own main function so you can run them individually. Change the current directory to the newly-created example folder to execute them.

cd <example_directory>
[Windows]: <example_name>.exe
[Linux]: ./<example_name>

API documentation

Here is a link to the generated documentation
API C++ Services Documentation

Reference

Useful Links

Google Proto Buffer generated C++: https://developers.google.com/protocol-buffers/docs/reference/cpp-generated

Back to root topic: readme.md

kinova_gen3's People

Contributors

lpetrich avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.