Personal tools
You are here: Home Courses Algorithmic Robotics and Motion Planning Spring 2018 Assignments Assignment 3
« September 2020 »
September
SuMoTuWeThFrSa
12345
6789101112
13141516171819
20212223242526
27282930
Log in


Forgot your password?
 

Assignment 3

Submission

Please submit an archive that contains all source and documentation files in a flat directory structure (that is, place all files of a given exercise in one directory); send the archive file via email to idokessler@mail.tau.ac.il with the subject "Assignment3". State your name, and IDs.

From this assignment and on. 

You can develop on any platform, but the code must compile and run using g++ on Linux.

Exercise 3.2 + 3.3

General

Your solution to exercise should consist of all the source file provided, CMakeLists.txt (input to cmake), and a pdf file called 3.3.pdf.

Running cmake on the provided CMakeLists.txt followed by compilation and linkage should produce two executable called QueryHandler and RodPathFinder.

The files can be found here. The zip contains one input example for each exercise.

Input

The program  QueryHandler and RodPathFinder uses stdin to receive its parameters, the output of the program is combined with a naive check implementation that can be used to verify your solutions. An example input for each program is attached with the code files, and are arrange in the following way:

QueryHandler:

(Without the #comments!)

1 # rod length

2 # number of obstacles (number of vertices and then x,y of each of them)
4 0 0 0 1 1 1 1 0 
4 0 1 0 2 1 2 1 1 

16 #number of queries
#queries (x y rotation)
0 2 0
0 0 0
0 0 1.570797
0 0 0.00001
0 0 3.14
0 0 3.15
0 0 3.13
0 0 6.26
0 0 6.28
0 0 6.30
0 1 0
0 0.5 0
1 1 0
2 2 0
-0.5 -0.5 1.570797
-0.5 -0.5 0.785398

In the files provided, you will find a class that you should implements that return true and false for each query. MyQueryHandler 

RodPathFinder:

(Without the #comments!)

1 # rod length
0 0 0 # rod_start_x rod_start_y rod_start_rotation
1 1 1.570797 # rod_end_x rod_end_y rod_end_rotation

1 #number of obstacles (number of vertices and then x,y of each of them)
4 0 0 0 1 1 1 1 0 #obstacle 

In the files provided, you will find a class that you should implements that return a path from the start point and the end point. MyRodPathFinder

Notice that because this time the configuration space contains a rotation parameter, the path is a combination of points built from (point, rotation, clockwise\counterclockwise). 

For example moving from ((0,0),0,_) to ((0,1),1.5*PI,clockwise) will mean that the robot will move at a constant speed and rotation such that when stating it will be at point 0,0 with rotation 0, at the mid of it's movement it will be at point 0,0.5 and rotation 1.75*PI, and at the end of it's movement it will be at point 0,1 and rotation 1.5*PI. 

Remember you can use pipes to input the stdin from a file:

QueryHandler.exe < ExampleQueries.txt

Visualization:

First, notice you can output your output your path and obstacles if you provide another input to RodPathFinder:

RodPathFinder.exe outputPath.txt < ExamplePathQuery.txt
Then you can use the file provided in the zip: Preview.py in order to visualize the output in the following way:
python Preview.py outputPath.txt
Good luck! :)

    Document Actions