Skip to content

girafe-ai/robotics

Repository files navigation

Mobile robotics course by girafe-ai team

Course is currently thought at MIPT's MSAI program and in MADE mail.ru

Install ROS for this course

In our course we will use only Python and no hardware, so setup needed is a computing part (without sensors and actuators).

Thus we have following options:

  1. Docker machine (the most simple and convenient, recommended)
  2. Classical virtual machine (recommended as backup to Docker)
  3. Cloud virtual machine with GUI (experimental)
  4. Installation on host machine (not recommended)

Docker

Suppose you have Docker installed, if no - follow official instructions

We will use prebuilt osrf/ros:noetic-desktop-full Docker image. FYI Dockerfile source.

  1. Pull Docker container (~1Gb)
    docker pull osrf/ros:noetic-desktop-full

Ubuntu

  1. Allow localhost to acess display:
    xhost +local:docker
  2. Run Docker with display forwarding
    docker run -it --rm --privileged --net=host -e DISPLAY=$IP:0 -v /tmp/.X11-unix:/tmp/.X11-unix osrf/ros:noetic-desktop-full

MacOS

  1. Install Xquartz:
    brew install xquartz
    or manually with .dmg from official site
  2. Run Xquartz, go to Preferences > Security > Allow connections from network clients, close Xquartz.
  3. Allow localhost to acess display:
    xhost +127.0.0.1
  4. Run Docker with display forwarding
    docker run -it --rm --privileged --net=host -e DISPLAY=$IP:0 -v /tmp/.X11-unix:/tmp/.X11-unix osrf/ros:noetic-desktop-full

If you have troubles follow full instruction.

Windows

  1. Instal X Server.
    Download here, more detailed instruction here.
  2. Run Docker with display forwarding
    docker run -it -e DISPLAY=host.docker.internal:0 osrf/ros:noetic-desktop-full

Tested on Windows 10 + WSL 2.

You could setup host VSCode to be able to edit files in running Docker image: instruction.

Offifial Docker installation instruction - very concise and missing details.

Virtual machine

Install Virtualbox or Parallels Desktop (recommeded for MacOS, not free).

Then create and launch Ubuntu instance.

Then follow regular installation on Ubuntu host (see Host section)

Cloud virtual machine with GUI

Follow instructions for AWS.

Then follow regular installation on Ubuntu host (see Host section)

This is tested only once on Windows (RDP is available for MacSO tooo). If you prefer that way - please report your experience.

Host

Follow installation guide for ROS on Ubuntu (you need to install ros-noetic-desktop-full)

This option is not recommended.

Really available only for Linux machines. Warning - it may influence your machine behaviour, so do that if you know what you do or you are on virtual machine.

Gratitude and reference

Initial materials provided by Oleg Shipitko.
Currently course is thaught by Vladislav Goncharenko