Midterm Project
Midterm Project
Obstacle Avoidance
Obstacle Avoidance
&
&
Black line follow
Black line follow
self-walking mbot
self-walking mbot
組員
組員
410586037 張孟承
410586037 張孟承
410586029 蘇群哲
410586029 蘇群哲
410586028 許博鈞
410586028 許博鈞
410586021 林泓叡
410586021 林泓叡
Part I.
Part I.
Black line follow
Black line follow
There are four situation, A, B, C and D, that mbot may encounter.
There are four situation, A, B, C and D, that mbot may encounter.
A: Walking on the black line perfectly.
A: Walking on the black line perfectly.
B: Only left linefollower inside black line.
B: Only left linefollower inside black line.
C: Only right linefollower inside black line.
C: Only right linefollower inside black line.
D: Unknown. Ex: on the edge of the right angle corner of the turning part.
D: Unknown. Ex: on the edge of the right angle corner of the turning part.
Then, we figure out some counter measure for mbot.
Then, we figure out some counter measure for mbot.
1. Black line follow self-walking
1. Black line follow self-walking
(a) First, we define these following functions : turn_left, turn_right, turn_around
(a) First, we define these following functions : turn_left, turn_right, turn_around
These functions can make our mbot turn right, turn left, and also let it return to black lines: turn around until the linefollower detect that mbot is walking on the black line.
These functions can make our mbot turn right, turn left, and also let it return to black lines: turn around until the linefollower detect that mbot is walking on the black line.
(b)Then, we define a function, named tracking, and we put the functions we just mentioned above.
(b)Then, we define a function, named tracking, and we put the functions we just mentioned above.
Finally, with the tracking function and some if-else conditions, we can make our mbot follow black lines by itself.
Finally, with the tracking function and some if-else conditions, we can make our mbot follow black lines by itself.
This is the function that make our mbot to follow the black line while moving.
This is the function that make our mbot to follow the black line while moving.
Here we set track variable to get the value of line-following sensor. With the variable "track" and a few if-else conditions, we can make our mbot follow the black lines.
Here we set track variable to get the value of line-following sensor. With the variable "track" and a few if-else conditions, we can make our mbot follow the black lines.
Part II.
Part II.
Obstacle Avoidance
Obstacle Avoidance
If mbot detects that there is/are some obstacle in the front, it will do something.
If mbot detects that there is/are some obstacle in the front, it will do something.
2. Avoid obstacles
2. Avoid obstacles
(a)Similarly, we define a function to achieve the avoidance from obstacle. Our idea is when mbot detect obstacles in a specified distance, mbot will walk a circle to avoid the obstacles,and then return to the black lines
(a)Similarly, we define a function to achieve the avoidance from obstacle. Our idea is when mbot detect obstacles in a specified distance, mbot will walk a circle to avoid the obstacles,and then return to the black lines
The function "route" can make our mbot turn right when Ultrasonic sensor detect obstacles, and let two wheel's rotating speed different to turn left and let it keep walking on the black line.
The function "route" can make our mbot turn right when Ultrasonic sensor detect obstacles, and let two wheel's rotating speed different to turn left and let it keep walking on the black line.
Part III.
Part III.
Combine line following and obstacle avoidance
Combine line following and obstacle avoidance
We use ultrasonic sensor to detect obstacles
We use ultrasonic sensor to detect obstacles
If mbot detect obstacles, and its distance < 7(by our experience), it will do the function route, which can avoid obstacle. Otherwise, mbot will do the function tracking, which can following black lines.
If mbot detect obstacles, and its distance < 7(by our experience), it will do the function route, which can avoid obstacle. Otherwise, mbot will do the function tracking, which can following black lines.
And then Mbot will repeat this process....
And then Mbot will repeat this process....
Part IV.
Part IV.
Experience Sharing
Experience Sharing
BY our poor bro Mr.朱
I am upset today. When I finished my mbot midterm project, I noticed that my apm3220 was restricted due to illegal-parking😭 😭 😭 😭 😭 . I went to Guard room to require him unlock my apm3220 . Eventually, the guard unlocked my apm3220, but I paid three hundred dollars to him. In spite of taking the risk of probably living in school for one night and losing my three hundred dollars,I would still park my vios <APM3220> in restricted parking space for the reason of convenience.
I am upset today. When I finished my mbot midterm project, I noticed that my apm3220 was restricted due to illegal-parking😭 😭 😭 😭 😭 . I went to Guard room to require him unlock my apm3220 . Eventually, the guard unlocked my apm3220, but I paid three hundred dollars to him. In spite of taking the risk of probably living in school for one night and losing my three hundred dollars,I would still park my vios <APM3220> in restricted parking space for the reason of convenience.
I went home to ask my mom give me one thousand dollars.I ,so,actually gained seven hundred dollars. d(`・∀・)b😁😁😁😁😜😁😁😁😁😜
I went home to ask my mom give me one thousand dollars.I ,so,actually gained seven hundred dollars. d(`・∀・)b😁😁😁😁😜😁😁😁😁😜
(我多益560,有畢業危機,看不出來吧) god like smile ghost
(我多益560,有畢業危機,看不出來吧) god like smile ghost
影片
影片
36144.t.mp4
36129.t.mp4
照片
照片
88888888888888888888888888888七天後見88888888888888888888888888888