Flexiv RDK APIs
1.5.1
|
Flexiv RDK (Robotic Development Kit), a key component of the Flexiv Robotic Software Platform, is a powerful development toolkit that enables the users to create complex and customized robotic applications using APIs that provide both low-level real-time (RT) and high-level non-real-time (NRT) access to Flexiv robots.
Flexiv RDK Home Page is the main reference. It contains important information including user manual and API documentation.
Supported OS | Supported processor | Supported language | Required compiler kit |
---|---|---|---|
Linux (Ubuntu 20.04 and above) | x86_64, arm64 | C++, Python | build-essential |
macOS 12 and above | arm64 | C++, Python | Xcode Command Line Tools |
Windows 10 and above | x86_64 | C++, Python | MSVC v14.2+ |
The C++ and Python RDK libraries are packed into a unified modern CMake project named flexiv_rdk
, which can be configured and installed using CMake on all supported OS.
sudo apt install build-essential cmake cmake-qt-gui python3 python3-pip -y
rdk_install
under the home directory.cd flexiv_rdk/thirdparty bash build_and_install_dependencies.sh ~/rdk_installNOTE: Internet connection is required for this step.
flexiv_rdk
library as a CMake project: cd flexiv_rdk mkdir build && cd build cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install -DINSTALL_PYTHON_RDK=ONNOTE:
-D
followed by CMAKE_INSTALL_PREFIX
sets the CMake variable that specifies the path of the installation directory. -D
followed by INSTALL_PYTHON_RDK=ON
enables the installation of the Python library alongside the C++ library. Alternatively, this configuration step can be done using CMake GUI.flexiv_rdk
libraries (C++ and Python): cd flexiv_rdk/build cmake --build . --target install --config ReleaseThe C++ library will be installed to
CMAKE_INSTALL_PREFIX
path, which may or may not be globally discoverable by CMake. The Python library is installed to the user site packages path, which is globally discoverable by the Python interpreter.xcode-select
to invoke the installation of Xcode Command Line Tools, then follow the prompted window to finish the installation.cmake-3.x.x-macos-universal.dmg
from CMake download page and install the dmg file. The minimum required version is 3.16.3. When done, start CMake from Launchpad and navigate to Tools -> How to Install For Command Line Use. Then follow the instruction "Or, to install symlinks to '/usr/local/bin', run:" to install cmake
and cmake-gui
commands for use in Terminal.brew install python@3.x
cmake-3.x.x-windows-x86_64.msi
from CMake download page and install the msi file. The minimum required version is 3.16.3. Add CMake to system PATH when prompted, so that cmake
and cmake-gui
command can be used from Command Prompt or a bash emulator.After the C++ RDK library is installed, it can be found as a CMake target and linked to from other CMake projects. Using the provided examples project for instance::
cd flexiv_rdk/example mkdir build && cd build cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install cmake --build . --config Release -j 4
NOTE: -D
followed by CMAKE_INSTALL_PREFIX
tells the user project's CMake where to find the installed C++ RDK library. The instruction above applies to all supported OS.
To run a compiled example C++ program:
cd flexiv_rdk/example/build ./<program_name> [robot_serial_number]
For example:
./basics1_display_robot_states Rizon4s-123456
NOTE: sudo
is only required if the real-time scheduler API flexiv::rdk::Scheduler
is used.
To run a example Python program:
cd flexiv_rdk/example_py python3 <program_name>.py [robot_serial_number]
For example:
python3 ./basics1_display_robot_states.py Rizon4s-123456
The complete and detailed API documentation of the latest release can be found at https://www.flexiv.com/software/rdk/api. The API documentation of a previous release can be generated manually using Doxygen. For example, on Linux:
sudo apt install doxygen-latex graphviz cd flexiv_rdk git checkout <previous_release_tag> doxygen doc/Doxyfile.in
The generated API documentation is under flexiv_rdk/doc/html/
directory. Open any html file with your browser to view it.