# installing ROS packages from source

On the ROS website, many of the packages have step-by-step instructions on how to install them, or they are installed with the "desktop full install". However, there are also many packages, such as ar_kinect, that do not have these instructions. How do you install them?

P.S. I would prefer a general answer that could be applied to other situations.

edit retag close merge delete

Sort by » oldest newest most voted

If there is no Debian package available, the general approach is to use a combination of roslocate and rosinstall. There are quite some questions on this topic here on answers.ros.org already and as makokal pointed out, there is also some information on the wiki. I will just summarize the general steps users normally do:

First, you should create an overlay. We will create it in ~/ros. An overlay is basically a local ros installation you have write permissions on. Users normally put source packages in their overlay and manage it with rosinstall. This step needs to be done only once.

rosinstall ~/ros /opt/ros/diamondback
echo "source ~/ros/setup.bash" >> ~/.bashrc


Now you can use roslocate to create rosinstall files which can then be installed. Let's assume you want to find and install the stack (or package) foo.

roslocate info foo > foo.rosinstall
rosinstall ~/ros foo.rosinstall


The fist thing you should do now is to either re-source ~/ros/setup.bash or open a new terminal. Then just rosmake the package you are interested in.

Please note that it normally makes sense to install complete stacks, not just single packages. The reason is that stacks are units containing related packages.

When trying to build your package, rosmake might fail because of unsatisfied dependencies, so you might need to iterate the above procedure to satisfy all of them by hand.

more

If you have rosinstall tool setup, it should be ver handy in installing extra packages using:

roslocate info [package_name]


For further ref, on roslocate and rosinstall in general, check this wiki.

For some packages which don't have wikis created yet, but are listed as dependancies e.g vop in visodo package, you can get the url with the source by searching on the packages list here.

more

If there is no prebuilt package, you need to install from source.

In general there should be a URL pointing to a code repository that you need to checkout.

This should create a directory and rosmake should do the job.

more

They all seem to take me to <googlecode.com> sites where I can just see the relationship between the files and read them. I am either missing a different link, or I simply don't understand what I am supposed to do on this page. Also, where is the source code that I can install it with?
( 2011-07-15 07:35:00 -0500 )edit
1
Referring to the ar_kinect package you asked, there is a source code URL given: Source: svn http://albany-ros-pkg.googlecode.com/svn/trunk/albany_vision/ar_kinect. That is the URL to give to (in this case) svn co.
( 2011-07-15 10:41:11 -0500 )edit
I do not know very much about UNIX. What command can I actually use to install this?
( 2011-08-03 01:56:34 -0500 )edit
look at the rosinstall wiki pakge http://www.ros.org/wiki/rosinstall#Installation
( 2011-08-03 02:05:25 -0500 )edit