Alex Mitrevski profile picture

Home

Research

Publications and talks

Work and projects

Teaching

Supervised projects

Resources and notes

About me

GitHub logo Google Scholar logo Linkedin logo YouTube logo

Software Engineering for Robotics (SER)

This is a first-semester mandatory course in the Master of Autonomous Systems program at Hochschule Bonn-Rhein-Sieg. I taught this course for the first time in the winter semester 2023/24, under the official name “Advanced Software Technology.”

Description

In the course, I focus on techniques and tools that are specifically used for developing software for autonomous robots. The following are some of the questions that we address in the course:

Lectures

The following topics are covered in the course:

  1. Robot software development introduction
  2. Robot software architectures
  3. Tools for robot software development
  4. Software engineering methodologies
  5. Software design patterns (invited lecture)
  6. Software development lifecycle
  7. Simulation-based robot software development
  8. Robot simulation tools (practical session)
  9. Quality assurance and testing (in-class discussion)
  10. Multi-robot software development (in-class discussion)
  11. Data-driven robot software development
  12. Metaprogramming and introspection (practical session)

Lab classes

Exercise 1: Robotic system design based on high-level requirements

In this exercise, you will get a little bit of practice in obtaining requirements for a robot applied to a particular domain and then designing a software system for solving that problem.

Please follow the steps below in this exercise:

  1. Interact with ChatGPT and ask it to describe a problem where a robot should be used (e.g. a robot that works in an office environment and delivers coffee to people).
  2. The problem that ChatGPT has given you contains requirements for your robotic software system; use these requirements to design a software architecture for a robot that can be used to satisfy those requirements. Here, don’t just think about the technical aspect of your system, but also about who is supposed to be using the robot, and how.
  3. Document your system design in a diagram (e.g. using https://app.diagrams.net)

At the end of the exercise, upload:

  1. A markdown (.md) file containing your interaction with ChatGPT
  2. An image or pdf file containing your system design

Exercise 2: System design continued (using UML)

In the previous exercise, you obtained the requirement for a robotic system and started working on an architecture for that system. In today’s lab class, you need to continue with the modelling of that same system, but now using the modelling knowledge that we acquired in today’s lecture, specifically using UML diagrams.

Your concrete task is to:

  1. Create a system architecture for your robotic system using a UML class diagram
  2. Pick one or more of the other diagram types (use case, activity, sequence, state) and create for one some concrete functionalities of your system (e.g. a sequence diagram for how a user of your robotic system sends a task request to a robot). Feel free to be creative with the choice of functionalities.

You can use any tool you want for creating the diagrams (e.g. using https://app.diagrams.net). At the end of the exercise, upload the diagrams you created (as pdf or image files).

Exercise 3: ROS practice

In this exercise, we will practice using ROS2 a little bit. The concrete objective of the exercise is to develop a collection of ROS2 packages that simulate task execution on a mobile manipulator, namely a robot that can move around and manipulate objects.

Your ROS system should include:

You don’t need to submit anything for this lab class exercise, but we will discuss your solution at the end of this class or during the next lab class.

Exercise 4: ROS practice continued

This exercise is a continuation of the previous lab class exercise, where we developed different ROS packages, each of which exposes a particular robot action, as well as a robot package that simulates task execution.

In this exercise, your objective is to modify your implementation of the robot actions so that they are implemented using ROS actions rather than through topic subscribers. The implementation of the task executor will need to be adapted accordingly, so that ROS action requests are sent to the actions rather than as published messages.

You don’t need to submit anything for this lab class exercise, but we will discuss your solution at the end of this class or during the next lab class.

Exercise 5: Agile development practice

This lab class exercise is a continuation of our first few lab classes, namely we follow up on the design of your robotic system, such that we will use some agile development practices today.

The following are the concrete tasks you need to do:

At the end of the class, please upload:

Exercise 6: Property-based testing

In this exercise, we want to explore property-based testing a little bit.

Concretely, install the Hypothesis library in Python and then integrate some property-based tests in your testing code from the second assignment.

You are free to choose which tests you adapt for this purpose, as well as which properties you test specifically.

Assignments

Assignment 1: State machines and behaviour trees

In this assignment, we will compare the implementation of behaviour trees and state machines to establish primary safety features for a robot; this includes situations such as the battery level falling below a certain threshold and avoiding potential collisions. In other words, we want to implement both a behaviour tree and a state machine to achieve the same functionality.

We particularly want the robot to behave as follows:

You will use the Robile simulation for testing your implementation. For your submission, you need to add your code to the appropriate cells in the assignment Jupyter notebook; however, note that, to actually test your implementation, you need to integrate the code in a ROS package and perform all tests on your local machine.

Detailed instructions for the assignment are provided on Jupyter Hub; the submission should also be done there.

Assignment 2: Testing and quality assurance

This assignment is concerned with software testing and (code) quality assurance. The assignment builds on your first course assignment (where you worked with state machines and behaviour trees), such that the objective is to embed the software you developed there into a continuous integration workflow where your software is tested and the quality of the code is evaluated.

The following are your concrete tasks in this assignment:

  1. Form / join a team in our GitHub classroom; you will get an empty GitHub repository for your team. Push your code from the assignment on state machines and behaviour trees to your repository.
  2. Implement some tests for your components (unit, but also integration). Feel free to decide which aspects of your code you will test (e.g. whether you handle the sensor data correctly, whether your state machine / behaviour tree has the correct states / behaviours, etc.). For testing, I recommend using the unittest Python library, but you can also explore other alternatives if you want.
  3. Set up continuous integration in your repository. The continuous integration process should execute your unit tests so that you can ensure that any changes made to the implementation do not break the tests. Since we are using GitHub, you should use GitHub CI for this purpose.
  4. In your final task, you need to:
    1. Develop some new functionality for your robot; feel free to be creative about this. The functionality should be developed on a feature branch in your repository.
    2. Update your unit tests so that the new components are covered by the tests.
    3. Once you are done with the implementation, create a pull request and merge it only once you have resolved any test issues.

To test the robustness of your workflow, you can, for instance, push some changes that should break some of your tests and create a pull request.

In your submission, add the URL of your repository. Please also upload a directory of screenshots which show that unit tests are executed when you push changes to your repository.

Assignment 3: An investigation of simulators

In this exercise, you will explore the use of different simulators for setting up a robot and interacting with it on a simple point-to-point navigation task. We are particularly aiming to explore how the Robile can be set up and used in different simulators. Each group will work with a different simulator (PyBullet, Webots, MuJoCo, CoppeliaSim, or Chrono). We will not use Gazebo in this exercise since you are already familiar with it — one group will have an unfair advantage.

Detailed instructions

Here are some steps to follow during the assignment:

Submission

First of all, please make sure to push everything you develop to the repository that you set up in the previous assignment.

Additionally, in the assignment Jupyter notebook, submit any code you develop in the assignment, and please submit a screen recorded video to demonstrate your robot in action (you can also upload the video externally, e.g. on Google Drive, and provide a link to it).

Assignment 4: Multi-robot systems

This assignment is a continuation of your assignment on testing and quality assurance, such that the objective is to extend your software so that you can have a multi-robot system. Your particular objective is to develop a functionality based on which robots move side-by-side with a predefined distance between them; in other words, when you then send a goal pose to one of the robots, all other robots should follow along.

Once you develop your functionality, add some unit tests for it, in particular:

As before, add your new features to your repository with a pull request.

Submission

In the assignment Jupyter notebook