This repository provides example applications demonstrating how to integrate rc_visard or rc_cube devices with KUKA robots using the EKI (Ethernet KRL) interface.
These examples are based on KUKA's EthernetKRL technology package. Official documentation: KUKA EthernetKRL 2.2 Manual
- CADMatch: Demonstrates CAD-based object detection and pick-and-place operations
- ItemPick: Demonstrates continuous bin-picking for bags. Program loops until bin is empty, detecting items and trying available grasp poses for each detection
- HandEyeCalibration: Performs an 8-pose calibration routine to align camera and robot coordinate systems
- AprilTag: Implements AprilTag detection and robot positioning
- Measure: Demonstrates depth measurement and region analysis capabilities
Each example includes complete robot programs with error handling, integration with respective rc_reason modules, and basic motion sequences.
Before running any example:
-
EKI Configuration:
- Download the required EKI XML configuration files from the rc_cube documentation or rc_visard documentation
- Store all EKI XML files in
C:\KRC\ROBOTER\Config\User\Common\EthernetKRLon the robot controller - Configure the IP address of your rc_visard or rc_cube in the EKI XML files
- Ensure service names in the code match exactly with your EKI XML configuration files
-
System Requirements:
- rc_visard or rc_cube with EKIBridge license
- KUKA Robot Controller with KUKA.EthernetKRL
For detailed configuration instructions, refer to the Ethernet connection configuration documentation.
- All robot poses in these examples must be adjusted for your specific setup before use
- These applications should only be executed by experienced robot programmers who have thoroughly reviewed and understood the code
- The authors are not liable for any damages that may occur from using these example applications
- Review the safety notices and documentation
- Ensure your system meets the requirements
- Download and configure the required EKI XML files
- Select the appropriate example for your application
- Adjust robot poses and parameters for your setup
- Test thoroughly in a safe environment
If you stop a program mid-execution and restart it, you may encounter error EKI00023 "Initialization already performed". This happens because EKI_Init() allocates resources that persist across program stops (but not resets). See KUKA EthernetKRL documentation pages 29-30 for details.
Solution: Use global flags to track initialization state
This approach requires an additional PUBLIC .dat file per program, which is not included in these examples for simplicity, but can be easily added for production deployments.
- Create a separate PUBLIC .dat file for global flags:
DEFDAT ProgramName_GlobalFlags PUBLIC
DECL PUBLIC BOOL EKI_DETECT_INITIALIZED
ENDDAT
- In your main program, check the flag before initializing:
DEF ProgramName()
DECL GLOBAL BOOL EKI_DETECT_INITIALIZED
IF NOT EKI_DETECT_INITIALIZED THEN
RET = EKI_INIT(serviceNameDetect[])
IF RET.Msg_No == 0 THEN
EKI_DETECT_INITIALIZED = TRUE
ENDIF
ENDIF
END
Why separate .dat files? KUKA requires all variables in a DEFDAT ... PUBLIC block to be declared PUBLIC. Keep global flags in their own file to avoid making all program variables global.
When is this needed? Production environments where operators may stop/restart programs frequently. Not required if programs always run to completion or manual reset is acceptable.
If you have any questions, technical support contact information can be found at roboception.com/support.