ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How to use repositories ?

asked 2012-12-11 09:55:06 -0600

dmeltz gravatar image

updated 2012-12-11 10:24:12 -0600

Hello all.

I am new to Ubuntu and ROS, so I have a beginner question :

How do I use repositories ? For example I am interested in using the cob_environments stack. on the ros wiki I have found that this stack belongs to Source: git https://github.com/ipa320/cob_environments.git.

the question is what I do next ?

And also what I do when the stack located on SNV, for example : Source: svn https://utexas-art-ros-pkg.googlecode.com/svn/trunk/stacks/velodyne

thanks.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2012-12-11 13:21:10 -0600

Let's say you want to install the first stack you mentioned: cob_environments. Assuming you are on an officially supported version of Ubuntu and your repositories are setup correctly, you could first check if there are pre-built binaries available. For the cob_environments package, I could run

apt-cache search ros.*cob

in a terminal. On my system, I can see that there is a package called ros-fuerte-cob-environments. I could install this using apt-get, and the stack (plus all of its dependencies would be installed). For many users, if prebuilt binaries are available, this is the way to go.

In general when a stack or package is not available through your package manager you need to do the following things:

  1. Get a local copy of the source code, and make sure it is in your ROS_PACKAGE_PATH
  2. Check that you have all of the dependencies for that stack/package installed
  3. Install any missing dependencies. Tools like apt-get and rosdep are very useful for this!
  4. Compile the code

For the cob-environments stack, the only dependency that you likely don't have (assuming you have a "full-desktop" install of ROS) is cob_common This can be seen by looking at the dependencies link on the right side of this page. I'm going to walk you through installing cob_environments.

  1. To get a copy of the source code, we will use git. So first navigate to a directory that is on your ROS_PACKAGE_PATH, then run this command (you will need git installed)

    git clone https://github.com/ipa320/cob_environments
    
  2. We are going to use rosmake to try and build this package.

    rosmake cob_environments
    
  3. If you don't have cob_common, this will error out, and you will need to clone cob_common and build that before you can build cob_environments.

    git clone https://github.com/ipa320/cob_common
    rosmake cob_common
    
  4. You should now be able to re-run rosmake cob_environments. If the process completes successfully, you should now have the stack successfully installed!

Note the process with SVN or CVS or Mercurial would be basically the same, but the actual commands for obtaining a copy of the repository would be slightly different.

edit flag offensive delete link more

Comments

Thank you jarvisschultz. it works perfectly! very detailed and useful answer !

dmeltz gravatar image dmeltz  ( 2012-12-12 08:34:50 -0600 )edit

No problem! @KruseT's answer is not quite complete, but he definitely points out some useful tools. If you are using ROS long-term, checking out the link he posted at some time is probably worth it.

jarvisschultz gravatar image jarvisschultz  ( 2012-12-12 09:59:53 -0600 )edit
3

answered 2012-12-11 23:19:22 -0600

KruseT gravatar image

Create a development environment using rosws: http://mirror.umd.edu/roswiki/doc/api/rosinstall/html/

Then do this:

$ roslocate info cob_environments | rosws merge -
$ rosws update

this will take care of the details. The same goes for velodyne:

$ roslocate info velodyne | rosws merge -
$ rosws update
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-12-11 09:55:06 -0600

Seen: 635 times

Last updated: Dec 11 '12