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

ROS build single package

asked 2015-11-16 11:52:35 -0500

MarkG gravatar image

updated 2015-11-17 01:46:06 -0500

gvdhoorn gravatar image

I am developing on a BeagleBone Black, running Debian Wheezy, using ROS Indigo. All the packages I need to use need to be compiled, which is no big deal.

But, right now when I need to compile a single package, all the packages are re-built. Currently I'm up to about 78 packages that I am building every time I add a new one, and that takes about 2 hours.

The steps I am using to build are (these are steps listed here section 3) :

rosinstall_generator ros_comm ros_control joystick_drivers --rosdistro indigo --deps --wet-only --exclude roslisp --tar > indigo-custom_ros.rosinstall

(add my new package to the list above step)

wstool merge -t src indigo-custom_ros.rosinstall
wstool update -t src

rosdep install --from-paths src --ignore-src --rosdistro indigo -y -r --os=debian:wheezy

sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/indigo

in the last step, can I add the --pkg <name> command somewhere in there so I can only compile that one package? Like this?

sudo ./src/catkin/bin/catkin_make_isolated ***--pkg name***  --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/indigo

Is there another way? Is anything going to break if I do this?


edit retag flag offensive close merge delete


Are you saying that all packages get rebuilt (so compiler, linker, etc), even if nothing has changed to those already built? Or just that catkin iterates over all pkgs in your workspace, and that takes a long time?

gvdhoorn gravatar image gvdhoorn  ( 2015-11-17 01:48:07 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-11-17 03:47:14 -0500

dornhege gravatar image

You've already found the matching option. This is the right way of doing it. I'm not sure what other/easier way there should be besides specifying the package name.

There is another way that you might want to go, which is more setup work for now, but should be better in the long run. This is under the assumption that your new package is a development package by you and that there are no packages dependent on that in the others (i.e., yours is on the bottom of the dependency chain).

Just setup a new catkin workspace (in your home) and source your install workspace's before. This is the "normal" way, when using a system installed ROS and besides that you compiled from source there is no difference to that.

edit flag offensive delete link more


Thanks dornhege, that's what I was hoping. I'll give it a try today. I normally have a separate workspace for custom packages, but I am trying to keep the released ROS packages and my packages separate.

@gvdhoorn - a combination of both. There are some packages that recompile/link every time (camera_calibration_parsers is an example), while others just check to see if anything changed. All the messages are rebuilt everytime. And yes it takes that long. I'm compiling on the BeagleBone, from a SDcard, so I have to look into the speed there.

MarkG gravatar image MarkG  ( 2015-11-17 07:28:09 -0500 )edit

Question Tools

1 follower


Asked: 2015-11-16 11:52:35 -0500

Seen: 651 times

Last updated: Nov 17 '15