Installation - Linux

Overview

This section describes the installation process for Linux.

Target audience

Linux people who want to compile Kobuki driver, but not use ros

Procedure

Prerequirements

We use wstool to manage our workspace, so first install it:

  sudo apt-get install python-wstool

Starting with version 0.3.0, the Kobuki driver is a catkin package, so first of all you need to install catkin dependencies:

You can resolve these dependencies on Ubuntu with this command:

  sudo apt-get install cmake python-catkin-pkg python-empy python-nose python-setuptools build-essential

If you are not on Ubuntu you can install Python packages from PyPi via pip.

Refer to the Catkin documentation for more details.

Catkin workspace

Next we must prepare a catkin workspace. Here we explain the manual way, completely independent from ROS tools (apart from catkin itself):

  # Create a workspace directory tree somewhere in you file system
  mkdir -p ~/kobuki_ws/src
  mkdir -p ~/kobuki_ws/build
  cd ~/kobuki_ws/src
  # Clone catkin repository
  git clone https://github.com/ros/catkin.git
  # These instructions have been tested with catkin version 0.5.63, so we suggest to use that version
  cd catkin ; git checkout 0.5.63 ; cd ..
  # We need this file on src directory
  cp catkin/cmake/toplevel.cmake CMakeLists.txt

Now we add the required repositories with wstool. For groovy type:

  wstool init
  wstool set kobuki --git -v groovy-devel https://github.com/yujinrobot/kobuki.git
  wstool merge https://raw.github.com/stonier/ecl_core/groovy-devel/ecl.rosinstall

and for hydro:

  wstool init
  wstool set kobuki --git -v hydro-devel https://github.com/yujinrobot/kobuki.git
  wstool merge https://raw.github.com/stonier/ecl_core/hydro-devel/ecl.rosinstall

And finally download the code:

  wstool update

Configure and compile Kobuki driver

Kobuki driver depends on ECL libraries, which in turn depends on Eigen libraries, so we install them:

  sudo apt-get install libeigen3-dev 

We are ready to configure our workspace. Note that we pass a white list to cmake to avoid compiling all but the Kobuki driver and its required packages. The tricky command just reads the white list file, replaces line breaks by semicolons and adds double quotes to the list to avoid problems with white spaces and tabs. Note also that we change the installed software location to ../install (the default is /usr/local). Feel free to change it to wherever you want.

Warning:
White list packages parsing is sensitive, so be careful if for any reason you need to modify this file. Do not add extra characters other than package names, spaces, tabs and line breaks. It also must be exhaustive, including all upstream dependencies.
  cd ~/kobuki_ws/build
  KOBUKI_DRIVER_LOCATION=../install
  KOBUKI_DRIVER_PACKAGES="`sed -n -e ":a" -e "$ s/\n/;/gp;N;b a" ../src/kobuki/kobuki_driver/catkin_whitelist`"
  cmake ../src -DCATKIN_WHITELIST_PACKAGES=$KOBUKI_DRIVER_PACKAGES -DCMAKE_INSTALL_PREFIX=$KOBUKI_DRIVER_LOCATION

If all went well, you are ready to compile and install

  make
  # Optional step, if you want to install the binaries, headers and extra files to KOBUKI_DRIVER_LOCATION
  make install 

Testing your installation

Assuming you executed make install, you can test your installation by executing some of the demo and test programs provided with Kobuki driver. Unless you specified a Linux standard installation path, as /usr or /usr/local, for the KOBUKI_DRIVER_LOCATION, you must point your LD_LIBRARY_PATH variable to the installed libraries. For example, if you type the following commands, the robot should move making squares:

  export LD_LIBRARY_PATH=$KOBUKI_DRIVER_LOCATION/lib
  $KOBUKI_DRIVER_LOCATION/lib/kobuki_driver/demo_kobuki_simple_loop

Cross compiling

We still have not prepared proper cross-compiling documentation, but we will be happy to help you meanwhile.

Additional support

Do not hesitate to ask on Kobuki users list if you need additional support.



kobuki_driver
Author(s): Daniel Stonier , Younghun Ju , Jorge Santos Simon
autogenerated on Mon Oct 6 2014 01:31:10