0
$\begingroup$

Rosanswers logo

I try to create a catkin workspace and add some packages from git-repositories to it. the manual process seems straight forward:

mkdir my_ws; cd my_ws; mkdir src; catkin_make
source devel/setup.bash
cd src
git clone <pkg1>; git clone <pkg2>; ...
cd ..
catkin_make

I'm a bit confused on which tools to use in order to make this a bit more user friendly. I tried

mkdir my_ws; cd my_ws; mkdir src;
rosinstall -c src pkg_1_to_N.rosinstall
catkin_make

But rosinstall creates a top-level CMakeLists.txt file different from catkin_make and the subsequent build fails. If I call catkin_make once before rosinstall, the rosinstall command fails trying to overwrite the CMakeLists.txt file, as the existing one is a link to /opt/ros/hydro/...

It seems like wstool is a replacement for rosws. But I did not yet find an example of how to use it as a replacement for rosinstall.


Originally posted by roadrunner on ROS Answers with karma: 23 on 2013-12-18

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

rosinstall needs to be called with --catkin if you do not want it to generate those files.

Another option is to use wstool, which is a refactoring of rosws for catkin workspaces.

http://wiki.ros.org/wstool

You can do a lot of things with wstool, like having it fetch your .rosinstall file's contents:

$ mkdir -p ~/my_ws
$ cd ~/my_ws
$ wstool init src /path/to/my.rosinstall -j8

This will fetch all the entries in the my.rosinstall file into the src folder and it will fetch up to 8 (-j8) in parallel.

Then you can just run catkin_make:

$ catkin_make

You can also use wstool to modify your "workspace", using it's other verbs:

$ wstool set -t src my_serial --git https://github.com/wjwwood/serial.git -v 1.1.6
$ wstool update -t src

This will add the git repo, at the specified version, to the workspace with a target folder in the workspace of my_serial. The update command will actually fetch the code. Notice that you must always specify the target workspace after the verb with -t src.

Hope that helps.


Originally posted by William with karma: 17335 on 2013-12-18

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by roadrunner on 2013-12-18:
wstools init src ... does the job. Great!

Is ``wstoolsrecommended to use instead ofrosinstall&rosws```? It is kind of confusing to have those parallel tool chains that do almost, but not quite the same...

Is rosinstall --catkin any different from rosinstall -c? From rosinstall -h it seems that -c is just the short version of --catkin. I also get the same error, as described above.

Thanks!

Comment by William on 2013-12-18:
rosinstall just operates on .rosinstall files, but used to do some extra stuff for rosbuild, which is why the --catkin flag is needed. rosws and wstool are for workspace management (so modifying and updating a folder with rosinstall behind the scenes). rosws is for rosbuild and wstool is for catkin. I would recommend using wstool for everything catkin and rosinstall or rosws for rosbuild.

Comment by William on 2013-12-18:
Also, wstool is "for catkin", but really is meant to be completely ROS and catkin agnostic, just lets you maintain a workspace of many repositories of many types (git, hg, svn, tar).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.