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

How do I install a package on OSX without recompiling everything?

asked 2014-01-15 12:13:34 -0500

nckswt gravatar image

updated 2014-01-28 17:05:28 -0500

ngrennan gravatar image

I just installed ROS Hydro on OS X Mavericks, and I'm looking to install additional packages that weren't included in the full install.

I can't simply get the binaries (they're not on homebrew) so I need to go the manual route. My plan was to do this:

rosrlocate info PACKAGE | rosws merge -
rosws update
mv PACKAGE src/PACKAGE
rosdep install PACKAGE
catkin_make_isolated

Except when I do catkin_make_isolated, I recompile all the source files from the installation. Do I need to create a new rosws and install packages there? Is my ros_catkin_ws from the OS X install now more-or-less equivalent to /opt/ros/hydro, in that I shouldn't touch it but I should keep it on my ROS paths?

I wanted to get an idea of the standards before mucking about!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
7

answered 2014-01-15 12:48:21 -0500

William gravatar image

updated 2014-01-15 14:51:27 -0500

The recommended workflow is to build another workspace on top of the one in ~/ros_catkin_ws. Also for catkin, you should use rosinstall_generator and wstool. So you would do something like this:

mkdir ~/my_ws
cd ~/my_ws
wstool init src
source ~/ros_catkin_ws/install_isolated/setup.bash
rosinstall_generator PACKAGE --deps --exclude RPP | wstool merge -t src -
wstool update -t src
rosdep install --from-paths src --ignore-src
catkin_make_isolated --install
source ~/my_ws/install_isolated/setup.bash

wstool is the ROS agnostic replacement for rosws, and has most of the same functions, but you normally have to specify the target folder to act on, hence the -t src in the merge command. The wstool update -t src command will cause the packages you just added to be fetched.

rosinstall_generator is pretty new, and currently can only operate on released packages, but should be able to get packages from source in the future. The --deps --exclude RPP options to rosinstall_generator means get me that PACKAGE and its dependencies, recursively, excluding dependencies in my ROS_PACKAGE_PATH. This is the best way to create an "extension" on top of your existing workspace of ROS packages.

The --from-paths src and --ignore-src arguments to rosdep indicate that it should install all of the dependencies of packages found in the folder src and that it should not try to install packages found of the ROS_PACKAGE_PATH respectively.

Hopefully that helps, we are working on improving these tools and getting tutorials setup to give them more visibility to them.

edit flag offensive delete link more

Comments

Thanks for the awesome response! Sadly, it didn't entirely work as it never grabbed the source files. I merged your commands with the OS X install to come up with the answer below. This works when initializing the workspace – I'm not sure why `wstool merge -t src -` didn't grab the source files.

nckswt gravatar image nckswt  ( 2014-01-15 13:28:11 -0500 )edit
1

Oops, forgot to call `wstool update`.

William gravatar image William  ( 2014-01-15 14:13:06 -0500 )edit

Just because I'm going to use this post as a reference in the future, would you mind editing your codeblock to include the `--install` flag to catkin_make as well as a `source install_isolated/setup.bash` line? Thanks!

nckswt gravatar image nckswt  ( 2014-01-15 14:32:32 -0500 )edit
1

Sure, though the `--install` is optional.

William gravatar image William  ( 2014-01-15 14:51:00 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2014-01-15 12:13:34 -0500

Seen: 315 times

Last updated: Jan 15 '14