6

I can't be the only person interested in this combination of Cosmic (with Wayland) and Melodic.

I'll be up-front: I seem to have successfully managed this on my XPS 13 (9370), or at least the install script [eventually] completed successfully. However, there's a really hacky workaround. I'll gladly vote up replies of others who attempt an installation, regardless of outcome.

Basically, I ran the instructions on http://wiki.ros.org/Installation/Source for a "desktop" install, and here's how I dealt with the various snags along the way:

  • Override the distro, using bionic instead of cosmic:
    rosdep install --from-paths src --ignore-src --os=ubuntu:bionic --rosdistro melodic -y

  • Boost library errors...
    (See Michal Fapso's solution below. It's quicker, easier, less buggy...)
    After installing aptitude, switch back-and-forth between Boost 1.65 and Boost 1.67, retrying the installation after each switch. Seriously. The two commands to do this are:
    sudo aptitude install libboost1.65-all-dev
    and:
    sudo apt install libboost1.67-all-dev
    Alternate about a dozen times, making sure you get to a higher package number each time. [I think the next generation of ROS will need the Boost date_time function called differently.]

  • Random libraries---OGRE, libyaml:
    OGRE can be installed nice and easily with apt (libogre-1.9-dev)
    libyaml... can also be installed, except I tried three or four versions before this one stuck (libyaml-cpp0.3-dev)


roscore runs, showing melodic version 1.14.3. Turtlesim runs with turtle_tf2_demo (teleoperation), rviz works, as well as rosgraph and the Python (rospy) modules.

Report your errors, please!

Cœur
  • 37,241
  • 25
  • 195
  • 267
Brian Wright
  • 93
  • 1
  • 9
  • So how is the status now with installation of ROS on Ubuntu 18.10? Is it only possible from source? I tried through sources.list but on update it gives me an "No Release File"-Error. Are there any resources or steps which should be followed when installing ROS on ubuntu 18.10? Or just install from source and deal with snags like you and Michael did? – Blind0ne Feb 05 '19 at 15:58
  • Someone else will need to answer; I don't want to bork my installation, and I've moved to using Virtualbox to install ROS2 because of dependency hell. – Brian Wright Feb 07 '19 at 07:43

1 Answers1

7

Thanks for your hints, Q. Wright. Here is a more detailed guide for ROS beginners like myself :)

This part is from http://wiki.ros.org/melodic/Installation/Source and includes Q. Wright's trick with specifying older ubuntu distro:

sudo apt-get install python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential
sudo rosdep init
rosdep update
mkdir ~/projects/ros_catkin_ws
cd ~/projects/ros_catkin_ws
rosinstall_generator desktop_full --rosdistro melodic --deps --tar > melodic-desktop-full.rosinstall
wstool init -j8 src melodic-desktop-full.rosinstall
rosdep install --from-paths src --ignore-src --os=ubuntu:bionic --rosdistro melodic -y

Now, before we run the build process, there are boost library errors which Q. Wright mentioned. They are caused by the 'boost::posix_time::milliseconds' function which in newer boost versions accepts only an integer argument, but the actionlib package in ROS, gives it a float on several places. You can list all files using that function:

find -type f -print0 | xargs -0 grep 'boost::posix_time::milliseconds' | cut -d: -f1 | sort -u

Open them in your text editor and search for the 'boost::posix_time::milliseconds' function call. Float argument is passed in these files:

./src/actionlib/include/actionlib/client/simple_action_client.h
./src/actionlib/include/actionlib/destruction_guard.h
./src/actionlib/include/actionlib/server/simple_action_server_imp.h
./src/actionlib/src/connection_monitor.cpp
./src/actionlib/test/destruction_guard_test.cpp

and replace calls like this:

boost::posix_time::milliseconds(loop_duration.toSec() * 1000.0f));

to:

boost::posix_time::milliseconds(int(loop_duration.toSec() * 1000.0f)));

and these:

boost::posix_time::milliseconds(1000.0f)

to:

boost::posix_time::milliseconds(1000)

Now we can finally build ROS, hopefully without any error:

./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
Michal Fapso
  • 1,242
  • 1
  • 15
  • 21
  • Quick question: did you manage to fulfill and install all the dependencies without any problems? `rosdep install --from-paths src --ignore-src --os=ubuntu:bionic --rosdistro melodic -y` – avermaet Mar 22 '19 at 09:13
  • @avermaet, I don't remember anymore. I followed only few ROS tutorials at that time and I am not using ROS now. But when I run the command you mentioned now, I get this output: `ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies: husky_gazebo: Cannot locate rosdep definition for [multimaster_launch] husky_control: Cannot locate rosdep definition for [teleop_twist_joy] husky_bringup: Cannot locate rosdep definition for [um7] husky_navigation: Cannot locate rosdep definition for [gmapping] ` – Michal Fapso Mar 24 '19 at 20:42
  • Ok, thanks. Was also not working for me, so I downgraded to 18.04 which is supported. – avermaet Mar 30 '19 at 12:53