/iiwa_tutorials

ROS package for KUKA LBR iiwa tutorial

Primary LanguageC++BSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

iiwa_tutorials

support level: community License: BSD repo size

  • ROS package for KUKA LBR iiwa 14 R820 tutorial.
  • Docker for simulation and control environments for KUKA LBR iiwa 14 R820.

Dependencies

Docker build environments

LBR iiwa 14 R820

Installation

  1. Follow iiwa_stack wiki to setup a package with Sunrise Workbench

  2. Connect an Ethernet cable between the host computer and the Ethernet port of controller
  3. Set the network configuration as below
    • The ros node expects to reach the robot at the IP 172.31.1.147
    • The ROS nodes on the robot side expects to reach the ROS master at the IP 172.31.1.150
    • This is set with the pendant as below
    • The ROS_IP and ROS_MASTER_URI must be set as below in .bashrc
  4. Build the docker environment as below (if you use the docker, this must be set in docker container)
    sudo apt install byobu && git clone git@github.com:takuya-ki/iiwa_tutorials.git --depth 1 && cd iiwa_tutorials && COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose build --no-cache --parallel  

Usage with docker

Using utility scripts

  1. Build and run the docker environment
  • Create and start docker containers in the initially opened terminal
    docker compose up
  1. roscore on the host machine or in the docker container
  • This application requires having a ROS Master running on the ROS machine connected to the cabinet. (iiwa_stack wiki)

Simulation

  1. Run a demonstration on the host machine
  • Executing a pick-and-place demonstration
    ./utils/iiwa_pp_fake.sh
    • Initialize the eef pose
      initialize
    • Demonstrate pick-and-place of a object
      pp

Real robot

  1. Run the application ROSSmartServo on the KUKA Smartpad
  2. Run a demonstration on the host machine
  • Testing the moveit with GUI

    xhost + && docker exec -it iiwa_container bash -it -c "roslaunch iiwa_tool_moveit moveit_planning_execution.launch sim:=false"
  • Executing a wiggle demonstration

    xhost + && docker exec -it iiwa_container bash -it -c "rosrun iiwa_tutorials wiggle"
  • Executing a repetitive motion

    xhost + && docker exec -it iiwa_container bash -it -c "rosrun iiwa_tutorials sendmotion_loop"
  • Executing a repetitive linear motion

    xhost + && docker exec -it iiwa_container bash -it -c "rosrun iiwa_tutorials sendmotion_loop_lin"
  • Executing a repetitive motion with ROS Action

    xhost + && docker exec -it iiwa_container bash -it -c "rosrun iiwa_tutorials sendmotion_loop_action"
  • Executing a pick-and-place demonstration

    ./utils/iiwa_pp.sh
    • Initialize the eef pose
      initialize
    • Demonstrate pick-and-place of a object
      pp

Successfull termination

  1. Terminate the demonstration
  2. Stop the application ROSSmartServo on the pendant
  3. In the end, kill the roscore process if you need

Manually execute commands

  1. Build and run the docker environment
  • Create and start docker containers in the initially opened terminal
    docker compose up
  • Execute the container in another terminal
    xhost + && docker exec -it iiwa_container bash
  1. Run a demonstration in the container
    byobu
    • First command & F2 to create a new window & Second command ...
    • Ctrl + F6 to close the selected window

Author / Contributor

Takuya Kiyokawa

We always welcome collaborators!

License

This software is released under the MIT License, see LICENSE.