Homework #1

 

Graphic Interface

 

Part I: software to draw obstacles and path start and end points.

I have implemented with the Matlab GUI my own software to draw obstacles and to draw the start point and the end point of the path.

You can download the files: HW1.fig and HW1.m.

To draw an obstacle push the button “Draw obstacle” and set with the left mouse button the vertices of the obstacles within the white area (robot workspace W). Click with the right mouse button somewhere to end the process.

 

Image1

 

To draw path start point c(0) and end point c(1) push the button “Set start and end” and set with the left mouse button the two points within the robot workspace W.

 

Image2

 

To draw the path c : [0,1] ® W push the button “Calculate”.

 

Image3

 

 

Part II: path planning algorithm for a person

The algorithm is the follow:

1.    Define the position of your goal.

2.    Move toward the goal.

3.    If you encounter an obstacle, turn right.

4.    Move around the obstacle and memorize the positions you walk through.

5.    As soon there is free space along the direction between you and the goal, move in that direction.

6.    If you encounter another obstacle and you never were in that position turn right and go to step 4). If you already were in that place once, turn left and go to step 4). If you already were in that place twice, you can not reach the goal.

7.    Continue until you reach the goal.









































Web master:  webmaster@varom.it