Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Software Engineering Principles in Robotics

Marc Hanheide edited this page Jan 19, 2021 · 4 revisions

I generally recommended using proper git workflow, in particular once you get to develop larger projects. We will learn about forking, pulling, merging, and testing

You may find the official GitHub Desktop Client useful for you daily work, but also learn the command line tools!. To install the unofficial build for Linux, execute this script, then launch it with the (very inaptly named) command desktop.

Make sure you look at the useful resources for today's session.

If you don't have a github account and you don't want one, you can work locally with a git repository! Some parts of the tasks, however require interaction with the a server.

Task 1

Look at https://guides.github.com/introduction/git-handbook/ and Find the Section "Example: Start a new repository and publish it to GitHub" (you may skip this if you had already done this)

  1. Do those steps to put your source code into a remote GitHub (public) repository that you created.
  2. Team up with somebody else, can git clone their respective repository.
  3. Each of you edit some files in your local own repository and discuss how the other one can get them.

Task 2

  1. Fork https://github.com/LCAS/CMP9767M into your own github account (if you haven't done so yet), then clone on your computer
  2. create a new branch from the master branch, named e.g. week_11 and make sure you are working in that branch (how can you check?)
  3. create and commit a file mytest.txt in branch week_11 with content:
    this is some
    text I include in this file
    
  4. check out branch master again (where did your file go?)
  5. check out a new branch week_11_sidetrack based on master
  6. create and commit again a file mytest.txt in branch week_11_sidetrack with content:
    this is some MORE
    text I include in this file
    
  7. check out week_11 again
  8. merge week_11_sidetrack into week_11 (you'll have a conflict to resolve)

Task 3: Work on your assignment

... and at the end of today, make sure you have it on github! Or wherever you host your code.


Sneak Peek: Task 5: run a rostest

  1. Clone your fork of the CMP9767M repository locally
  2. Pull in the changes from upstream, i.e., pull from https://github.com/LCAS/CMP9767M.git (research how to do it, e.g. read this )
  3. Run the simple-test.py and understand what it does
  4. Run the testme.test ROS test

Sneak Peek: Optional Task 6: write your own unit test

  1. Look at https://github.com/steup/Ros-Test-Example/tree/master/src/python_test and understand it
  2. Look at https://github.com/LCAS/CMP9767M/tree/master/uol_cmp9767m_base/tests and understand it
  3. Based on [testme.test] extend it with a test that checks the sprayer works (i.e. the service call succeeds)