Ask Your Question

Run ROS on Colab

asked 2021-01-02 13:27:20 -0500

Gustavo Lima gravatar image

updated 2021-01-04 03:39:00 -0500

gvdhoorn gravatar image

I would like to make ROS (Robot Operating System) work on Google Colab. Does anyone have any examples of how to do this? I was taking a look at these 2 links:

In the link, it seems that the author makes it work, in the link:

Based on the link above, I made the following code for installing ROS:

# @ title Install ROS melodic

ROS_CODE_NAME = 'melodic'


# 1.2 Setup sources.list
! echo "1.2 Doing"
! sudo sh -c 'echo "deb $ (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: // 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"

Several python modules present the problem:

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.

In addition, several modules present the following error as well (even running the command mentioned, does not solve the problem):

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

Has anyone done something like that?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-01-04 04:16:55 -0500

SmallJoeMan gravatar image

Sorry, I have no solution to your dependency issues without debugging it in detail myself.

However, I wonder if you might find using an official ROS docker container easier ( This page seems to imply you can run docker from Colab (although I have never tried it):

edit flag offensive delete link more



Hi SmallJoeMan.

First of all, thank you very much for your comment/sugestions.

I tried to run the notebook from the second link, but it seems like Docker doesn't work well on Colab due to some privilege restrictions of some commands. When i tried to run the notebook, the Docker wasn't able to run.

Another thing im wondering: using Docker is going to add some extra layer of abstraction, isn't? My final goal is to run another things (python bib's) together with ROS, using Colab to use the advantage of not running those things locally. Thats why i'm trying to make ROS work on Colab. I'm not sure if adding this extra layer isn't going to add more space for problems...

You said about debbuging yourself... do you mind if i create an extra notebook with the code from the post and send ...(more)

Gustavo Lima gravatar image Gustavo Lima  ( 2021-01-04 09:55:55 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-01-02 13:27:20 -0500

Seen: 514 times

Last updated: Jan 04 '21