This repository holds the development environment and demos used in the Introduction to ROS video series, which can be found here.
Before you start, install the following programs on your computer:
- (Windows) WSL 2
- Docker Desktop
From this directory, build the image (this will take some time):
docker build -t env-ros2 .Run the image:
Linux/macOS:
docker run --rm -it -e PUID=$(id -u) -e PGID=$(id -g) -p 22002:22 -p 3000:3000 -v "${PWD}/workspace:/config/workspace" env-ros2Windows (PowerShell):
docker run --rm -it -e PUID=$(wsl id -u) -e PGID=$(wsl id -g) -p 22002:22 -p 3000:3000 -v "${PWD}\workspace:/config/workspace" env-ros2Alternatively, you can run the image in interactive mode by adding the --entrypoint /bin/bash argument. This will allow you to skip running the VS Code server in the background.
With the Docker image built, you have a few options to connect to the development environment: browser or SSH. Choose one of the options below. Note that the Dev Containers extension for VS Code does not seem to be working at this time. If you manage to get it working, please let me know in an issue or pull request!
Open a browser and navigate to http://localhost:3000/.
If you want to develop ROS applications using your local instance of VS Code, you can connect to the running container using SSH. This will allow you to use your custom themes, extensions, settings, etc.
In your local VS Code, install the Remote - SSH extension.
Open the extension in VS Code and create a new connection: abc@localhost:22002.
Connect and login using the password in the Dockerfile (default: abc). Go to File > Open Workspace from File.. and select the /ros2.code-workspace file when prompted. Enter the password again if requested. This should configure your VS Code workspace with the workspace/ directory mapped from the host directory.
Important! While you can run many of the demo apps found in the video series, note that you will not have access to the GUI elements, like
rqt.
All software in this repository, unless otherwise noted, is licensed under the Apache-2.0 license.