如何在Ubuntu 18.04上安装ROS?

时间:2019-09-20 18:03:00

标签: ubuntu-18.04 ros

我正在运行Ubuntu 18.04,并尝试在我的计算机上首次安装ROS。我尝试按照http://wiki.ros.org/melodic/Installation/Ubuntu

上的说明进行操作

我被困在这部分。

sudo apt-get install ros-melodic-desktop-full

我的尝试:

sudo apt -f install

sudo apt update --fix-missing

sudo dpkg --configure -a

sudo dpkg --remove --force-remove--reinstreq

sudo apt clean

sudo apt update

sudo rm /var/lib/apt/lists/lock

sudo rm /var/cache/apt/archives/lock

到目前为止什么都没做。

端子命令:

$sudo apt-get install ros-melodic-desktop-full
Reading package lists… Finished
Builds dependency trees
Reading state information ... Finished
Some packages could not be installed. It may mean that you have requested
an impossible situation or, if you use the unstable distribution
that some necessary packages have not yet been created or moved
from "Incoming".
The following information may help to resolve the situation:

The following packages have dependencies that cannot be satisfied:
 rose-melodic-desktop-full: Dependent on: rose-melodic-desktop but it will not be installed
                            Depending on: rose-melodic-perception but it will not be installed
                            Depending on: rose-melodic-simulators but it will not be installed
                            Depending on: ros-melodic-urdf-sim-tutorial but it will not be installed
E: Could not correct the problems, you have withheld broken packages.

请帮助我安装ROS

4 个答案:

答案 0 :(得分:0)

首先在ubuntu上安装程序。

sudo apt-get更新

sudo apt-get升级

更新数据包后,请尝试再次按照enter link description here上的说明进行操作

希望能提供帮助。

答案 1 :(得分:0)

1-遵循ROS旋律安装的第一步(请参见下面的链接)后,尝试使用“ sudo apt install ros-melodic-desktop”下面的链接“ 点击此处”进行安装-full ”行

ROS melodic Installation page

如果它不起作用

2-检查“ 软件和更新”参数 (如果找不到它:启动“ Ubuntu软件中心”,然后在菜单栏中的顶部,选择“ 软件和更新”) 在“ 其他软件”标签中,链接

http://pacckage.ros.org/ros/ubuntu仿生主体

已打印,并且在“ 自动”标签中,已打印 Open Robotics 中的键

3-再次尝试执行1-,如果它不起作用,请遵循4-

4-在“ 更新”标签中,选中“ 推荐的更新”,启动“ 更新管理器”并安装更新(我不这样做不能在我的PC上正确执行操作

5-最后,您需要使用以下命令手动安装 rosdep : “ sudo apt-get install python-rosdep

答案 2 :(得分:0)

Ubuntu(apt)不允许安装名称相同但版本不同的软件包。

首先删除其他版本。例如:apt remove ros-desktop *

答案 3 :(得分:0)

我像这样工作:

  1. 安装部门:

    sudo apt install gazebo9-常见的libgazebo9-dev gazebo9 ros-melodic-gazebo-ros-pkgs ros-melodic-gazebo-dev ros-melodic-gazebo-ros-control ros-melodic-gazebo-ros ros-melodic-urdf -sim-tutorial ros-melodic-simulators

  2. 安装ros旋律

    sudo apt-get install ros-melodic-desktop-full