18-642 Project 8

Updated 8/28/2022. Changelog

Learning objective: experience cleaning up code to pass moderate static analysis; experience creating an automated build.

The amount of time it will take to do this project will depend upon how messy your code is with regard to static analysis warnings. If you get stuck or need a break from cleaning up warnings, you should start working on the build package part of the project since there are minimal dependencies between the two project halves. In general making build packages the first time takes many, many iterations to resolve small issues. Leave some time -- if you wait until the last minute you'll have problems.


Hints/Helpful Links:


Procedure:

  1. Compile your code checking for warnings:
    1. Modify line 67 of $ECE642RTLE_DIR/CMakeLists.txt from set(proj8_flags false) to set(proj8_flags true). This turns the following compiler warnings into errors: -Werror -Wextra -Wall -Wfloat-equal -Wconversion -Wparentheses -pedantic -Wunused-parameter -Wunused-variable -Wunused-value -Wreturn-type -Wunused-function -Wredundant-decls -Wreturn-type -Wswitch-default -Wuninitialized -Winit-self -O1
    2. Study the following lines in ece642rtle/CMakeLists.txt:
      # Warning flags for Projects 8,9,10
      target_compile_options(ece642rtle_student PUBLIC
        "-Werror" # Do not comment this out after Project 8!
        "-Wextra"
        "-Wall"
        ...
      )

      These lines turn on the corresponding warning flags. If you would like to temporarily suppress a warning flag (to cut down on noise while dealing with other warnings), simply comment out the line with a "#." But un-do that later -- all warnings need to be enabled for hand-in
    3. Build your code using the command catkin_make ece642rtle_student and take note of how many warnings (displayed as errors) you see.
    4. Fix the warnings by modifying your code as necessary.
    5. Hand in a version that builds clearn (i.e., ZERO warnings generated when all warnings above are enabled, including -Werror being enabled).
  2. Create a build package. This is a description of how the build package needs to work. (We understand that there are better ways to do build and test, such as Jenkins. But we're sticking with shell scripts to avoid throwing a bunch of additional learning curves at you.)
  3. Answer the following questions in a writeup: (Include your name at the start of the writeup. (If the writeups are printed out, the file name info is lost, so put your name and Andrew ID in the document text as well)
    1. How many warnings did you get in Step 1c (before you fixed warnings)? Which one (if any) was the most surprising?
    2. Which warning was the most difficult to get rid of? What lesson did you learn from this experience?
    3. A screen shot indicating that your code compiles clean (without warnings). The screen shot should include both the command line executed (listing lines from the make file suffices) and a command showing a manually invoked make process finishes with no warnings.
    4. A screen shot indicating that the _build.sh process works showing the tar extraction command and the build command running to completion.
    5. A screen shot indicating that the _run.sh process works showing the _run.sh command and a maze window for maze 1.
    6. Screen shots showing how well mazes 2, and 3 work. You do not have to solve the mazes (yet), but your code must compile, run, and the turtle must leave the start square in the maze.
    7. Did cleaning up warnings fix any bugs or improve performance on mazes 1 through 3?
    8. Do you have any feedback about this project? (Include your name in the writeup)

Handin checklist:

Hand in the following:

  1. Your build file: AndrewID_P08.tgz
  2. Your writeup, called p08_writeup_[FAMILYNAME]_[GivenName]_[AndrewID].pdf the elements of the writeup should be integrated into a single .pdf file. Please don't make the TAs sift through a directory full of separate image and text files.

Other requirements:

Zip the two files and submit them as P08_[FAMILYNAME]_[First name]_[Andrew ID].zip.
The rubric for the project is found here.


Hints:

(If you have hints of your own please e-mail them to the course staff and, if appropriate, we'll add to this list.)


Changelog: