ROS Wrapper

From youBot wiki
Revision as of 12:17, 19 December 2014 by Florek-jasinska (Talk | contribs) (Created page with "The ROS wrapper of the youbot driver (or KUKA youBot API) provides an interface of the youbot driver to the ROS framework. With this wrapper you can move the base and the arm...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The ROS wrapper of the youbot driver (or KUKA youBot API) provides an interface of the youbot driver to the ROS framework. With this wrapper you can move the base and the arm of the youBot by sending ROS messages. The proprioceptive sensor measurements like odometry and joint angles of the youBot arm and the wheels are published on ROS topics.


Installation

ROS Indigo

No debian packages of the wrapper exist so far for ROS Indigo. Please use the source install as described below for ROS Hydro.


ROS Hydro

Debian packages

First you need to install ROS Hydro as it is described in [1] We recommend to use the ros-hydro-desktop or a more complete version.

To install the youBot API wrapper enter in a command shell

sudo apt-get install ros-hydro-youbot-driver-ros-interface
sudo setcap cap_net_raw+ep /opt/ros/hydro/lib/youbot_driver_ros_interface/youbot_driver_ros_interface
sudo ldconfig /opt/ros/hydro/lib

The first line will install the required dependencies as well, in particular

  • ros-hydro-youbot-driver for the KUKA youBot API itself and
  • ros-hydro-brics-actuator for the ROS messages to control the youBot arm

The configuration files for the youbot driver are stored in the folder /opt/ros/hydro/shared/youbot_driver/config


Installation by source

You are free to compile and change the source code of the driver and the ROS wrapper yourself.

It is not required to uninstall the youbot driver and the ROS wrapper if installed from the debian packages. Nevertheless you still may want to do that in order to avoid possible confusion:

sudo apt-get remove ros-hydro-youbot-driver

If not already done, create a catkin workspace that will hold the youBot ROS packages (see the catkin documentation for more information). In the following we assume the workspace folder as ~/catkin_ws. If you chose another folder just adatpt the following instructions accordingly.

In order to checkout the KUKA youBot API and the wrapper into the catkin workspace, to compile and set the required rights for EtherCAT access, enter

cd ~/catkin_ws/src
git clone http://github.com/youbot/youbot_driver.git -b hydro-devel
git clone http://github.com/youbot/youbot_driver_ros_interface.git -b hydro-devel
cd ..
catkin_make
sudo setcap cap_net_raw+ep devel/lib/youbot_driver_ros_interface/youbot_driver_ros_interface

In this setup, the configuration files for the youbot driver are stored in the folder ~/catkin_ws/src/youbot_driver/config


ROS Groovy

see youBot OODL


ROS Fuerte / Electric

see ROS Wrapper for KUKA youBot


Usage

To start the driver and the wrapper open a terminal and enter the following command:

roslaunch youbot_driver_ros_interface youbot_driver.launch

The driver should now try to detect the youBot's EtherCAT slaves. If any error occurs check here for possible solutions.

For moving the arm you can enter in another terminal (while the wrapper keeps running)

rostopic pub /arm_1/arm_controller/position_command brics_actuator/JointPositions '{positions:[ {joint_uri: arm_joint_1, unit: rad, value: 1.0}]}'

This will turn the first joint a little bit.

Two test programs come with the wrapper in addition. A keyboard teleoperation:

rosrun youbot_driver_ros_interface youbot_keyboard_teleop.py

and a test program to set all joints

rosrun youbot_driver_ros_interface youbot_arm_test