Ask Your Question
0

Build ROS from source from scratch...

asked 2015-04-15 09:37:03 -0500

jiapei100 gravatar image

Hi, all:

ros wiki has already shown one method for installing everything from source http://wiki.ros.org/indigo/Installati...

However, those special commands including

rosinstall_generator
wstool
rosdep
etc.

make the compilation even more obscure. Users like me still prefer using traditional

./configure
./make
./make install

to have everything built from scratch.

Should there be such a manual for ROS installation from source, instead of this wiki page http://wiki.ros.org/indigo/Installati... ????

Best Regards Pei

edit retag flag offensive close merge delete

Comments

Please do not double post you questions: https://github.com/ros/ros/issues/81

Dirk Thomas gravatar imageDirk Thomas ( 2015-04-15 10:53:03 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2015-04-15 10:52:29 -0500

Dirk Thomas gravatar image

updated 2015-04-16 12:32:08 -0500

The workflow you describe is common for autotools and only applies to build and install a single package.

ROS packages are using CMake and the standard workflow for CMake packages is:

cmake .
make
make install

Actually with CMake you should always do an out-of-source build but that is another topics.

But the additional steps in the ROS-from-source instruction perform additional steps which are not covered by a per-package build.

rosinstall_generator creates a list of repositories which you need to clone based on a set of packages you want to build. The information where these repositories are and what dependencies they need is specific to ROS. I don't think that this functionality is cover by any other tool (except apt-*). Usually you would collect this information manually by reading instructions.

wstool then clones all repositories. Again this is not something you usually do when building a single package. And for multiple packages you would clone them one-by-one by hand.

rosdep then makes sure that you install all dependencies. Commonly you would read the install instructions and then manually install the deps e.g. using apt-get install.

The last step you did not mention catkin_make_isolated then determines the topological order of all your source packages which it does based on the package dependencies declared in their manifests. Then it invokes the stand cmake / make / make install steps for each package.

As you can see each step has a very good reason and for most of them nothing similar exists as a standard. Most of this automation is provided because ROS makes it easy for you to build hundreds of packages at once. You could still perform every task manually as you might be used to from other projects but it would take you hours to clone, install deps, build and install a bigger workspace like ROS desktop. These commands provide the automation to perform it in minutes (excluding the compilation time).

Update:

As every Linux distribution ROS has to choose a specific version of every package. For ROS Indigo that is Gazebo 2 - simply because nothing else was available when ROS Indigo was released almost a year ago.

rosdep makes the common task to install the default dependencies easy. Therefore it tries to pull in Gazebo 2. But it is perfectly valid for you to not use Gazebo 2 but Gazebo 5 instead. Most packages in ROS will compile fine against the newer version as well. Just use for similar question on this platform to find user doing exactly that.

The same for your embedded setup. You can install any Gazebo version from the source you want, e.g. build a custom version from source if you like. And then build the ROS packages on-top. If some packages don't work well with different versions of their dependencies (which is sometimes the case) the maintainers are usually happy to take contributions to make it more flexible.

All the scripts and packages you refer to are documentation in the ros wiki. The ... (more)

edit flag offensive delete link more

Comments

~/ros_catkin_ws$ rosdep install --from-paths src --ignore-src --rosdistro indigo -y executing command [sudo -H apt-get install -y gazebo2] Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package gazebo2 ERROR: the following rosdeps failed

jiapei100 gravatar imagejiapei100 ( 2015-04-16 02:03:07 -0500 )edit
0

answered 2015-04-15 22:47:01 -0500

jiapei100 gravatar image

Thank you very much for your prompt but detailed reply. Still obscure anyway.

For instance,

~/ros_catkin_ws$ rosdep install --from-paths src --ignore-src --rosdistro indigo -y executing command [sudo -H apt-get install -y gazebo2] Reading package lists... Done Building dependency tree
Reading state information... Done E: Unable to locate package gazebo2 ERROR: the following rosdeps failed to install apt: command [sudo -H apt-get install -y gazebo2] failed

This clealy tells in order to install ROS, gazebo2 should be pre-installed. However, current Gazebo is of version 5.0 http://www.gazebosim.org/ . If there is such a flexibility for the users to pick up which version of a particular package he/she would like to install, that would be more user-friendly, right?

What's more, in my case, I'm installing ROS on an Embedded system. The default repository doesn't come with gazebo2. At least, there should be such a flexitility for us to modify the rosdep scripts, instead of knowing nothing about what's going on. Right?

Therefore, is there any chance for me to know the scripts rosinstall_generator wstool rosdep catkin_make_isolated line by line??

Cheers Pei

edit flag offensive delete link more

Comments

Since this is not an "answer" please append additions like this to your original question.

Dirk Thomas gravatar imageDirk Thomas ( 2015-04-16 12:25:39 -0500 )edit

Your Answer

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

Add Answer

Question Tools

2 followers

Stats

Asked: 2015-04-15 09:37:03 -0500

Seen: 1,428 times

Last updated: Apr 16 '15