gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.21k stars 485 forks source link

Build for multiple installations and versions #2226

Open osrf-migration opened 7 years ago

osrf-migration commented 7 years ago

Original report (archived issue) by David Rajaratnam (Bitbucket: daveraja).


I just want to know if there is any interest in making the building of gazebo a bit more flexible to allow for different versions of gazebo to be installed and run on the same system, and to be able to run these different versions at the same time?

Some background... For the moment I am stuck with ROS Indigo (on Ubuntu 14.04) and Gazebo 2.2. However, I've also been experiment with my own modified version of gazebo, playing around with adding sensors and some other things. I also needed to be able to run my version side-by-side with the existing ROS gazebo installation.

To get this to work without the two instance-versions of gazebo interfering with each other I had to make some changes to the cmake files as well as making some hard-coded filenames in the source code configurable from the cmake generated config file. I also had to make some similar changes to the sdformat library.

My current changes are a bit messy, because it was done largely by trial and error. However, if there is interest in having this build flexibility then I'm willing to re-visit what I've done to make it more consistent in how the build is configured.

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


Have you read this tutorial?

It shows how to get debs for using gazebo7 on indigo

osrf-migration commented 7 years ago

Original comment by David Rajaratnam (Bitbucket: daveraja).


Thanks for the link. Unfortunately, it doesn't help me for two reasons:

  1. I'm using an existing robot simulation (for the Baxter robot) which currently only has support for gazebo 2.2 and ROS Indigo.

  2. I need to run my own version of gazebo (compiled from source with some additional hacks) SIDE-BY-SIDE with the Baxter ROS simulated version of gazebo.

Ideally, to install a second version of Gazebo compiled from source would be as simple as:

#!bash

cmake -DCMAKE_INSTALL_PREFIX=<local-location> <gazebo-src>
make install

But because of dependency issues (libsdformat), potential confusion with plugins, and hard-coded names this can't be done. The changes that I have made allow me to do this by specifying additional defines to avoid the conflicts.

So, my question is simply whether there is interest in merging these changes into the main gazebo source, in which case I'll clean up what I've done (and separate the build changes from my other hacks), or not, in which case I won't bother.

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


We are always happy to consider pull requests, though we are not merging new features to gazebo2 at this point in its lifecycle, but could consider bug fixes.

osrf-migration commented 7 years ago

Original comment by David Rajaratnam (Bitbucket: daveraja).


Ok. My changes have been on the latest gazebo and not gazebo2. I'll take a look at libsdformat first and if you are happy with those changes I'll look at gazebo.

osrf-migration commented 7 years ago

Original comment by Shane Loretz (Bitbucket: Shane Loretz, GitHub: sloretz).


Changes to run different versions side by side would be nice to have. I think it's a use case that will likely break again in future releases.

Another way around the problem is to make Docker images for each combination of ROS and Gazebo you need to work with.