July 24, 2020

[Note] ROS in docker

ROS= Robot Operating System, http://www.ros.org
Docs, http://wiki.ros.org

Another note.  Instead of ROS in Linux VM on Windows, now with Ubuntu being main OS, I can use ROS in Docker.  Since it's not a VM, it's much faster.

Noetic version is recommended for Ubuntu 20, but seems like it's changed quite a bit and certain commands are not available any more.  For my use (learning ROS and integrate with Gazebo), I'm going to use Melodic version.

For installation (not Docker), see:
manual set up, http://wiki.ros.org/noetic/Installation/Ubuntu

For docker, installing Melodic version:

The container cannot run as a daemon,
$ docker pull ros:melodic  
$ docker run -it --name rosdev ros:melodic

From another shell session or terminal, connect to the ROS container,
$ docker exec -it rosdev bash

Inside of the container, run this:
$ source /opt/ros/<distro>/setup.bash

And follow rest of the tutorial,

My goal is to run Gazebo UI on host, ROS in docker container.  Seems like it's not straight forward.  That'll be a posting for next time once I figure it out.


No comments:

Post a Comment