Learn KUKA-SUNRISE-EXTENSIONS with Real Code Examples
Updated Nov 27, 2025
Code Sample Descriptions
1
Basic PTP Motion (KUKA Sunrise Java)
import com.kuka.roboticsAPI.applicationModel.RoboticsAPIApplication;
import com.kuka.roboticsAPI.deviceModel.LBR;
public class MoveToPosition extends RoboticsAPIApplication {
private LBR robot;
@Override
public void initialize() {
robot = (LBR) getContext().getDeviceFromType(LBR.class);
}
@Override
public void run() {
robot.move(ptp(0, 0, 0, -90, 0, 90, 0));
}
}
A Sunrise Application moving the robot to a predefined position using a PTP motion command.
2
SmartServo Real-Time Control
SmartServo motion = new SmartServo(robot.getCurrentJointPosition());
motion.setJointVelocityRel(0.2);
robot.moveAsync(motion);
for(int i=0; i<100; i++) {
motion.setJointPosition(newJointPosArray[i]);
Thread.sleep(10);
}
Streaming real-time joint updates to the robot using the proprietary SmartServo API.