Installing ROS Melodic on Ubuntu 18.10












2














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!










share|improve this question





























    2














    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!










    share|improve this question



























      2












      2








      2







      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!










      share|improve this question















      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!







      boost ros






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 31 '18 at 8:18









      Cœur

      17.4k9103145




      17.4k9103145










      asked Nov 12 '18 at 16:44









      Q. Wright

      135




      135
























          1 Answer
          1






          active

          oldest

          votes


















          2














          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





          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53266574%2finstalling-ros-melodic-on-ubuntu-18-10%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            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





            share|improve this answer




























              2














              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





              share|improve this answer


























                2












                2








                2






                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





                share|improve this answer














                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






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 19 '18 at 22:32

























                answered Nov 19 '18 at 20:36









                Michal Fapso

                705818




                705818






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53266574%2finstalling-ros-melodic-on-ubuntu-18-10%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    這個網誌中的熱門文章

                    Xamarin.form Move up view when keyboard appear

                    Post-Redirect-Get with Spring WebFlux and Thymeleaf

                    Anylogic : not able to use stopDelay()