Ask Your Question
0

New catkin workspace for testing rosinstall?

asked 2016-01-06 08:02:52 -0600

MrX gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-01-06 09:16:45 -0600

gvdhoorn gravatar image

updated 2016-01-06 09:30:35 -0600

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).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-01-06 08:02:52 -0600

Seen: 168 times

Last updated: Jan 06 '16