Run Ubuntu + ROS with Docker on Mac

If you want to move self-driving cars and robots, it's ROS. So that's it. First of all, I would like to run ROS on Mac.

Run Ubuntu with Docker

Reference: https://qiita.com/yasuoka_dev/items/073f7e8c7dba75993323

$ docker pull ubuntu:18.04

Create a user so that you can sudo.

Put ROS in Ubuntu

Reference: http://www1.meijo-u.ac.jp/~kohara/cms/technicalreport/ubuntu18-04_ros_install

Registration of ROS download destination to apt

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

There is no sudo. ..

$ apt-get update
$ apt-get install vim
$ apt-get install sudo

There is no lsb_release. .. Moreover, when I try to apt-get install in this state, it seems that garbage remains in the following file and an error occurs. ..

E: Malformed entry 1 in list file /etc/apt/sources.list.d/ros-latest.list (Component)
E: The list of sources could not be read.
E: Malformed entry 1 in list file /etc/apt/sources.list.d/ros-latest.list (Component)
E: The list of sources could not be read.

I'll delete the file. Moreover, it has changed to lsb-release instead of lsb_release. .. There are too many traps.

$ rm /etc/apt/sources.list.d/ros-latest.list
$ sudo apt-get install lsb-release

From the beginning, put in sudo, put in lsb-release, and then do it.

Obtaining public key for download

$ sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

There is no gnupg.

$ sudo apt-get install gnupg

It looks like it's done.

ROS installation

$sudo apt update
$sudo apt install ros-melodic-desktop-full

A great number of packages. 1416 package. For some reason, the city was selected on the way. Select 6: Asia> 79: Tokyo. Done.

Also, it seems that you need to install rodep manually separately, so install it below.

apt install python-rosdep

Create up to catkin_ws. Try putting in a package.

$ sudo apt-get install -y ros-melodic-joystick-drivers

The ros-tutorials package may also be good.

There was also a tutorial document in Japanese. https://github.com/tork-a/tork_moveit_tutorial/releases/tag/0.0.10

Since Docker does not have a GUI, there was also a type that was launched from a browser. https://qiita.com/karaage0703/items/957bdc7b4dabfc6639da

$ docker run -p 6080:80 --shm-size=512m tiryoh/ros-desktop-vnc:melodic

One command. It's too easy.

Recommended Posts

Run Ubuntu + ROS with Docker on Mac
Steps to run docker on Mac
ubuntu20.04 ・ Run RTAB-MAP with ROS Noetic (1)
Run NordVPN on Docker (Windows) Ubuntu container
Until you run apache on ubuntu on docker
Run STS4 on Mac
Run Pico with docker
Run Payara with Docker
Run tiscamera on Ubuntu 18.04
Run phpunit on Docker
Run Edge (Chromium version) on Mac with Selenium
Run JSP Hello World with Tomcat on Docker
Run VS Code on Docker
Run TAO Core with Docker
Install Docker on Ubuntu Server 20.04
Run openvpn on Docker (windows)
Oracle Java 8 on Docker Ubuntu
Run chromium-mir-kiosk on Ubuntu Core
Run Rails whenever with docker
Run java applet on ubuntu
Display ROS application on Docker with GUI on host side
Run lambda with custom docker image
Run SSE (Server-Sent-Event) samples on docker
Install java with Ubuntu 16.04 based Docker
Run SQL Server with Docker ToolBox
Run puppeteer-core on Heroku (Docker edition)
Try using Redmine on Mac docker
Run React on a Docker container
Run the AWS CLI on Docker
How to run JavaFX on Docker
Run GUI application on Docker container
WordPress with Docker Compose on CentOS 8
Use Docker on your M1 Mac
Run PureScript on a Docker container
Make JupyterLab run anywhere with docker
Install ruby on Ubuntu 20.04 with rbenv
Until you put Ubuntu 20 on Windows 10 Home and WSL2 and run Docker
Install metrics-server with Helm on Kubernetes that comes with Docker for Mac
Prepare a transcendentally simple PHP & Apache environment on Mac with Docker
Install Ubuntu Server 20.04 in VirtualBox on Mac and connect with SSH
Run (provisionally) a Docker image with ShellCommandActivity on AWS Data Pipeline
Laravel development environment construction with Docker (Mac)
Customize OpenFOAM v8 Docker Image on Mac
Run Embulk on Docker to convert files
Install Docker Desktop for Mac with Homebrew
Use docker in proxy environment on ubuntu 20.04.1
Scraping with puppeteer in Nuxt on Docker.
Getting Started with Docker for Mac (Installation)
Environment construction with Docker (Ubuntu20.04) + Laravel + nginx
DNS over HTTPS with Cloudflared on Ubuntu
Introduced vscode with apt to docker: ubuntu
Until you run CuPy (v11.1) on Ubuntu 20.04
Use cljstyle with Spacemacs on Ubuntu on WSL2
Build OpenCV with Java Wrapper on Ubuntu 18.04
Try putting Docker in ubuntu on WSL
Build an environment with Docker on AWS
Launched Redmine with Docker on Raspberry Pi 3
How to run Blazor (C #) with Docker
Steps to run local development of ASP.NET Core on Mac with docker-compose
Put Zabbix in Ubuntu with Docker and monitor Docker on the same host
Try running MPLS-VPN with FR Routing on Docker