Python 在Google Colab上安装并运行ROS

Python 在Google Colab上安装并运行ROS,python,ubuntu,google-colaboratory,robot,Python,Ubuntu,Google Colaboratory,Robot,我想让ROS(机器人操作系统)在谷歌Colab上工作。有没有人举过这样做的例子?我正在查看以下两个链接: 在链接中,作者似乎使其工作,在链接中: 基于上面的链接,我为安装ROS编写了以下代码: # @ title Install ROS melodic ROS_CODE_NAME = 'melodic' #from http://wiki.ros.org/indigo/Installation/Ubuntu # 1.2 Setup sources.list ! echo "1

我想让ROS(机器人操作系统)在谷歌Colab上工作。有没有人举过这样做的例子?我正在查看以下两个链接:

在链接中,作者似乎使其工作,在链接中:

基于上面的链接,我为安装ROS编写了以下代码:

# @ title Install ROS melodic

ROS_CODE_NAME = 'melodic'

#from http://wiki.ros.org/indigo/Installation/Ubuntu

# 1.2 Setup sources.list
! echo "1.2 Doing"
! sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $ (lsb_release -sc) main"> /etc/apt/sources.list.d/ros-latest.list'
! echo "1.2 Done"

# 1.3 Setup keys
! echo "1.3 Doing"
! sudo apt-key del 421C365BD9FF1F717815A3895523BAEEB01FA116
! sudo apt-key del B01FA116

! apt --fix-broken install

! sudo dpkg --configure -a
! sudo apt-get update && sudo apt-get -f install

# add the new key
! sudo -E apt-key adv --keyserver 'hkp: //keyserver.ubuntu.com: 80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

! sudo apt clean && sudo apt update

! sudo apt install
! echo "1.3 Done"

# 1.4 Installation
! echo "1.4 Doing"
! sudo apt update
! sudo apt upgrade
! echo "1.4 Done"

# Desktop-Full Install:
! echo "1.4.1 Doing"
! sudo apt install ros-melodic-desktop-full
! echo "1.4.2 Done"

# 1.5 Initialize rosdep
! echo "1.5 Doing"
! sudo rosdep init
! rosdep update
! echo "1.5 Done"


# 1.7 Getting rosinstall (python)
! echo "1.7 Doing"
! sudo apt install python-rosinstall
! sudo apt install python-catkin-tools
! echo "1.7 Done"
! echo "All Done"
几个python模块出现了这个问题:

dpkg: error processing package python-rosdep-modules (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ros-melodic-rqt-robot-monitor:
 ros-melodic-rqt-robot-monitor depends on python-rospkg-modules; however:
  Package python-rospkg-modules is not installed.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 python-rosdep-modules: Depends: python-rospkg-modules (> = 1.2.7) but it is not installed
                         Depends: python-rosdistro-modules (> = 0.7.5) but it is not installed
 ros-melodic-rqt-gui: Depends: python-rospkg-modules but it is not installed
 ros-melodic-rqt-robot-monitor: Depends: python-rospkg-modules but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
此外,几个模块还存在以下错误(即使运行上述命令,也不能解决问题):

有人做过这样的事吗

谢谢