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 (practical session)
  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: Agile development practice

This lab class exercise is a continuation of our previous 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:

Create a few user stories (at most 5) for some of the requirements of your system (obtained in our first lab class). Given the requirements (now expressed as user stories) and the system architecture designed in a previous lab class, define your product backlog, i.e. create issue cards for implementing specific components in your architecture. You are free to choose a tool for creating the issues; you can also just use markdown files (one per issue). Pick one simple component and work on a mock implementation of it by doing pair programming.

At the end of the class, please upload:

Assignments

Assignment 1: State machines and behaviour trees

In this assignment, you will implement a simple state machine as well as a simple behaviour tree to incorporate some safety behaviours for the Robile robot, namely:

Detailed instructions for the assignment and all required scripts for the assignment are attached with the assignment.

Your submission should be done on LEA and should contain a single zip that includes the contents of the src directory in a ROS workspace as described in the instructions.

Assignment 2: 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

Please submit a single directory containing:

Assignment 3: 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. Set up a GitHub repository and push your code from the assignment on state machines and behaviour trees there.
  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.
  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. Software testing can ensure that your code is functionally correct, but cannot ensure that it is well-written or that it follows concrete development standards. Thus, in addition to continuous integration, we need some way of verifying the code quality in your software. For this purpose, you need to set up Codacy in your repository. At the very least, you should set it up so that it verifies that your code follows the PEP8 style guide for Python, and should warn you about complex and repeated code. Set up Codacy so that it is executed for every pull request you create to your main branch.
  5. 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 the issues raised by Codacy.

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 with low-quality code that should be flagged by Codacy.

Your submission for this assignment should contain:

Assignment 4: Multi-robot systems

This assignment is a continuation of your previous assignment, 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. 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.

Your submission for this assignment should contain: