Autonomous Field Robotics Lab
Swearingen 1D49
Author: Christopher McKinney
Project: Infrastructure
Robot: cookie-cutter
Make & Model: Kuka Youbot
Documentation: Setup
Topic: OS Install


First Attempt: Installing from scratch

See document: Youbot User Manual KUKA-youbot_UserManual.pdf, Chapter 5

Friday, May 8, 2015

Ubuntu 14.04

Downloaded 64-bit iso from here.

Copied iso to USB drive on OS X with:

$ sudo dd if=ubuntu-14.04.2-desktop-amd64.iso of=/dev/disk1 bs=4096

Inserted USB drive into youbot. Started up youbot into grub, entered command line:

grub> ls
(hd0) (hd0,msdos5) (hd0,msdos1) (hd1) (hd1,msdos1)
grub> set root=(hd1)
grub> chainloader +1
grub> boot

Got Ubuntu install window. Selected language "English" and "Install Ubuntu" button. Selected "Download updates while installing" (connected via ethernet) and "Install this third-party software," then "Continue." Selected "Erase disk and install Ubuntu," then "Continue." Selected "Continue" in dialog. Entered "Columbia, South Carolina," then "Continue." Selected "English (US)" --> "English (US)," then "Continue." On page "Who are you?" entered:

Selected "Log in automatically," then "Continue."

Followed instructions through installation and updated software, as prompted.

ROS Indigo

ROS Wiki Article

Set up sources, update, and install:

$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" \
        > /etc/apt/sources.list.d/ros-latest.list'
$ wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install ros-indigo-desktop-full
$ sudo rosdep init
$ rosdep update
$ echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
$ sudo apt-get install python-rosinstall

Saturday, May 9, 2015

Youbot Driver & Example Applications

Youbot Wiki Article

Created catkin workspace (ROS Wiki Article):

$ mkdir -p ~/youbot_driver_ws/src
$ cd ~/youbot_driver_ws/src
$ catkin_init_workspace
$ cd ..
$ catkin_make
$ source devel/setup.bash

Downloaded hydro-devel (or master if indigo support is added) branch of youbot_driver to src:

$ cd src
$ git clone http://github.com/youbot/youbot_driver -b hydro-devel

Edited youbot_driver/config/youbot-ethercat.cfg (used ifconfig to determine EtherCAT device name):

EthernetDevice = eth1

For the following config files, assumed mobile base & one manipulator. See the Youbot User Manual for alternate configurations. Checked youbot_driver/config/youbot-base.cfg:

BaseLeftFront = 1
BaseRightFront = 2
BaseLeftBack = 3
BaseRightBack = 4


Checked youbot_driver/config/youbot-manipulator.cfg:

ManipulatorJoint1 = 5
ManipulatorJoint2 = 6
ManipulatorJoint3 = 7
ManipulatorJoint4 = 8
ManipulatorJoint5 = 9


Downloaded youbot_applications to src:

$ git clone http://github.com/youbot/youbot_applications

Built & installed:

$ cd ..
$ catkin_make
$ catkin_make install

Sunday, May 10, 2015

Building an example application

Built hello_world_demo:

$ cd ~/youbot_driver_ws/src/youbot_applications/hello_world_demo/
$ mkdir build
$ cd build
$ source ~/youbot_driver_ws/install/setup.bash
$ cmake ..
$ make
 #include "youbot/YoubotBase.hpp"
$ make clean
Error notes

Not properly finding youbot headers. The headers are in ~/youbot_driver_ws/install/include/youbot_driver/. OODL_YOUBOT_INCLUDE_DIR is not being set in cmake. Cmake is not searching for the OODL_YouBot package? Not reaching end of ROS IF-block in cmake.

Partial Fix:

$ cmake .. -DUSE_ROS=OFF \
> -DOODL_YOUBOT_INCLUDE_DIR=/home/youbot/youbot_driver_ws/install/include/youbot_driver/
> -DOODL_YOUBOT_CONFIG_DIR=/home/youbot/youbot_driver_ws/install/share/youbot_driver/config/
$ make
 #include <osal.h>
$ make clean
$ rm CMakeCache.txt

Partial Fix #2:

$ cmake .. -DOODL_YOUBOT_INCLUDE_DIR=/home/youbot/youbot_driver_ws/install/include/youbot_driver/
$ make
 #include <osal.h>
$ make clean
$ rm CMakeCache.txt

osal.h is at


Tried a lot of things. At the end of the day, I don't think it's worth it.

A few more things... Modified ../CMakeLists.txt to recursively include subdirectories of ~/youbot_driver_ws/install/include/youbot_driver/ as system include directories. Ran make &>make.log with this configuration. A few more modifiacations... FIXED!


Modified ../CMakeLists.txt to include:

## CMcKinney - Includes all subdirectories of the youbot driver (except those
## with "win32" in the path) as system includes
MACRO(HEADER_DIRECTORIES return_list base_dir)
    FILE(GLOB_RECURSE new_list "${base_dir}/*.h")
    SET(dir_list "")
    FOREACH(file_path ${new_list})
        GET_FILENAME_COMPONENT(dir_path ${file_path} PATH)
        STRING(FIND ${dir_path} "win32" win32_loc)
        IF(${win32_loc} EQUAL -1)
            SET(dir_list ${dir_list} "${dir_path}")
    SET(${return_list} ${dir_list})

The application can be compiled with:

$ cd ~/youbot_driver_ws/src/youbot_applications/hello_world_demo/
$ mkdir build
$ cd build
$ source ~/youbot_driver_ws/install/setup.bash
$ cmake .. -DOODL_YOUBOT_INCLUDE_DIR=/home/youbot/youbot_driver_ws/install/include/youbot_driver/
$ make

I don't feel comfortable running the application until the lights come back on. (The lights turn off at Swearingen after 1 AM. It is currently 3:43.)

Monday, May 11, 2015

Lights are back on!

Running an example application

Ran hello_world_demo:

$ cd ../bin
$ sudo ./youbot_HelloWorldDemo

It worked!

Tuesday, May 12, 2015

Kinect Drivers

Wanted to be consistent with turtlebots... Turtlebots use specialized drivers. Will use OpenKinect.

TODO: figure out how to supply 12V to Kinect.

$ sudo apt-get install libglut3-dev libxmu-dev libxi-dev libusb-1.0-0-dev
$ git clone https://github.com/OpenKinect/libfreenect.git
$ cd libfreenect
$ mkdir build
$ cd build
$ cmake ..
$ make
$ sudo make install

To test:

$ cd libfreenect/build/bin/
$ sudo ./glview

Hokuyo Laser Range Finder Drivers

$ wget http://www.hokuyo-aut.jp/02sensor/07scanner/download/data/vmon_linux.zip
$ unzip vmon_linux.zip
$ cd vmon_linux
$ sudo apt-get install libboost libboost-date_time
$ sudo apt-get install libboost-filesystem libboost-thread libxmu6 libxxf86vm1
$ sudo dpkg -i libscipcomm_0.2_i386.deb vmon_0.2_i386.deb
$ sudo groupadd usb
$ sudo usermod -aG usb youbot

Add the line SUBSYSTEMS=="usb", KERNEL=="ttyACM[0-9]*", ATTRS{manufacturer}=="Hokuyo Data Flex for USB", ATTRS{product}=="URG-Series USB Driver", MODE="0666", SYMLINK+="sensors/hokuyo" to /etc/udev/rules.d/47-hokuyo.rules

To test, run vmon, right click, select "Connect," then /dev/sensors/hokuyo

Actually ended up doing:

ROS Wiki Hokuyo Node Article

$ sudo apt-get install ros-indigo-hokuyo-node

Youbot Laser Notes

Following these tutorials.

Added export LIBGL_ALWAYS_SOFTWARE=1 to .bashrc

$ roscore &
$ rosrun hokuyo_node hokuyo_node &
$ rosrun rqt_reconfigure rqt_reconfigure &
$ rosrun rviz rviz -d "$HOME/Documents/hokuyo_test.rviz" &