This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the RoboDK Plug-In Interface — a C++/Qt framework for building native plugins that extend RoboDK (industrial robot simulation software). Plugins compile to DLL/SO/DYLIB files and are loaded directly into RoboDK's core, making them 10-100x faster than the standard RoboDK API.
All projects use qmake (not CMake). Open a .pro file in Qt Creator, or build from the command line:
Windows (Qt 5.15, MSVC2019):
qmake Plug-In-Interface.pro -spec win32-msvc CONFIG+=qtquickcompiler CONFIG+=Release
jom.exe # or: nmakeLinux/macOS:
qmake Plug-In-Interface.pro CONFIG+=qtquickcompiler CONFIG+=Release
makeTo build a single plugin, run qmake/make inside its subdirectory (e.g., PluginExample/PluginExample.pro).
The top-level Plug-In-Interface.pro builds all plugins as SUBDIRS. Note that Plugin-OPC-UA, PluginOpenGL, PluginOpenGL-Shaders, and PluginRoboUI are gated behind win32 { } and only build on Windows.
There are no automated tests — plugins are tested manually by loading them in RoboDK via Tools → Plug-Ins, or faster, by launching RoboDK with a command-line flag:
RoboDK.exe -PLUGINSLOAD # start with all available plugins loaded
RoboDK.exe -PLUGINLOAD=C:/RoboDK/bin/plugins/pluginexample.dll # load one plugin on the fly| Platform | Qt Version | Compiler |
|---|---|---|
| Windows | 5.15 | MSVC2019 |
| macOS | 6.10 (≥RoboDK 6.0), 5.15 (older) | clang 64-bit |
| Linux | 6.10 (≥RoboDK 6.0), 5.12 (older) | GCC |
The Qt version must match exactly what RoboDK was compiled with, or the plugin will fail to load.
Compiled plugins must be placed in RoboDK's plugin directory:
- Windows release:
C:/RoboDK/bin/plugins/ - Windows debug:
C:/RoboDK/bind/plugins/ - macOS:
~/RoboDK.app/Contents/MacOS/plugins/ - Linux:
~/RoboDK/bin/plugins/
All plugins include this shared interface via:
include($$PWD/../robodk_interface/robodk_interface.pri)Key headers:
irobodk.h— Main RoboDK API (100+ methods: robot control, simulation, file I/O)iitem.h— Represents any object in the station tree (robot, frame, tool, program, etc.)iapprobodk.h— Base class that every plugin must implementrobodktypes.h— Shared enums and type definitionsmatrix4x4.h,vector3.h,joints.h— Math utilities
Every plugin implements IAppRoboDK and receives pointers to IRoboDK and IItem. Key behavioral notes:
- Items are pointers, not value objects — check for
nullptrbefore use - Screen updates are manual — call a render event explicitly after changing robot positions
- Qt signals/slots are used for all UI callbacks and are thread-safe
Each plugin follows this structure:
PluginXxx/
├── PluginXxx.pro # qmake project (CONFIG += plugin)
├── pluginxxx.h/.cpp # IAppRoboDK implementation
└── [widget files] # Optional docked Qt widgets
Python-based apps loaded via the PluginAppLoader C++ plugin (built in separately, always enabled in RoboDK but disabled by default). Each app is a subfolder; every .py script inside becomes a menu item/toolbar button, and an AppConfig.ini (auto-generated on first load) controls menu placement, icons, and shortcuts. Package an app folder into a distributable .rdkp with PluginAppLoader/Apps/PackageCreate.py (or PackageCreateOne.py for a single app).
Custom kinematics libraries that RoboDK loads separately. Must export SolveFK(), SolveFK_CAD(), and SolveIK() functions.
Copy PluginExample/ as a template. It demonstrates:
- Plugin registration and lifecycle hooks
- Adding menu items and toolbar buttons
- Docked widget creation
- Timing/performance benchmarking of the RoboDK API
Plugins are packaged as .rdkp Add-in files using the RoboDK Add-in Manager. See the Add-ins documentation. Each plugin includes a manifest.xml (title, version, description, asset list) consumed by the Add-in Manager when packaging.