Personal tools
You are here: Home Courses Algorithmic Robotics and Motion Planning Fall 2021/2022 Assignments Assignment 1
« January 2022 »
Log in

Forgot your password?

Assignment 1


Please submit an archive that contains all source and documentation files in a flat directory structure for each exercise (that is, place all files of a given exercise in one directory); Upload the archive to moodle, in the relevant submission box. Make sure to include in the archive a file cover.pdf , where you describe your solution and explain in detail how to run the program.

You are free to use any programming language for this exercise.

Exercise 1.1


Name the archive either or oskar.tar.gz.
Name the basename (the filename without the extension) of the program file oskar.
If you develop in C++ use a single source file called oskar.cpp.
If you develop in Python name the executable
If you develop in a different language, follow the same logic...


sx sy sz dx dy dz filename

The program should accept 7 arguments on the command line:

  • The source location of the robot (sx sy sz), followed by the destination location of the robot (dx dy dz), followed by the name of file that contains the description of the obstacle (filename). 
  • Each location is a vector of three integral values specifying the x, y, and z coordinates of the robot center.
  • A valid input file starts with the x, y, and z dimensions (in that order) of the puzzle followed by three matrices representing the xy-, yz-, and zx-faces; 0 represents a free location and 1 represents a forbidden location.
    • The entry in row i>=0 and column j>=0 in the xy-matrix represents the value for x=j and y=i. The same holds for the two other matrices.
  • The dimensions of the standard Oskar puzzle are 11, 11, 11. For a puzzle of dimensions 11,11,11 a location is defined by three integer values v_1, v_2, v_3, where  0<=v_k<=10.
  • One pair of source and destination locations is (3, 7, 7) and (5, 1, 1), respectively. 
  • You can obtain the file that contains the three (11x11) matrices here.


The program should export the result to the standard output. The output format must be identical to the format of the verifier (see below). It consists of three lines.
The first and second lines contain the start and end positions, respectively. Each position consists of three integral values separated by spaces.
The third line contains a sequence of commands separated by spaces. Applying these commands to the robot should move it from the source location to the destination location without passing through forbidden locations. A command is encoded as follows:

0—move one unit along the x-axis in the positive direction
1—move one unit along the x-axis in the negative direction
2—move one unit along the y-axis in the positive direction
3—move one unit along the y-axis in the negative direction
4—move one unit along the z-axis in the positive direction
5—move one unit along the z-axis in the negative direction

Oskar verifier and simulator

In the following website you can verify your solution and visualize the simulation:

You can rotate the viewport by clicking and dragging the left mouse button, and zoom in and out with the mouse scroll wheel.

On the top left corner of the simulator there are three input fields which have the following format (from top to bottom):

  • Start position (e.g. 3 7 7)
  • End position (e.g. 1 7 9) 
  • Command sequence (e.g. 4 4 1 1)

After entering the input you can press the play button on the bottom of the simulator to view the simulation in action! You can also press the “Verify” button to verify your input without playing the animation (and get the result immediately).

There is a log message on the bottom left corner, which displays an error/success message or the verifier/simulation.

Document Actions