/roscon24-workshop

Preparation of Workshop for ROSCon 2024 in Odense

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Hands-On with ROS 2 Deliberation Technologies

This repository contains materials for the ROSCon 2024 workshop on ROS 2 Deliberation Technologies.

Deliberation in robotics refers to the collection of technologies necessary to create highly capable autonomous robots. The key idea is the use of models of the robot and its environment to enable high-level decision-making for solving complex problems, as well as equipping robots with robust skill representations to successfully execute these tasks in the real world.

To learn more about deliberation, refer to Ingrand and Ghallab (2017).

image

Overview diagram of robot deliberation, Ingrand and Ghallab (2017)


Technology Overview

In this hands-on workshop, you will get the opportunity to use a few ROS 2 enabled tools designed for robot deliberation.

This workshop uses PyRoboSim as a simple 2D simulator with a ROS 2 interface to test our deliberation technologies. PyRoboSim simulates mobile robots navigating across various locations, with the ability to detect and manipulate objects, and open and close locations. Additionally, it can simulate failures and battery usage in the above actions.

  • The problems folder contains information about the robotics problems you will solve in this workshop.
  • The technologies folder contains more detailed information on the deliberation software tools you will use to solve these problems.

image


Setup

Note

Please make sure you have completed the setup steps before arriving at the workshop.

System Requirements

We highly recommend a host PC running Ubuntu 22.04 or 24.04.

If you are using macOS or Windows, you should install virtualization software such as VirtualBox or VMWare. Then, set up an Ubuntu 22.04 or 24.04 virtual machine.

You also need to have Docker and Docker Compose installed on your system. If you do not have these tools set up:

Once you are able to run docker and docker compose commands without sudo, you can move on to the installation steps below.

docker run hello-world
docker compose --help

Installation

First, open a terminal window and clone this repository and its submodules.

git clone --recurse-submodules https://github.com/ros-wg-delib/roscon24-workshop.git

Change into the repository folder (cd roscon24-workshop) and start the Docker container.

docker compose run base

Note that this will initially download the Docker image and may take a few minutes for the download complete and the workspace to build.

After the container build finishes you will be in a bash shell.

Verify that you can launch a simulated world and the PyRoboSim UI appears on your screen.

ros2 run delib_ws_worlds run

After the initial build completes, you can open new terminals and attach to the currently running container from a different terminal using the command:

docker compose exec base bash

Note: This command must be executed from the roscon24-workshop repository folder.


Developing in the Container

By default, the whole ROS 2 workspace should have been built on setup. However, you will need to rebuild your code as you develop new code or make changes to existing code.

We have created handy aliases that effectively wrap around colcon build --symlink-install:

  • delib_build - Builds the entire workspace
  • delib_build_packages <package1> <package2> ... - Builds specific packages
  • delib_build_packages_up_to <package> - Builds all dependencies up to a specific package.
  • delib_clean - Cleans up the entire workspace.

When you are ready to shut down the container, enter the following command from a terminal on your system:

docker compose down --remove-orphans

NOTE: If you want to clean up any containers and colcon build artifacts mounted to your host system (in the .colcon folder of this repo), you can run the following command. It will ask you for your sudo password.

./clean_environment.sh

Develop inside the container using VSCode

If you want to develop inside the container using VSCode, you need to have the Docker extension installed. To see option "Attach Visual Studio Code" you also need to download VS Code extenstion Dev Containers.

Attach to the container as shown in the image below:

vscode_attach.png

Once inside the container, open the folder /delib_ws/src.