Flexiv RDK APIs
1.5
|
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/22.04) | x86_64, arm64 | C++, Python | build-essential |
macOS 12 and above | arm64 | C++, Python | Xcode Command Line Tools |
Windows 10/11 | 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 via 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_install
flexiv_rdk
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 Python RDK besides C++ RDK. The configuration process can also be done using CMake GUI.cd flexiv_rdk/build cmake --build . --target install --config ReleaseC++ RDK is installed to the path specified by
CMAKE_INSTALL_PREFIX
, which may or may not be globally discoverable by CMake. Python RDK is installed to the user site packages path, which is globally discoverable by 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 C++ RDK is installed, it can be found as a CMake library and linked to by other CMake projects. Use 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.