在Ubuntu 18.10上安装ROS Melodic [英] Installing ROS Melodic on Ubuntu 18.10

查看:265
本文介绍了在Ubuntu 18.10上安装ROS Melodic的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不能是对此宇宙(与Wayland结合)和Melodic结合的唯一感兴趣的人.

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

我会提前:我似乎已经在XPS 13(9370)上成功管理了此操作,或者至少[最终]成功完成了安装脚本.但是,有一个非常棘手的解决方法.无论结果如何,我都会很乐意投票给其他尝试安装的人.

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.

基本上,我在 http://wiki.ros.org/Installation/Source 进行桌面"安装,以下是我如何处理各种障碍的方法:

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:

  • 使用 bionic 代替 cosmic 覆盖发行版:
    rosdep install --from-paths src --ignore-src --os=ubuntu:bionic --rosdistro melodic -y

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

提升库错误...
(请参阅下面的Michal Fapso的解决方案.它更快,更容易,更少的错误……)
安装智能后,在Boost 1.65和Boost 1.67之间来回切换,然后在每次切换后重试安装.严重地.执行此操作的两个命令是:
sudo aptitude install libboost1.65-all-dev
和:
sudo apt install libboost1.67-all-dev
交替进行大约12次,以确保每次获得的包装编号都更高. [我认为下一代ROS将需要以不同的方式调用Boost date_time函数.]

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.]

随机库--- OGRE,libyaml:
可以使用apt(libogre-1.9-dev)轻松轻松地安装OGRE.
libyaml ...也可以安装,除了在此卡死之前我尝试了三个或四个版本(libyaml-cpp0.3-dev)

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运行,显示旋律版本1.14.3. Turtlesim可以运行turtle_tf2_demo(远程操作),rviz可以运行,并且可以使用rosgraph和Python(rospy)模块.

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.

请报告您的错误!

推荐答案

Q.Wright,谢谢您的提示.这是针对像我这样的ROS初学者的更详细指南:)

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

此部分来自 http://wiki.ros.org/melodic/Installation/Source 并包括Q. Wright的技巧,它指定了较旧的ubuntu发行版:

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

现在,在运行构建过程之前,存在Q. Wright提到的boost库错误.它们是由"boost :: posix_time :: milliseconds"函数引起的,该函数在较新的boost版本中仅接受整数参数,但是ROS中的actionlib程序包在多个位置上对其进行了浮动处理.您可以使用该功能列出所有文件:

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

在文本编辑器中打开它们,然后搜索"boost :: posix_time :: milliseconds"函数调用.在这些文件中传递了float参数:

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

并替换这样的呼叫:

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

收件人:

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

以及这些:

boost::posix_time::milliseconds(1000.0f)

收件人:

boost::posix_time::milliseconds(1000)

现在,我们终于可以构建ROS,希望不会出现任何错误:

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

./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release

这篇关于在Ubuntu 18.10上安装ROS Melodic的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆