The Yujin iClebo Kobuki robot is a two wheeled differential drive robot base designed for education and research. The Kobuki sports a 351.5mm wide circular body, several power connectors, expansion pins, buttons and LED’s in the rear, a large bumper with three switches in the front, and high resolution wheel encoders for odometry measurements. Yujin has graciously released a number of open source drivers and packages for the Kobuki robot, tailored for both the Robot Operating System (ROS) and standalone operation.Hardware
I used a Gumstix Overo COM on a Tobi expansion board running Ubuntu 15.04 and ROS Jade because of the need to natively build the Kobuki packages and its many dependencies. I also wanted to lean on the ‘aptget’ package manager for some of these dependencies.Load Ubuntu 15.04
First you’ll need to get the latest Ubuntu 15.04 from the Gumstix software page for your COM and dd it onto a microSD card (at least 4GB in size). After the dd, if you are using a microSD card greater than 4GB, the system may have treated it like a 4GB card and left the remainder as unallocated memory. To fix this, launch a partition editor like gparted and expand the current partition to make use of the remaining space.
After you boot into Ubuntu, you’ll want to enable WiFi on your COM (if it supports it) so you can SSH into it and operate your Kobuki robot completely wirelessly! To do this, follow the guide written by Arun Bharadwaj.Install ROS Jade
After the reboot, you’ll want to install ROS Jade from source on your Gumstix COM. When you get to step 2.1.1, make sure to install ROSCOMM(bare bones) so you don’t flood your SD card with graphical and simulation tools that won’t be able to run well on a COM.
Now is a good time to test if your ROS installation was successful. Run through the first couple of tutorials for writing nodes in ROS. If you are successful in sending and receiving messages within your COM, try sending and receiving messages with another computer (you will want to do this if you want to use the navigation stack, or send sensor data back to your host machine to process).
Add the following lines to your ~/.bashrc:
# ROS environment sentup source ~/ros_catkin_ws/install_isolated/setup.bash export LC_ALL=”C” export ROS_HOSTNAME=ubuntu export ROS_MASTER_URI=http://192.168.1.xxx:11311
We set our
ROS_HOSTNAME so the other systems on the network can identify us.
ROS_MASTER_URI is the ip address and port of the ROS master (where roscore is being run).
Next add your host information to the COM’s /etc/hosts file, and add the COM’s information to the host’s /etc/hosts file so they can identify each other.Build the Kobuki Packages
Now we can start building the Kobuki ROS packages. Make a new catkin workspace (or you can re- use the workspace you made following the tutorials above):
$ mkdir p ~/kobuki_catkin_ws/src $ cd ~/kobuki_catkin_ws/src $ catkin_init_workspace $ cd ~/kobuki_catkin_ws/ $ catkin_make
Now you’ll have the workspace setup for building Kobuki packages, add the following lines to your ~/.bashrc file:
Next clone the Kobuki repo:
$ cd ~/kobuki_catkin_ws/src $ git clone https://github.com/yujinrobot/kobuki.git
Let's start removing the packages we won’t need (to save some build time). Have a look at the Kobuki ROS wiki to find out what each package does. Right off the bat I removed kobuki_auto_docking because I don’t have a dock, and kobuki_description because that provides a description of the robot for navigation, which I won’t be doing with the COM (you will want this installed on your host computer if you want to use Kobuki in rviz). I also remove kobuki_controller_tutorial.
Let's try to build the packages:
$ cd ~/kobuki_catkin_ws $ catkin_make_isolated install
We use catkin_make_isolated because there will be some noncatkin packages to be built. You can also add the
[pkgname] flag to build a specific package.
Now we should run into our first dependency error:
Could not find a package configuration file provided by "nodelet" with any of the following names: nodeletConfig.cmake nodeletconfig.cmake
We notice that this was thrown when catkin tried to build kobuki_bumper2pc. Look up the wiki for the package being built, and check its dependencies on the right hand side under “package links”.
Notice that “nodelet” is listed and hyperlinked, click that to go to the nodelet wiki page, which will contain a list to the source for nodelet, add this package to your kobuki_catkin_ws/src directory and catkin_make_isolated again:
$ mkdir p ~/dump_ros_pkgs_here && cd ~/dump_ros_pkgs_here $ git clone https://github.com/ros/nodelet_core.git $ cd nodelet_core
Let’s only keep the packages we need (nodelet), save everything else in ‘dump_ros_pkgs_here just in case:
$ mkdir p ~/kobuki_catkin_ws/src/nodelet_core $ cp rf nodelet ~/kobuki_catkin_ws/src/nodelet_core/ $ cd ~/kobuki_catkin_ws # now we build nodelet and then kobuki_bumper2pc $ catkin_make_isolated install pkg nodelet bumper2pc
And we notice that “nodelet” is missing the dependency “bondcpp”.
Continue building dependencies recursively until you can
catkin_make_isolated --install your whole workspace without any errors.
One of the nodelet dependencies (class_loader) depends on the POCO C++ library which listed in the class_loader dependencies as libpocodev without a hyperlink. This is where choosing Ubuntu as the OS of choice seems to shine, we can simply run sudo aptget install libpocodev and that immediately solves the problem. If the same error pops up again after sudo aptget, try removing all the class_loader directories in ~/kobuki_catkin_ws/*_isolated and run catkin_make_isolated again.Running the Kobuki Nodes
When you are able to build the necessary packages without errors, give your COM a reboot. You should be able to run through most of the Kobuki ROS tutorials now!
I am able to run kobuki_keyop and kobuki_random_walker on the COM just fine. I also managed to get kobuki_bumper2pc running on the COM, and with kobuki_description running on my host machine, I was able to visualize odometry and bumper point cloud data in rviz. With some more work with the navigation stack, one should be able to perform SLAM with only bumper data (like a blind robot with a walking stick!).
- Posted in Tutorials