ROS melodic instalation for Ubuntu 20.04
Towards answering your question...
I began down the path suggested by @HimnashuTanwar, building melodic from source, but ultimately concluded that a full ros melodic install is not viable in 20.04.
A few notes:
- Adding a -r to the rosdep command immediately exposed all of the
dependencies related to Python2 Most such dependencies could be met
using pip install -U [package]
. - A notable exception was pyqt5, which in turn depended on sip. At first I endeavored to build the sources of these two, as per https://www.riverbankcomputing.com/static/Docs/PyQt5/installation.html#building-and-installing-from-source, but settled on this solution instead: How to get PyQt5 for Python2 on Ubuntu 20.04
- What caused me to abandon the build was a nasty dependence of
melodic's tf2 on an earlier version of Boost. It turns out that 20.04 runs on libboost1.71, wherein boost-signals has been deprecated and deleted, and this breaks the build of tf2 -- this issue is of course remedied in Noetic.
So in the end, it's probably best to stick with the supported version pairs: melodic on 18.04 or noetic on 20.04+, as per (http://wiki.ros.org/Distributions)
mmmmk
Updated on September 18, 2022Comments
-
mmmmk over 1 year
A lot of packages are still not supported in ros noetic, so i was trying to build melodic from source in ubuntu 20.04. While following instructions from here, i got stuck in this command
rosdep install --from-paths src --ignore-src --rosdistro melodic -y
The errors i got were:-
ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies: laser_geometry: No definition of [python-numpy] for OS version [focal] genpy: No definition of [python-yaml] for OS version [focal] gencpp: No definition of [python-setuptools] for OS version [focal] python_orocos_kdl: No definition of [python-sip] for OS version [focal]
I understand that these are because ubuntu 20.04 doesnt have python in it. So i tried doing
-
alias python=python3
in my bashrc sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
but i still receive these errors. How to resolve these issues? Even if i
sudo apt-get install
all these packages, still these erros are present.-
karel almost 4 yearsDoes this answer your question? ROS on BeagleBone Black?
-
mmmmk almost 4 years@karel Actually no. I am trying to install ROS melodic which is unsupported on ubuntu 20.04. I tried following the commands for melodic on ubuntu 18.04 but even after resolving keys, there is no ros-melodic installation component. Thanks
-
karel almost 4 yearsThat's because ROS melodic is unsupported on 20.04. Each Ubuntu LTS has a matching ROS LTS version. For 20.04 it is noetic, not melodic. If you need melodic then install Ubuntu 18.04 in a virtual machine.
-
mmmmk almost 4 yearsThanks. On an unrelated note, can i have Virtual Machine inside ubunut 20.04 running ubuntu 18.04
-
karel almost 4 yearsYou most certainly can.
-
mmmmk almost 4 yearsUsing KVM? Do i have to do something more?
-
karel almost 4 yearsKVM is very nice. That's what I use.
-
mmmmk almost 4 yearsThanks, ill look into that
-