Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ROS melodic installation with Python 3 only and without messing up system libraries?

Tags:

ubuntu

boost

ros

Description of the procedure and issues:

I am following the installation guide there:
http://wiki.ros.org/melodic/Installation/Ubuntu

but:

  1. $ sudo apt-get install ros-melodic-desktop-full doesn't work:

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     ros-melodic-desktop-full : Depends: ros-melodic-perception but it is not going to be installed    
    E: Unable to correct problems, you have held broken packages.    
    

    -> question 1.

  2. $ sudo apt-get install ros-melodic-desktop-full seems to work but it needs to install a whole bunch of packages (602 MB) - which I expected a little. When looking at these packages in details I can see:

    • More than 190 ros-something-packages: OK

    • A few new libraries: OK

    • More than 40 python-<packages> (which are definitely Python 2 packages): -> question 2.1

    • More than 80 libboost-<something-system-libraries>: -> question 2.2

Related questions:

Question 1:

Do you know why?

Question 2.1:

How to force the usage of the Python 3 version of these packages?

Question 2.2:

For other purposes I build boost from sources ( Building Boost from sources on Linux ).
Hence I fear that if I install ros with all these dependencies, the boost system libraries that come along with ros (which are all boost version 1.65) will mess up with my personalized installation of boost libraries (which are in version 1.68), especially when I would like to compile other softwares (I prefer to only have one version of these lib; i.e. the latest 1.68).
Is there a way to tell ros to use these already installed libraries (basically in /usr/local/)?

General informations:

I'm using Ubuntu 18.04: 4.15.0-43-generic x86_64 GNU/Linux Python 3 version is: 3.6.7

like image 298
s.k Avatar asked Nov 06 '22 22:11

s.k


1 Answers

In order for ROS Systems to works, it Needs dependencies at a minimum specific version.

You cannot use python 3 in installation since all tools are made with python 2.7+ But you can specify what python version to use when running or compiling packages By changing ROS_PYTHON_VERSION to 3.

I think you can use This Answer to convert your compiled source to a .deb file and install it over to prevent apt from interfering with your boost libraries

like image 54
Mohammad Ali Avatar answered Nov 09 '22 12:11

Mohammad Ali