Skip to content

KUKA LBR iiwa & OnRobot RG2 Setup

Jgocunha edited this page Apr 2, 2026 · 2 revisions

This page describes how to set up and run the KUKA LBR iiwa 14 robot with the OnRobot RG2 gripper using ROS 2 Humble and MoveIt 2.

The robot is controlled via Ethernet (KONI port) and the gripper via MARLAB Wi-Fi.


Overview

Device Connection IP Address
KUKA Controller Ethernet (KONI X66) 172.31.1.147
OnRobot RG2 (left) Wi-Fi 172.31.1.4
OnRobot RG2 (right) Wi-Fi 172.31.1.3
PC Ethernet 192.168.11.2

Important:

  • Robot control → Ethernet
  • Gripper control → Wi-Fi

Quick Start Checklist

Before running anything:

  1. Connect Ethernet cable → KUKA KONI (X66)
  2. Power OnRobot compute box
  3. Connect PC to Wi-Fi
  4. Set PC static IP
  5. Ping robot and gripper
  6. Launch LBRServer on SmartPad
  7. Start ROS 2 drivers
  8. Test gripper

Network Setup

Set PC Ethernet IP

sudo ip addr add 172.31.1.148/24 dev eth0
sudo ip link set eth0 up

Verify Connection

ping 172.31.1.147   # Robot
ping 172.31.1.4     # OnRobot

If robot does not respond:

sudo ip link set eth0 down
sudo ip link set eth0 up

Launch LBRServer on SmartPad

On the KUKA SmartPad, start LBRServer with:

Setting Value
FRI send period 10 ms
FRI control mode POSITION_CONTROL
Client command mode POSITION
Client IP 192.168.11.2

⚠️ You must hold the control pad + play button for the robot to move.


Running the Robot with MoveIt

Start Robot Driver

ros2 launch lbr_bringup hardware.launch.py moveit:=true model:=iiwa14

Start MoveIt

ros2 launch lbr_bringup move_group.launch.py mode:=hardware model:=iiwa14 rviz:=true

MoveIt Test

ros2 launch lbr_moveit_cpp hello_moveit.launch.py mode:=hardware model:=iiwa14

⚠️ Be careful — MoveIt targets may cause collisions.


OnRobot RG2 Setup

Connection

  1. Ensure OnRobot compute box is powered
  2. Connect PC to MARLAB Wi-Fi
  3. Ping the gripper controller:
ping 172.31.1.4

Launch OnRobot Driver

ros2 launch onrobot_driver onrobot_control.launch.py \
    onrobot_type:=rg2 \
    connection_type:=tcp \
    ip_address:=172.31.1.4

Test Gripper Control

Launch gripper control:

ros2 launch kuka_lbr_iiwa14_marlab onrobot_rg2_control.launch.py

Send command:

ros2 topic pub --once /onrobot/finger_width_controller/commands \
std_msgs/msg/Float64MultiArray "{data: [0.05]}"

This should open or close the gripper.


Typical Startup Sequence

When running the full system:

  1. Connect Ethernet to robot
  2. Connect to Wi-Fi
  3. Launch LBRServer on SmartPad
  4. Start robot driver
  5. Start MoveIt
  6. Start OnRobot driver
  7. Test gripper
  8. Start control nodes

References

  • lbr_fri_ros2_stack Documentation
  • MoveIt Hardware Setup
  • OnRobot ROS2 Driver