# Maintain packages build from source

I want to know how I get and maintain packages that I have to build from source.

So, I want to use the hector_quadrotor package on jade, so I started off trying to install the tutorial package, which was not build for jade, so I build it from source.

This involved me building several other packages from source as well. I don't know if my approach is the way you should do that with ROS (with catkin and jade), so I want to ask how you would do that?

1. So we start off with a catkin workspace (catkin_ws) where we want to use a source build package.
2. I follow the tutorial here in 1.2 and wsinit a folder in my catkin_ws/src folder.
3. If I want to build it, it says that there is a package missing: hardware_interface, it turns out that this package is not available for jade (yet), so I go ahead with my "missing package" algorithm which is the following:

4. I go to my catkin_ws/devel and do rosws set <name> --git <url_to_repository_with_package_or_stack>

5. I update the ws: rosws update <name>
6. I re-source: source catkin_ws/devel/setup.bash

Now, the silly part comes in: I COPY the package I need from catkin_ws/devel/<name>/ to catkin_ws/src/

So, e.g. for my case hardware_interface, I would checkout the ros_control (as <name>) and just copy everything out from there to my src folder. I can't just leave everything in devel (although it is in the CMAKE path), I have to copy EVERY individual package from the stack folder in devel to my src folder. That can impossibly be the way how this should work.

I was expecting that I point my workspace to a repository if it couldn't find it and it would download and maintain it on it's own.

edit retag close merge delete

Sort by » oldest newest most voted

2 . I follow the tutorial here in 1.2 and wsinit a folder in my catkin_ws/src folder.

Ok.

3 . If I want to build it, it says that there is a package missing: hardware_interface, it turns out that this package is not available for jade (yet), so I go ahead with my "missing package" algorithm which is the following:

hardware_interface is actually available on Jade (see debbuild/jade?q=hardware_interface), just not yet in the public repositories. Building from source is fine, but you may want to see whether you can use the ros-shadow-fixed repository.

4 . I go to my catkin_ws/devel and do rosws set <name> --git <url_to_repository_with_package_or_stack>

You're mixing wstool and rosws. Don't do that.

The reason you have to go to the devel folder is probably related to that.

5 . I update the ws: rosws update <name>

In a catkin workspace, please only use wstool. The arguments for set and update are the same.

And only do it in your src folder (which is where your .rosinstall file should be).

6 . I re-source: source catkin_ws/devel/setup.bash

But only after you've rebuilt your workspace .. right?

Finally: maybe you are already doing it, but you don't mention it: I'd recommend running a rosdep check --from-paths /path/to/your/catkin_ws/src --ignore-src between steps 5 & 6. That way you'll be sure you have all package dependencies installed, instead of having to find that out during catkin_make / catkin build.

Edit:

The problem is, that I don't know what tools I should use (wstool over rosws) and which I shouldn't.

I'm slightly confused: I thought I was quite clear when I wrote:

In a catkin workspace, please only use wstool.

Afaik, rosws was used with rosbuild workspaces, which is why it doesn't work quite so well with catkin.

Can you please tell me what my approach should be to get and build packages from source in a carkinws?

Basically what you've already been doing, but then only with wstool, and no trips to your devel space.

A concrete example (with wstool):

source /opt/ros/../setup.bash
mkdir -p /path/to/a/new/catkin_ws/src
cd /path/to/a/new/catkin_ws/src

wstool init .
wstool set <name> --git <url_to_repository_with_package_or_stack>
wstool up

cd /path/to/a/new/catkin_ws
# alternatively, use 'rosdep install ..' here directly
rosdep check --from-paths /path/to/a/new/catkin_ws/src --ignore-src

catkin_make
source devel/setup.bash


Alternatively, you could just do a git clone <url_to_repository_with_package_or_stack> in catkin_ws/src instead of using wstool. wstool comes in handy if you have many repositories to clone, and don't want to do it by hand.

more

Thank you very much! The problem is, that I don't know what tools I should use (wstool over rosws) and which I shouldn't. So rosdep is okay with catkin, but rosws and probably ros isn't... Can you please tell me what my approach should be to get and build packages from source in a carkinws?

( 2015-12-29 10:56:57 -0600 )edit

Thank you very much, very glad someone shed light on this! Regarding the tools: I know now that I should use wstool over rosws, but my question was: How do I know what tool sets I should use with catkin just from ROS, without asking you?

( 2015-12-29 11:34:15 -0600 )edit

@Druff sorry for the confusion. The wstool wiki page mentions that it replaces rosws for catkin packages: http://wiki.ros.org/wstool This wiki page also uses wstool in conjunction with catkin: http://wiki.ros.org/catkin/Tutorials/... I updated a few wiki pages with a note.

( 2015-12-29 13:52:06 -0600 )edit

@William A my bad. Thank you so much!

( 2015-12-29 14:28:07 -0600 )edit