September 13, 2012 by Administrator
The basic idea of the KUKA youBot API is to represent a robot system as a combination of decoupled functional sub-systems. That is, this API represents manipulator arm and base platform as the combination of several joints. At the same time each joint is defined as a combination of a motor and a gearbox.
There are three main classes in the youBot API that a user should be aware of. These are
YouBotManipulator class that represents youBot arm as the aggregation of several joints and a gripper
YouBotBaseclass that represents youBot base platform
YouBotJoint class that represents joints which make up both the manipulator and the base
A default method to install youBot software is to use “ROS” as installation tool (not as middleware). The second option is to use CMake to compile the driver. For both methods you have to download the source files first.
$ cd /home/youbot
$ git clone https://github.com/youbot/youbot_driver.git
ROS as compile tool
Compiling with rosmake is usually a bit more convenient compared to calling CMake directly, thus it is
the recommended way. This method requires an installed instance of ROS. It is important to add the
/home/youbot/youbot_driver folder to the $ROS_PACKAGE_PATH environment variable, so that ROS can find this directory (for more information see KUKA-youBot-UserManual chapter 8.1.1). After that you can compile the driver as follows:
$ rosmake youbot_driver
After the build process has finished without failures the driver is ready for use.
CMake as compile tool
If ROS is not available, you can also call CMake directly to compile the youbot drivers. First download the driver sources as described above. In order to compile enter in a command shell:
$ cd youbot_driver
$ mkdir build
$ cd build
$ cmake ..
If no error occurs the driver is now ready to use. In order to let other applications find it, you need to add an environment variable $YOUBOTDIR that points to the driver's folder:
$ gedit ~/.bashrc
Insert the following line:
To make the change active just start a new command window or enter
$ source ~/.bashrc
Every youBot joint is represented as a youBot::YouBotJointclass in the API. At this stage the API does not make a distinction if it is a base joint which powers a wheel or a manipulator joint. youBot::YouBotBase and youBot::YouBotManipulator are aggregate classes that allow access to a particular joint instance through youBot::YouBotJoint.
In order to set and get setpoint values or read some sensors from joints, one has to use the youBot::JointData group of classes, e.g. youBot::JointVelocitySetpoint or youBot::JointSensedCurrent. To configure parameters of a joint you have to use the JointParameter group of classes. This could be for instance youBot::MaximumPositioningSpeed. For more detailed information on class and methods please refer to the API documentation.