0
$\begingroup$

Rosanswers logo

Hi folks,

Setup: Currently, I have one catkin workspace in which I have my ros package with its dependencies (other packages). I'm about to write a wiki and want to create a rosinstall file to facilitate the installation process for a future user.
Question: How can I test if my rosinstall file is complete (i.e. installing the packages according to rosinstall results in a working setup) without messing with my current catkin workspace?
My thoughts: I could install VirtualBox but then I would have to install ros all over again in the virtual machine. Is there an easier way such as creating a second catkin workspace and running rosinstall in that workspace?


Originally posted by MrX on ROS Answers with karma: 20 on 2016-01-06

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Is there an easier way such as creating a second catkin workspace and running rosinstall in that workspace?

Yes, you can just create an extra workspace.

Just make sure you don't have a source /path/to/your/first/catkin_ws/devel/setup.bash or similar line in your .bashrc, as that would cause you to overlay your new workspace on top of your old one.

Having sourced /opt/ros/$DISTRO/setup.bash when you create your new workspace is ok (and required, actually).

However ..

How can I test if my rosinstall file is complete (i.e. installing the packages according to rosinstall results in a working setup) without messing with my current catkin workspace?

On a machine that already has all the required packages installed (such as -- I assume -- your current installation), you can't actually test this (without first uninstalling everything). Some possible options:

  • use docker: re-use an existing image that has either no ROS, or a standard install. See wiki/docker.
  • if you're not comfortable with docker, you could use a chroot to essentially achieve the same, but with some more work. See wiki/ROS/Tutorials/InstallingIndigoInChroot (replace 'Indigo' with whatever release you're targeting).

As with both options you essentially get a 'clean slate', you can now check whether your .rosinstall file is complete.


PS: you probably know this, but a .rosinstall file is typically only used as a convenient way for your users to checkout many packages from source at once. If you just want to distribute a single package (or a single repository with multiple packages), and those packages depend only on other released packages, then it would be more convenient to either release your packages, or declare all dependencies in their manifests (package.xml) and have your users execute

rosdep install --from-paths /path/to/catkin_ws/src --ignore-src --rosdistro $DISTRO

as part of the installation procedure.

That would also automatically install all dependencies, and would be much faster then building them from source together with your own packages (this obviously only works for dependencies that have been released).


Originally posted by gvdhoorn with karma: 86574 on 2016-01-06

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

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