Wiki

Clone wiki

scl-manips-v2 / iiwa / iiwa_main

Kuka IIWA

Install ROS

  • Install the "hydro" version. See these Instructions
  • To check if you already have it:
$ ls /opt/ros/hydro

Get the Config specification and robot model

  • Contact Samir..

Set up the ros environment

  • The full tutorial is on this: www. However, feel free to just perform the following steps...
  • We will add the commands from the ROS wiki here for your convenience (if stuff doesn't work, look at the wiki; our commands might be stale):
$ source /opt/ros/hydro/setup.bash 
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ catkin_init_workspace
$ cd ~/catkin_ws/
$ catkin_make
$ source devel/setup.bash

Make your life easy; Avoid sourcing config files from bash

  • You might want to add the following commands to the end of the "/home/your-uid/.bashrc" file to avoid doing it again and again.
source /opt/ros/hydro/setup.bash
source /home/brian/catkin_ws/devel/setup.bash
export ROS_MASTER_URI=http://192.168.168.1:11311
export ROS_IP=192.168.168.1

In terminal:

$ source ~/.bashrc

Load our custom IIWA driver

  • We have a special wrapper for operating the IIWA.
  • Get the iiwa code and place it in the catkin dir. i.e., do this:
$ cd ~/catkin_ws/src
$ git clone https://bitbucket.org/khansari/iiwa.git IIWA

Build your own code

  • Do this if you change the IIWA interface code
  • Next make your code
$ cd ~/catkin_ws
$ catkin_make

Running the Robot 1: ROS Server Stuff

  • Open any terminal, and type:
$ roscore

Remember that if you can't find ros stuff, you need to source the ros bash config file again. $ source /opt/ros/hydro/setup.bash

  • Run ROS (from any dir, but preferably the catkin_ws directory)
$ rosrun IIWA IIWA-bin

If this doesn't work, there are probably some incorrect paths somewhere. Find the executable and run it yourself. $ find . -name iiwa-bin will help you find the executable when run from the ~/catkin_ws folder.

  • This will put the robot in gravity balancing mode and start printing the end-effector position:
ee_pos_x  ee_pos_y  ee_pos_z
  • NOTE: While this program runs, you can operate the robot.
    • Press "ctrl+c" to stop the program. This will stop the robot in its current position (and prevent your buggy code from breaking your head).
    • NOTE2: The orange thing does not have to be restarted the next time you run the rosrun stuff.

Running the Robot 2: Turn on Robot

Pick up the annoying orange industrial contraption with buttons and knobs on it.

  • Run through this archaic ritual to start the robot

Step 1 : Push the button

Step1.jpg

Step 2 : Push the buttons (in order)

Step2b.jpg

Step 3 : Flick the switch (Use much brain power, this does)

Step3.jpg

Step 4 : On the new screen: Push the button (I hope you're still alive)

Step4.jpg

Step 5 : Flick the switch back (Who designed this?)

Step5.jpg

Step 6 : Push the green button (You know you were waiting for this one...)

Step6.jpg

Step 7 : Go back and look at the terminal running the server (Phew... finally...)

Step7.png

You are now ready to write and run your own code. Move to the next tute

Updated