art-e-fact / easyturtle

Exploring how to get started with ROS TurtleSim as fast as possible using a single Docker container.
MIT License
0 stars 1 forks source link

Easy Turtle

Exploring how to get started with ROS TurtleSim as fast as possible using a single Docker container.

Usage

Requirements

Build

A single command is needed to build a working environment. From this repository root, where Dockerfile is:

docker build . -t easyturtle

The command ends with a local image tagged easyturtle.

Run

Running the image executes is often just:

docker run --rm --interactive --tty --name easyturtle easyturtle

Tests on Ubuntu 18 through 22 have required:

docker run --rm --interactive --tty --env DISPLAY=$DISPLAY --net host --name easyturtle easyturtle

Tests on MacOS and Ubuntu 20 often require explictly authorising access to X11:

Notes:

Interact

Keeping focus on the shell window running the container, you can use the arrows to move the turtle around.

Motivation

TurtleSim is a simple application, yet relying on the ROS infrastructure, with the core and topic. Just running this simple application requires a few steps:

  1. Install the ROS tutorials for the target version (here defaults to Kinetic).
  2. Run roscore in some background.
  3. Run a TurtleSim node in some other background
  4. Optionally run a controller to listen to the keyboard and publish to the turtle node.

Tutorials usually lead to 3 shells open, assuming ROS runs well on the host OS.

Trying to keep simple things simple, containers can be pretty attractive. They may not be appropriate for production environments in this way, yet offer to pack and use conveniently (well, assuming a Docker engine is available), and should bridge learning deeper ROS concepts.

Resources

The first trials for this repository are based on nice resources:

The first Dockerfile is basically a turnkey version of their work.

Possible Next Steps