Skip to content

Kuka Setup

Sébastien Kleff edited this page Nov 11, 2022 · 17 revisions

Hardware setup

BEFORE DOING ANYTHING make sure that the robot is at a safe distance from people, walls & surroundings !

Turn on the robot

  1. Power on the control box (the KUKA cabinet).
  2. Enter the machine password (see on the NYU wiki)
  3. Turn the key switch on the control panel when all lights are green.

Moving joints manually

  1. Turn the key of of the teach pendant and wait for all lights to be green.
  2. Select T1 mode from the control panel (25 % maximum velocity limit & deadman / start program switch must be pressed)
  3. Press grey button to half and move joints

If warnings or error appear, refer to troubleshooting section.

Software setup (torque control using FRI)

Install & build the code

  1. After installing Ubuntu run the installation script. NOTE : run the following commands to ensure installation of these packages.
pip3 install breathe
sudo apt install libcereal-dev libedit-dev doxygen
  1. create a directory devel and clone the treep_machines_in_motion package
  2. treep --clone DG_KUKA (clones kuka, kuka drivers, dynamic_graph_manager, dynamic_graph_manager dependencies, dynamic graph head, robot_properties_kuka)
  3. Turn off ROS in the CMake file in Dynamic graph Manager
  4. build the workspace in release mode colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF -DBUILD_TESTING=OFF

Configure the FRI connection

  1. Ensure that the Ethernet port from the Kuka box is connected to your PC
  2. Add yourself to the realtime user group
  3. Run sudo chown {username} /dev/cpu_dma_latency. Refer to the NYU MIM wiki for more info
  4. Configure the Ethernet port following the instructions on the NYU MIM Wiki

Running the KUKA

CONTROL PANEL SIDE

  1. Check if the correct application is running on the KUKA control pannel
  • From the main KUKA contorl pannel, select "Applications"
  • From the expanded menu select "StartDGM"
  1. To start the application, you need to press some buttons on the KUKA control pannel
  • Hold the gray deadman-switch to half
  • Pressing the green button starts the application
  • Hold the green button to keep the application running
  • When losing the green button, the application keeps running, but the motor brakes kick in
  • When holding the green button again, the robot moves back to the initial position and afterwards processes the received commands
  • NOTE: The initial position is hardcoded in the Java DGM software
  1. To avoid holding the green & gray button and also to allow faster motions, switch the mode to "automode"
  • Turn the key on the top (next to red emergency stop_ on the KUKA control pannel to the horizontal)
  • Select "Aut" (Auto) mode
  • By default the "T1" mode is used
  • T1: 25 % maximum velocity limit & deadman / start program switch must be pressed,
  • T2: 100% maximum velocity & deadman / start program switch must be pressed

If the program running on the KUKA control pannel has an error (e.g. because exceeding the joint limits, going too fast, ...)

  • Select the program from the top
  • Stop the program by clicking on the "document with red-cross" button

YOUR DESKTOP SIDE (using dg_head)

  1. Open one terminal and source ros, laas packages and your workspace
  2. run ros2 run dg_kuka dgm_iiwa_main
  3. Open another terminal. Source ros, laas and your workspace
  4. run python3 your_demo_file.py

YOUR DESKTOP SIDE (using dynamic_graph)

  1. Source workspace, ros & laas packages
  2. Start ros_core
  3. Start the dgm_iiwa executeable from the iiwa_robot (at point of writing Dec 18, 2019: ./build/catkin/robots/iiwa_robot/src/dgm_iiwa)
  • On the Kuka remote control, a dialog should pop up. Confirm to run DGM there.
  1. `rosrun dynamic_graph_manager run_command
  • Setup the controller that you want to execute
  1. Start the dynamic graph process rosservice call /dynamic_graph/start_dynamic_graph

Editing the Java

You may need this if you want to change the low-level PD gains of the Kuka or the hard-coded initial posture of the DGM application.

IMPORTANT: You will need to use a another Windows computer to synchronize it to the Kuka box (the embedded Windows 7 running on the Kuka box cannot be used for this purpose).

IMPORTANT: You need the SunriseWorkbench version 1.7 from ISO file we have in the lab - ask Sébastien - as the official installation DVD we have for SunriseWorkbench v 1.3 does not include the required FRI extension.

  • Use the SunriseWorkbench editor to modify the application running on the KUKA control panel (in Java)
  • Build and synchronize the Java code with the Kuka box
  • Once synchronized, the Java program shows up on the KUKA control pannel

Last time it was done was in September 2019 using the Mocap desktop.

Clone this wiki locally