Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

Machine learning uses a LOT of memory (approximately 3-4GB of RAM). Make sure your computer has enough to spare.

The linters and formatters should also pass.

Name

Command

Description

Passing criteria

Black

black .

Black is a formatter that edits the code layout (e.g. indentation, multiline).

Running Black is sufficient for it to pass.

Flake8

flake8 .

Flake8 is a linter that reports whether function and methods are correctly type annotated.

Flake8 outputting nothing is a pass.

Pylint

pylint modules

Pylint is a general linter.

Pylint outputting a code rating of 10.00/10 is a pass. It must be exactly 10.00 , so 9.99/10 is not passing.

...

Once your code is implemented, the simulator should exit after the drone lands, which should occur within 60 seconds of start. The difference between the coordinates of the drone position and waypoint under the text file in log/ should be less than 0.1 . You can also confirm with the screenshot.

The linters and formatters should also pass.

Note

Hints:

  • You do not need to use landing_pad_locations in this task.

  • You can use the drone report’s destination to see if your relative command is correct.

  • Ideally, the drone will report Halted at the beginning of the simulation and when it reaches the waypoint. The rest of the time, it will report something that isn’t Halted.

    • So you’ll have to find a way to know the difference between Halted at initial position and Halted at the waypoint.

...

Once your code is implemented, the simulator should exit after the drone lands, which should occur within 60 seconds of start. The difference between the coordinates of the drone position and the landing pad under the text file in log/ should be less than 0.1 . You can also confirm with the screenshot.

The linters and formatters should also pass.

Note

Hints:

  • You can write a helper function to calculate the distance between 2 Location objects. This will make the finding closest landing pad code easier to read and write.

  • You can initialize the distance value with a very large number (e.g. infinity). Then the first landing pad’s distance will definitely be smaller than this. Details of the loop and logic are for you to implement…

    • Don’t constantly recalculate the distances if you don’t need to.

  • What if the closest landing pad is directly on the waypoint? Your code needs to handle this case.

...