https://cstwiki.wtb.tue.nl/api.php?action=feedcontributions&user=S108032&feedformat=atom
Control Systems Technology Group - User contributions [en]
2024-03-28T18:12:23Z
User contributions
MediaWiki 1.39.5
https://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Scan&diff=21077
Embedded Motion Control 2015 Group 3/Scan
2015-06-26T18:56:42Z
<p>S108032: /* T-junction */</p>
<hr />
<div>= Scan = <br />
<br />
This page is part of the [[Embedded_Motion_Control_2015_Group_3|EMC03 CST-wiki]].<br />
<br />
In order to solve the maze, the robot needs to be able to drive autonomously. One type of data that is available is the laser range finder data. The PICO robot has a 270 degrees view, divided in approximately a thousand increments.<br />
<br />
=== Potential field ===<br />
<br />
By splitting up the received laser data from the LRF in x and y, and summing them up results in a large vector containing the appropiate angle for PICO to follow. In other words, PICO moves always to the point with the most room. Note, the actual magnitude of this resultant vector is of no importance, since the Drive block has is own conditions for velocity.<br />
<br />
In straight corridors potential field will let PICO drive in the middle in a robust manner. In the case that PICO approaches a T-junction or intersection a decision must be made by the decision maker<br />
<br />
Since there are more than one options at intersections, there has to be an extra element to send the robot in the appropriate direction. This is done by blocking the other directions with virtual walls. In principle an extra layer has been added with the modified laser range finder data that PICO sees. From there on the potential field will do its work and PICO will drive in its desired direction.<br />
<br />
The potential field function will perceive these virtual walls as real walls. Therefore, PICO will avoid these 'walls' and drive into the desired corridor. The 'decision maker' in combination with the 'mapping algorithm' will decide were to place the virtual walls.<br />
<br />
=== Collision avoidance ===<br />
<br />
The first level of safety is provided by the potential field algorithm. Its resultant vector will always point towards the direction with the most room and therefore it is sufficient as first layer. However, avoidance collision is one of the top priorities, since if Pico bumps into the wall, the attempt of solving the maze has failed. Another safety layer has been implemented to prevent the robot from hitting walls or corners. The distance to the walls is continuously measured and compared to a set safety margin. If the distance of multiple coextensive beams is smaller than this fixed parameter the robot will move in the opposite direction. Below a simulation can be seen for collision avoidance.<br />
<br />
=== Detection intersections ===<br />
<br />
At this stage the basic skill of driving with the potential field based on LRF data is complete. Next, the different type of junctions and intersections must be recognized in order to solve the maze. Not only is recognition necassary for driving through the maze, it is also a important part of mapping the maze, see [[Embedded_Motion_Control_2015_Group_3/Mapping| Mapping]].<br />
<br />
Since the maze is axis alligned there are three possibilites:<br />
<br />
# Crossroad<br />
# T-junction<br />
# Open space<br />
<br />
The first two cases are detected by taking n+10 and n-10 and looking if they differ more than 30 centimeter, in that case there is a corridor. By using this simple but very effective method, left and right corridors can be distinguished. Next, detecting if there is a corridor in front. This is done by adding up multiple beams in the front and dividing them by the number of beams. If this differs more than a set value from the middle one, there is a corridor. <br />
<br />
===== Open space =====<br />
<br />
When 80% of the LRF data is larger than 1 meter PICO knows it is in a open space and therefore it starts wall hugging in order to find the exit. Pico will stop this procedure if the width of the corridor is equal or smaller than 1.5 meter, which is the maximum size of a corridor. Below a simulation can be seen for handling an open space.<br />
<br />
[[File:open_space.gif|200px|frame|left|Pico handling open space]]<br />
[[File:collision.gif|200px|frame|center|Pico using collision avoidance]]<br />
<br />
=== Constructing virtual walls ===<br />
<br />
Constructing virtual walls is an essential part of driving PICO around the maze. First individual virtual walls are constructed, by which potential corridors are blocked. This lead PICO in the desired direction. At a later stage this idea was slightly modified by computing a wall on a radius. Therefore, PICO will move more smoothly through a corner.<br />
<br />
<br />
===== Crossroad ===== <br />
Consider a crossroad shown in the picture below. The left plot shows what PICO sees when approaching this kind of junction. There are three maxima, which represent the possible directions PICO can go in. By slightly modifying the data, the actual vision as seen in the simulator can be constructed, as shown in the figures below. In the figure on the left two minima are shown that represent the far corners between the three maxima. These provide PICO with reference points from where the virtual walls are constructed. Depending on the direction of the desired turn, the corner is used as a reference point for computing the radius at which the virtual walls are placed. In the right figure the actual constructed walls can be seen. The corridor in front and the left corridor are blocked, so due to blocking of these path ways, the potential field will lead PICO to the desired right direction.<br />
<br />
{| align = "center"<br />
|[[File:crossroad.png|400px|Figure 1) The LRF data from PICO, (a) showing the data pico retrieves in this case 3 maxima and 2 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_crossroad.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
===== T-junction =====<br />
<br />
Now a T-junction is further examined. The figure below shows what PICO sees in this case. The figure shows two maxima with a minimum inbetween those maxima. These two maxima are used as bounds for finding the minimum. When the robot turns, it is hard to keep a reference point. Therefore finding this minimum is a good method of finding the reference point, which is needed to construct the virtual walls. These actual constructed wall can also be seen. In the case of a T-junction, the situation is slightly different. In this case, using the above method will not result in a minimum, that represents a corner. However locating this minimum is useful, depending on the kind of turn (100+n[minimum] or 100-n[minimum]), a radius is computed which will represent the virtual wall. These actual constructed wall can also be seen. The left corridor is blocked, so similar to the crossroad, PICO will be directed to the right corridor.<br />
<br />
<br />
{| align = "center"<br />
|[[File:T-junction.png|400px|Figure 2) The LRF data from PICO, (a) showing the data pico retrieves in this case 2 maxima and 1 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_Tjunction.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
<br />
=== Door Detection ===<br />
<br />
Since a door is basically a dead end which can be opened, PICO should search for dead ends. These have a specific profile where always three walls are visible and connected. Since the maze is axis aligned, two of these walls will be parallel. The other wall is positioned perpendicular to the parallel. These dead ends can be found at the end of a corridor and in junctions longer than 0.3 meters. This means PICO has to detect dead ends/doors in front and at the sides. Therefore PICO will search in three regions in its LRF-data for doors. All regions use the same methods for detecting doors. This method is based on the profile of a dead end and PICO tries to recognize dead ends by searching its LRF-data with some conditions. PICO will search for the two corner points where the walls meet. In between these corner points, the dead end/door can be detected. <br />
See the figure below, the points which PICO must detect are highlighted by a red cross. PICO will first start by searching the left corner point [1] within a certain range. If this point can be found, pico will search for the wall or door [2] which should be right of this point. If this point can be found, PICO will search for the last point which is the right corner point [3]. PICO will only look for the next point if the last one is found. <br />
<br />
To prevent PICO from wrongly detecting doors, two extra conditions to qualify as a door/dead end are added. When the points are found, the distance to these points and the angles are known. This makes it possible to determine whether all points are aligned. This is done by calculating the distance of all points according to figure 3 as "distance to pico". All three lenghts should be approximately equal. <br />
The second condition is that the length of the door has to be within the bound given in the assignment. Thus: 0.5 < door length < 1.5. If all conditions are met, this area will qualify as a daed end/door. If the distance to PICO has become small enough, PICO has reached the door area.<br />
During the experiments we noticed that doors could still be wrongly detected due to measurement noise, or if the walls are placed a little askew. Therefore the last fix was introduced. PICO has to detect dead ends/doors ten times in a row before it actually qualifies as a real dead end/door. This is done in order to eliminate measurement noise/faults. <br />
<br />
[[File:wiki_doors.png|400px|thumb|center|Figure 3) PICO detecting doors, top images showing how pico detects doors/dead ends in front. The middle images show PICO detecting a door/dead ends on the right side. Bottom images showing PICO detecting incoming doors/dead ends]]<br />
<br />
If PICO has detected a dead end/door and it is positioned in the door area, PICO will immediately stop and send the door request. After this, PICO will stand still for six seconds to wait if the doors opens. After this waiting time, PICO will look for one more second whether it is still in the door area. If PICO is still in the door area, this means that nothing has changed and the door has not opened. It will qualify these results as a regular dead end and turn around. If PICO is no longer in the door area, PICO concludes that the door has opened and PICO will continue on its path. Since this path was directed at the door, PICO will go through the door and continue the search for the exit of the maze.</div>
S108032
https://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Scan&diff=21065
Embedded Motion Control 2015 Group 3/Scan
2015-06-26T18:52:02Z
<p>S108032: /* Crossroad */</p>
<hr />
<div>= Scan = <br />
<br />
This page is part of the [[Embedded_Motion_Control_2015_Group_3|EMC03 CST-wiki]].<br />
<br />
In order to solve the maze, the robot needs to be able to drive autonomously. One type of data that is available is the laser range finder data. The PICO robot has a 270 degrees view, with approximately thousand beams. <br />
<br />
=== Potential field ===<br />
<br />
By splitting up the received laser data from the LRF in x and y, and summing them up results in a large vector containing the appropiate angle for PICO to follow. In other words, PICO moves always to the point with the most room. Note, the actual magnitude of this resultant vector is of no importance, since the Drive block has is own conditions for velocity.<br />
<br />
In straight corridors potential field will let PICO drive in the middle in a robust manner. In the case that PICO approaches a T-junction or intersection a decision must be made by the decision maker<br />
<br />
Since there are more than one options at intersections, there has to be an extra element to send the robot in the appropriate direction. This is done by blocking the other directions with virtual walls. In principle an extra layer has been added with the modified laser range finder data that PICO sees. From there on the potential field will do its work and PICO will drive in its desired direction.<br />
<br />
The potential field function will perceive these virtual walls as real walls. Therefore, PICO will avoid these 'walls' and drive into the desired corridor. The 'decision maker' in combination with the 'mapping algorithm' will decide were to place the virtual walls.<br />
<br />
=== Collision avoidance ===<br />
<br />
The first level of safety is provided by the potential field algorithm. Its resultant vector will always point towards the direction with the most room and therefore it is sufficient as first layer. However, avoidance collision is one of the top priorities, since if Pico bumps into the wall, the attempt of solving the maze has failed. Another safety layer has been implemented to prevent the robot from hitting walls or corners. The distance to the walls is continuously measured and compared to a set safety margin. If the distance of multiple coextensive beams is smaller than this fixed parameter the robot will move in the opposite direction. Below a simulation can be seen for collision avoidance.<br />
<br />
=== Detection intersections ===<br />
<br />
At this stage the basic skill of driving with the potential field based on LRF data is complete. Next, the different type of junctions and intersections must be recognized in order to solve the maze. Not only is recognition necassary for driving through the maze, it is also a important part of mapping the maze, see [[Embedded_Motion_Control_2015_Group_3/Mapping| Mapping]].<br />
<br />
Since the maze is axis alligned there are three possibilites:<br />
<br />
# Crossroad<br />
# T-junction<br />
# Open space<br />
<br />
The first two cases are detected by taking n+10 and n-10 and looking if they differ more than 30 centimeter, in that case there is a corridor. By using this simple but very effective method, left and right corridors can be distinguished. Next, detecting if there is a corridor in front. This is done by adding up multiple beams in the front and dividing them by the number of beams. If this differs more than a set value from the middle one, there is a corridor. <br />
<br />
===== Open space =====<br />
<br />
When 80% of the LRF data is larger than 1 meter PICO knows it is in a open space and therefore it starts wall hugging in order to find the exit. Pico will stop this procedure if the width of the corridor is equal or smaller than 1.5 meter, which is the maximum size of a corridor. Below a simulation can be seen for handling an open space.<br />
<br />
[[File:open_space.gif|200px|frame|left|Pico handling open space]]<br />
[[File:collision.gif|200px|frame|center|Pico using collision avoidance]]<br />
<br />
=== Constructing virtual walls ===<br />
<br />
Constructing virtual walls is an essential part of driving PICO around the maze. First individual virtual walls are constructed, by which potential corridors are blocked. This lead PICO in the desired direction. At a later stage this idea was slightly modified by computing a wall on a radius. Therefore, PICO will move more smoothly through a corner.<br />
<br />
<br />
===== Crossroad ===== <br />
Consider a crossroad shown in the picture below. The left plot shows what PICO sees when approaching this kind of junction. There are three maxima, which represent the possible directions PICO can go in. By slightly modifying the data, the actual vision as seen in the simulator can be constructed, as shown in the figures below. In the figure on the left two minima are shown that represent the far corners between the three maxima. These provide PICO with reference points from where the virtual walls are constructed. Depending on the direction of the desired turn, the corner is used as a reference point for computing the radius at which the virtual walls are placed. In the right figure the actual constructed walls can be seen. The corridor in front and the left corridor are blocked, so due to blocking of these path ways, the potential field will lead PICO to the desired right direction.<br />
<br />
{| align = "center"<br />
|[[File:crossroad.png|400px|Figure 1) The LRF data from PICO, (a) showing the data pico retrieves in this case 3 maxima and 2 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_crossroad.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
===== T-junction =====<br />
<br />
Now a T-junction is further examined. The figure below shows what PICO sees in this case. The figure shows two maxima with a minimum inbetween those maxima. These two maxima are used as bounds for finding the minimum. When the robot turns, it is hard to keep a reference point. Therefore finding this minimum is a good method of finding the reference point, which is needed to construct the virtual walls. These actual constructed wall can also be seen.<br />
<br />
<br />
{| align = "center"<br />
|[[File:T-junction.png|400px|Figure 2) The LRF data from PICO, (a) showing the data pico retrieves in this case 2 maxima and 1 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_Tjunction.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
In the case of a T-junction, the situation is slightly different. In this case, using the above method will not result in a minimum, that represents a corner. However locating this minimum is useful, depending on the kind of turn (100+n[minimum] or 100-n[minimum]), a radius is computed which will represent the virtual wall.<br />
<br />
=== Door Detection ===<br />
<br />
Since a door is basically a dead end which can be opened, PICO should search for dead ends. These have a specific profile where always three walls are visible and connected. Since the maze is axis aligned, two of these walls will be parallel. The other wall is positioned perpendicular to the parallel. These dead ends can be found at the end of a corridor and in junctions longer than 0.3 meters. This means PICO has to detect dead ends/doors in front and at the sides. Therefore PICO will search in three regions in its LRF-data for doors. All regions use the same methods for detecting doors. This method is based on the profile of a dead end and PICO tries to recognize dead ends by searching its LRF-data with some conditions. PICO will search for the two corner points where the walls meet. In between these corner points, the dead end/door can be detected. <br />
See the figure below, the points which PICO must detect are highlighted by a red cross. PICO will first start by searching the left corner point [1] within a certain range. If this point can be found, pico will search for the wall or door [2] which should be right of this point. If this point can be found, PICO will search for the last point which is the right corner point [3]. PICO will only look for the next point if the last one is found. <br />
<br />
To prevent PICO from wrongly detecting doors, two extra conditions to qualify as a door/dead end are added. When the points are found, the distance to these points and the angles are known. This makes it possible to determine whether all points are aligned. This is done by calculating the distance of all points according to figure 3 as "distance to pico". All three lenghts should be approximately equal. <br />
The second condition is that the length of the door has to be within the bound given in the assignment. Thus: 0.5 < door length < 1.5. If all conditions are met, this area will qualify as a daed end/door. If the distance to PICO has become small enough, PICO has reached the door area.<br />
During the experiments we noticed that doors could still be wrongly detected due to measurement noise, or if the walls are placed a little askew. Therefore the last fix was introduced. PICO has to detect dead ends/doors ten times in a row before it actually qualifies as a real dead end/door. This is done in order to eliminate measurement noise/faults. <br />
<br />
[[File:wiki_doors.png|400px|thumb|center|Figure 3) PICO detecting doors, top images showing how pico detects doors/dead ends in front. The middle images show PICO detecting a door/dead ends on the right side. Bottom images showing PICO detecting incoming doors/dead ends]]<br />
<br />
If PICO has detected a dead end/door and it is positioned in the door area, PICO will immediately stop and send the door request. After this, PICO will stand still for six seconds to wait if the doors opens. After this waiting time, PICO will look for one more second whether it is still in the door area. If PICO is still in the door area, this means that nothing has changed and the door has not opened. It will qualify these results as a regular dead end and turn around. If PICO is no longer in the door area, PICO concludes that the door has opened and PICO will continue on its path. Since this path was directed at the door, PICO will go through the door and continue the search for the exit of the maze.</div>
S108032
https://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Scan&diff=21057
Embedded Motion Control 2015 Group 3/Scan
2015-06-26T18:48:56Z
<p>S108032: /* Scan */</p>
<hr />
<div>= Scan = <br />
<br />
This page is part of the [[Embedded_Motion_Control_2015_Group_3|EMC03 CST-wiki]].<br />
<br />
In order to solve the maze, the robot needs to be able to drive autonomously. One type of data that is available is the laser range finder data. The PICO robot has a 270 degrees view, with approximately thousand beams. <br />
<br />
=== Potential field ===<br />
<br />
By splitting up the received laser data from the LRF in x and y, and summing them up results in a large vector containing the appropiate angle for PICO to follow. In other words, PICO moves always to the point with the most room. Note, the actual magnitude of this resultant vector is of no importance, since the Drive block has is own conditions for velocity.<br />
<br />
In straight corridors potential field will let PICO drive in the middle in a robust manner. In the case that PICO approaches a T-junction or intersection a decision must be made by the decision maker<br />
<br />
Since there are more than one options at intersections, there has to be an extra element to send the robot in the appropriate direction. This is done by blocking the other directions with virtual walls. In principle an extra layer has been added with the modified laser range finder data that PICO sees. From there on the potential field will do its work and PICO will drive in its desired direction.<br />
<br />
The potential field function will perceive these virtual walls as real walls. Therefore, PICO will avoid these 'walls' and drive into the desired corridor. The 'decision maker' in combination with the 'mapping algorithm' will decide were to place the virtual walls.<br />
<br />
=== Collision avoidance ===<br />
<br />
The first level of safety is provided by the potential field algorithm. Its resultant vector will always point towards the direction with the most room and therefore it is sufficient as first layer. However, avoidance collision is one of the top priorities, since if Pico bumps into the wall, the attempt of solving the maze has failed. Another safety layer has been implemented to prevent the robot from hitting walls or corners. The distance to the walls is continuously measured and compared to a set safety margin. If the distance of multiple coextensive beams is smaller than this fixed parameter the robot will move in the opposite direction. Below a simulation can be seen for collision avoidance.<br />
<br />
=== Detection intersections ===<br />
<br />
At this stage the basic skill of driving with the potential field based on LRF data is complete. Next, the different type of junctions and intersections must be recognized in order to solve the maze. Not only is recognition necassary for driving through the maze, it is also a important part of mapping the maze, see [[Embedded_Motion_Control_2015_Group_3/Mapping| Mapping]].<br />
<br />
Since the maze is axis alligned there are three possibilites:<br />
<br />
# Crossroad<br />
# T-junction<br />
# Open space<br />
<br />
The first two cases are detected by taking n+10 and n-10 and looking if they differ more than 30 centimeter, in that case there is a corridor. By using this simple but very effective method, left and right corridors can be distinguished. Next, detecting if there is a corridor in front. This is done by adding up multiple beams in the front and dividing them by the number of beams. If this differs more than a set value from the middle one, there is a corridor. <br />
<br />
===== Open space =====<br />
<br />
When 80% of the LRF data is larger than 1 meter PICO knows it is in a open space and therefore it starts wall hugging in order to find the exit. Pico will stop this procedure if the width of the corridor is equal or smaller than 1.5 meter, which is the maximum size of a corridor. Below a simulation can be seen for handling an open space.<br />
<br />
[[File:open_space.gif|200px|frame|left|Pico handling open space]]<br />
[[File:collision.gif|200px|frame|center|Pico using collision avoidance]]<br />
<br />
=== Constructing virtual walls ===<br />
<br />
Constructing virtual walls is an essential part of driving PICO around the maze. First individual virtual walls are constructed, by which potential corridors are blocked. This lead PICO in the desired direction. At a later stage this idea was slightly modified by computing a wall on a radius. Therefore, PICO will move more smoothly through a corner.<br />
<br />
<br />
===== Crossroad ===== <br />
Consider a crossroad shown in the picture below. The left plot shows what PICO sees when approaching this kind of junction. There are three maxima, which represent the possible directions PICO can go in. By slightly modifying the data, the actual vision as seen in the simulator can be constructed, as shown in the figures below. In the figure on the left two minima are shown that represent the far corners between the three maxima. These provide PICO with reference points from where the virtual walls are constructed. Depending on the direction of the desired turn, the corner is used as a reference point for computing the radius at which the virtual walls are placed. In the right figure the actual constructed walls can be seen.<br />
<br />
{| align = "center"<br />
|[[File:crossroad.png|400px|Figure 1) The LRF data from PICO, (a) showing the data pico retrieves in this case 3 maxima and 2 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_crossroad.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
===== T-junction =====<br />
<br />
Now a T-junction is further examined. The figure below shows what PICO sees in this case. The figure shows two maxima with a minimum inbetween those maxima. These two maxima are used as bounds for finding the minimum. When the robot turns, it is hard to keep a reference point. Therefore finding this minimum is a good method of finding the reference point, which is needed to construct the virtual walls. These actual constructed wall can also be seen.<br />
<br />
<br />
{| align = "center"<br />
|[[File:T-junction.png|400px|Figure 2) The LRF data from PICO, (a) showing the data pico retrieves in this case 2 maxima and 1 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_Tjunction.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
In the case of a T-junction, the situation is slightly different. In this case, using the above method will not result in a minimum, that represents a corner. However locating this minimum is useful, depending on the kind of turn (100+n[minimum] or 100-n[minimum]), a radius is computed which will represent the virtual wall.<br />
<br />
=== Door Detection ===<br />
<br />
Since a door is basically a dead end which can be opened, PICO should search for dead ends. These have a specific profile where always three walls are visible and connected. Since the maze is axis aligned, two of these walls will be parallel. The other wall is positioned perpendicular to the parallel. These dead ends can be found at the end of a corridor and in junctions longer than 0.3 meters. This means PICO has to detect dead ends/doors in front and at the sides. Therefore PICO will search in three regions in its LRF-data for doors. All regions use the same methods for detecting doors. This method is based on the profile of a dead end and PICO tries to recognize dead ends by searching its LRF-data with some conditions. PICO will search for the two corner points where the walls meet. In between these corner points, the dead end/door can be detected. <br />
See the figure below, the points which PICO must detect are highlighted by a red cross. PICO will first start by searching the left corner point [1] within a certain range. If this point can be found, pico will search for the wall or door [2] which should be right of this point. If this point can be found, PICO will search for the last point which is the right corner point [3]. PICO will only look for the next point if the last one is found. <br />
<br />
To prevent PICO from wrongly detecting doors, two extra conditions to qualify as a door/dead end are added. When the points are found, the distance to these points and the angles are known. This makes it possible to determine whether all points are aligned. This is done by calculating the distance of all points according to figure 3 as "distance to pico". All three lenghts should be approximately equal. <br />
The second condition is that the length of the door has to be within the bound given in the assignment. Thus: 0.5 < door length < 1.5. If all conditions are met, this area will qualify as a daed end/door. If the distance to PICO has become small enough, PICO has reached the door area.<br />
During the experiments we noticed that doors could still be wrongly detected due to measurement noise, or if the walls are placed a little askew. Therefore the last fix was introduced. PICO has to detect dead ends/doors ten times in a row before it actually qualifies as a real dead end/door. This is done in order to eliminate measurement noise/faults. <br />
<br />
[[File:wiki_doors.png|400px|thumb|center|Figure 3) PICO detecting doors, top images showing how pico detects doors/dead ends in front. The middle images show PICO detecting a door/dead ends on the right side. Bottom images showing PICO detecting incoming doors/dead ends]]<br />
<br />
If PICO has detected a dead end/door and it is positioned in the door area, PICO will immediately stop and send the door request. After this, PICO will stand still for six seconds to wait if the doors opens. After this waiting time, PICO will look for one more second whether it is still in the door area. If PICO is still in the door area, this means that nothing has changed and the door has not opened. It will qualify these results as a regular dead end and turn around. If PICO is no longer in the door area, PICO concludes that the door has opened and PICO will continue on its path. Since this path was directed at the door, PICO will go through the door and continue the search for the exit of the maze.</div>
S108032
https://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Scan&diff=20414
Embedded Motion Control 2015 Group 3/Scan
2015-06-26T11:01:37Z
<p>S108032: /* Scan */</p>
<hr />
<div>= Scan = <br />
<br />
This page is part of the [[Embedded_Motion_Control_2015_Group_3|EMC03 CST-wiki]].<br />
<br />
In order to solve the maze, the robot needs to be able to drive autonomously. One type of data that is available is the laser range finder data. The PICO robot has a 270 degrees view, with approximately thousand beams. <br />
<br />
=== Potential field ===<br />
<br />
By splitting up the received laser data from the LRF in x and y, and summing them up results in a large vector containing the appropiate angle for PICO to follow. In other words, PICO moves always to the point with the most room. Note, the actual magnitude of this resultant vector is of no importance, since the Drive block has is own conditions for velocity.<br />
<br />
In straight corridors potential field will let PICO drive in the middle in a robust manner. In the case that PICO approaches a T-junction or intersection a decision must be made by the decision maker<br />
<br />
Since, there are more than one options at intersections. There has to be an extra element to send the robot in the appropriate direction. This is done, by blocking the other directions with virtual walls. In principle an extra layer has been added with the modified laser range finder data that PICO sees. From there on the potential field will do its work and PICO will drive in its desired direction.<br />
<br />
The potential field function will perceive this virtual walls as real walls. Therefore, PICO will avoid these 'walls' and drive into the desired corridor. The 'decision maker' in combination with the 'mapping algorithm' will decide were to place the virtual walls.<br />
<br />
=== Collision avoidance ===<br />
<br />
The first level of saftey is provided by the potential field algoritm. Its resultant vector will always point towards the direction with the most room and therefore it is sufficient as first layer. However, avoidance collision is one of the top priorities since if Pico bumps into the wall the attempt of solving the maze is over. Another safety layer has been implemented to prevent the robot hitting walls or corners. The distance to the wals is continuosly measured and compared to a set safety margin. If the distance of multiple coextensive beams is smaller than this fixed parameter the robot will move in the opposite direction.<br />
<br />
=== Detection intersections ===<br />
<br />
At this stage the basic skill of driving with the potential field based on LRF data is complete. Next, the different type of junctions and intersections must be recognized in order to solve the maze. Not only is recognition necassary for driving through the maze, it is also a important part of mapping the maze, see [[Embedded_Motion_Control_2015_Group_3/Mapping| Mapping]].<br />
<br />
Since the maze is axis alligned there are three possibilites:<br />
<br />
# Crossroad<br />
# T-junction<br />
# Open space<br />
<br />
The first two cases are detected by taking n+10 and n-10 and looking if they differ more than 30 centimer, in that case there is a corridor. By using this simple but very effective method left and right corridors can be distinguished. Next, detecting if there is a corridor in front. This is done by adding up multiple beams in the front and diving them by the number of beams. If this differs more than a set value with the middle one, there is a corridor. <br />
<br />
===== Open space =====<br />
<br />
When 80% of the LRF data is larger than 1 meter PICO knows it is in a open space and therefore it starts wall hugging in order to find the exit. Pico will stop this procedure if the corridor is equal or smaller than 1.5 meter, which is the maximum size of a corridor.<br />
<br />
[[File:open_space.gif|200px|frame|left|Pico handling open space]]<br />
[[File:collision.gif|200px|frame|center|Pico using collision avoidance]]<br />
<br />
<br />
=== Constructing virtual walls ===<br />
<br />
Constructing virtual walls is an essential part of driving PICO around the maze. First individual virtual walls were constructed therefore blocking potential corridors, which lead PICO into the desired direction. At a later stage this idea was slightly modified by computing a wall on a radius; therefore, PICO will move more smoothly through a corner.<br />
<br />
<br />
===== Crossroad ===== <br />
Consider an crossroad shown in the picture below, the left plot shows what pico sees when approaching this kind of junction. There are three maxima, which represent the possible directions PICO can go to. By slightly modifying the data the actual vision as seen in the simulator can be constructed, shown in (b). In Figure 1 two minima are shown that represent the far corners between the three maxima. These provide pico with reference points from where the virtual walls are constructed. Dependent on the direction of the desired turn the corner is used as a reference point for computing the radius where the virtual walls are set.<br />
<br />
{| align = "center"<br />
|[[File:crossroad.png|400px|Figure 1) The LRF data from PICO, (a) showing the data pico retrieves in this case 3 maxima and 2 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_crossroad.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
===== T-junction =====<br />
<br />
Now a T-junction is further examined, Figure 2 (a) shows what pico sees in this case. The figure shows two maxima with in between a minima. These two maxima are used as bounds for finding the minima. When the robot turn it is hard to keep a reference point and therefore this is a good method of finding the reference point, which is a minima in this case, to construct the virtual walls.<br />
<br />
{| align = "center"<br />
|[[File:T-junction.png|400px|Figure 2) The LRF data from PICO, (a) showing the data pico retrieves in this case 2 maxima and 1 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_Tjunction.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
In the case of a T-junction the situation is slightly different, in this case using the above method the minima will not represent a corner. However locating this minima is usefull, dependent on the kind of turn, 100+n[minimum] or 100-n[minimum], a radius is computed which will represent the virtual wall.<br />
<br />
=== Door Detection ===<br />
<br />
Since a door is basicly a dead end which can be opened, PICO should search for dead ends. These have a spefic profile were always three walls are visible and connected. And since the maxe is axis aligned, two of these walls will be parallel and one, of them, the one in between perpendicular on top of the others. These dead ends can be found at the end of a corridor and in junctions longer than 0.3 meters. This means PICO has to detect dead ends/doors in front, and at the side during turns. Therefore PICO will search in three regions in its LRF-data for doors. PICO will look left, in front and right to minimize detecting faulty doors and to be able to easily tell where the door is. All regions use the same methods for detecting doors, this method is based on the profile of a dead end, and PICO tries to recognize dead ends by searching its LRF-data with some conditions. . PICO will search for the two corner points where the walls meet. In between these corner points, the dead end/door can be detected. <br />
PICO will first start by searching the left corner point within a certain range. If this point can be found, pico will search for the wall or door which should be right of this point. This will be the closest point to PICO slightly right of this corner point. If this point can be found, PICO will search for the last point which is the right corner point. See figure 3, the points which PICO must detect are highlighted by a red cross. Notice that PICO will only look for the next point if the last one is found. <br />
<br />
To prevent PICO from detecting faulty doors, two extra conditions to qualify as a door/dead end are added. When the point are found, the distance to these points and the angles are knows. This makes it possible to determine whether all points are aligned. This is done by calculating the distance of all points according to figure 3 as "distance to pico". All three lenghts should be approximately equal. <br />
The second condition is the length of the door which has to be within the bound given in the assignment thus: 0.5 > door length < 1.5. If all condition are met, this area will qualify as a daed end/door and, if the distance to PICO is small enough, PICO has reached the door area.<br />
During experiments we noticed that faulty doors could still be detected by placing the walls a little askew or due to measurement noise. Therefore the last fix was introduced. PICO has to detect dead ends/doors ten times in a row before it actualy quaslifies as a real dead end/dead. This is to eliminate measurement noise/faults. <br />
<br />
[[File:wiki_doors.png|400px|thumb|center|Figure 3) PICO detecting doors, top images showing how pico detects doors/dead ends in front. The middle images show PICO detecting a door/dead ends on the right side. Bottom images showing PICO detecting incoming doors/dead ends]]<br />
<br />
If PICO has detected a dead end/door and its positioned in the door area, PICO will immediately stop and send the door request. After this PICO will stand still for six second to wait if the doors opens. After this waiting time, PICO will look for one second whether it is still in the door area. If PICO is still in the door area this means that nothing has changed and the door has not opened. It will qualify this as a regular dead end and turn around. If PICO is not in the door area anymore, this means that the door has opened and PICO will continue its path. Since this path was directed at the door, PICO will go thru the door and search for the exit of the maze.</div>
S108032
https://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Scan&diff=20405
Embedded Motion Control 2015 Group 3/Scan
2015-06-26T10:55:32Z
<p>S108032: /* Scan */</p>
<hr />
<div>= Scan = <br />
[[File:collision.gif|200px|frame|right|Pico using collision avoidance]]<br />
This page is part of the [[Embedded_Motion_Control_2015_Group_3|EMC03 CST-wiki]].<br />
<br />
In order to solve the maze, the robot needs to be able to drive autonomously. One type of data that is available is the laser range finder data. The PICO robot has a 270 degrees view, with approximately thousand beams. <br />
<br />
=== Potential field ===<br />
<br />
By splitting up the received laser data from the LRF in x and y, and summing them up results in a large vector containing the appropiate angle for PICO to follow. In other words, PICO moves always to the point with the most room. Note, the actual magnitude of this resultant vector is of no importance, since the Drive block has is own conditions for velocity.<br />
<br />
In straight corridors potential field will let PICO drive in the middle in a robust manner. In the case that PICO approaches a T-junction or intersection a decision must be made by the decision maker<br />
<br />
Since, there are more than one options at intersections. There has to be an extra element to send the robot in the appropriate direction. This is done, by blocking the other directions with virtual walls. In principle an extra layer has been added with the modified laser range finder data that PICO sees. From there on the potential field will do its work and PICO will drive in its desired direction.<br />
<br />
The potential field function will perceive this virtual walls as real walls. Therefore, PICO will avoid these 'walls' and drive into the desired corridor. The 'decision maker' in combination with the 'mapping algorithm' will decide were to place the virtual walls.<br />
<br />
=== Collision avoidance ===<br />
[[File:open_space.gif|200px|frame|right|Figure 2) Pico handling open space]]<br />
The first level of saftey is provided by the potential field algoritm. Its resultant vector will always point towards the direction with the most room and therefore it is sufficient as first layer. However, avoidance collision is one of the top priorities since if Pico bumps into the wall the attempt of solving the maze is over. Another safety layer has been implemented to prevent the robot hitting walls or corners. The distance to the wals is continuosly measured and compared to a set safety margin. If the distance of multiple coextensive beams is smaller than this fixed parameter the robot will move in the opposite direction.<br />
<br />
=== Detection intersections ===<br />
<br />
At this stage the basic skill of driving with the potential field based on LRF data is complete. Next, the different type of junctions and intersections must be recognized in order to solve the maze. Not only is recognition necassary for driving through the maze, it is also a important part of mapping the maze, see [[Embedded_Motion_Control_2015_Group_3/Mapping| Mapping]].<br />
<br />
Since the maze is axis alligned there are three possibilites:<br />
<br />
# Crossroad<br />
# T-junction<br />
# Open space<br />
<br />
The first two cases are detected by taking n+10 and n-10 and looking if they differ more than 30 centimer, in that case there is a corridor. By using this simple but very effective method left and right corridors can be distinguished. Next, detecting if there is a corridor in front. This is done by adding up multiple beams in the front and diving them by the number of beams. If this differs more than a set value with the middle one, there is a corridor. <br />
<br />
===== Open space =====<br />
<br />
<br />
When 80% of the LRF data is larger than 1 meter PICO knows it is in a open space and therefore it starts wall hugging in order to find the exit. Pico will stop this procedure if the corridor is equal or smaller than 1.5 meter, which is the maximum size of a corridor.<br />
<br />
=== Constructing virtual walls ===<br />
<br />
Constructing virtual walls is an essential part of driving PICO around the maze. First individual virtual walls were constructed therefore blocking potential corridors, which lead PICO into the desired direction. At a later stage this idea was slightly modified by computing a wall on a radius; therefore, PICO will move more smoothly through a corner.<br />
<br />
<br />
===== Crossroad ===== <br />
Consider an crossroad shown in the picture below, the left plot shows what pico sees when approaching this kind of junction. There are three maxima, which represent the possible directions PICO can go to. By slightly modifying the data the actual vision as seen in the simulator can be constructed, shown in (b). In Figure 1 two minima are shown that represent the far corners between the three maxima. These provide pico with reference points from where the virtual walls are constructed. Dependent on the direction of the desired turn the corner is used as a reference point for computing the radius where the virtual walls are set.<br />
<br />
{| align = "center"<br />
|[[File:crossroad.png|400px|Figure 1) The LRF data from PICO, (a) showing the data pico retrieves in this case 3 maxima and 2 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_crossroad.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
===== T-junction =====<br />
<br />
Now a T-junction is further examined, Figure 2 (a) shows what pico sees in this case. The figure shows two maxima with in between a minima. These two maxima are used as bounds for finding the minima. When the robot turn it is hard to keep a reference point and therefore this is a good method of finding the reference point, which is a minima in this case, to construct the virtual walls.<br />
<br />
{| align = "center"<br />
|[[File:T-junction.png|400px|Figure 2) The LRF data from PICO, (a) showing the data pico retrieves in this case 2 maxima and 1 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_Tjunction.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
In the case of a T-junction the situation is slightly different, in this case using the above method the minima will not represent a corner. However locating this minima is usefull, dependent on the kind of turn, 100+n[minimum] or 100-n[minimum], a radius is computed which will represent the virtual wall.<br />
<br />
=== Door Detection ===<br />
<br />
Since a door is basicly a dead end which can be opened, PICO should search for dead ends. These have a spefic profile were always three walls are visible and connected. And since the maxe is axis aligned, two of these walls will be parallel and one, of them, the one in between perpendicular on top of the others. These dead ends can be found at the end of a corridor and in junctions longer than 0.3 meters. This means PICO has to detect dead ends/doors in front, and at the side during turns. Therefore PICO will search in three regions in its LRF-data for doors. PICO will look left, in front and right to minimize detecting faulty doors and to be able to easily tell where the door is. All regions use the same methods for detecting doors, this method is based on the profile of a dead end, and PICO tries to recognize dead ends by searching its LRF-data with some conditions. . PICO will search for the two corner points where the walls meet. In between these corner points, the dead end/door can be detected. <br />
PICO will first start by searching the left corner point within a certain range. If this point can be found, pico will search for the wall or door which should be right of this point. This will be the closest point to PICO slightly right of this corner point. If this point can be found, PICO will search for the last point which is the right corner point. See figure 3, the points which PICO must detect are highlighted by a red cross. Notice that PICO will only look for the next point if the last one is found. <br />
<br />
To prevent PICO from detecting faulty doors, two extra conditions to qualify as a door/dead end are added. When the point are found, the distance to these points and the angles are knows. This makes it possible to determine whether all points are aligned. This is done by calculating the distance of all points according to figure 3 as "distance to pico". All three lenghts should be approximately equal. <br />
The second condition is the length of the door which has to be within the bound given in the assignment thus: 0.5 > door length < 1.5. If all condition are met, this area will qualify as a daed end/door and, if the distance to PICO is small enough, PICO has reached the door area.<br />
During experiments we noticed that faulty doors could still be detected by placing the walls a little askew or due to measurement noise. Therefore the last fix was introduced. PICO has to detect dead ends/doors ten times in a row before it actualy quaslifies as a real dead end/dead. This is to eliminate measurement noise/faults. <br />
<br />
[[File:wiki_doors.png|400px|thumb|center|Figure 3) PICO detecting doors, top images showing how pico detects doors/dead ends in front. The middle images show PICO detecting a door/dead ends on the right side. Bottom images showing PICO detecting incoming doors/dead ends]]<br />
<br />
If PICO has detected a dead end/door and its positioned in the door area, PICO will immediately stop and send the door request. After this PICO will stand still for six second to wait if the doors opens. After this waiting time, PICO will look for one second whether it is still in the door area. If PICO is still in the door area this means that nothing has changed and the door has not opened. It will qualify this as a regular dead end and turn around. If PICO is not in the door area anymore, this means that the door has opened and PICO will continue its path. Since this path was directed at the door, PICO will go thru the door and search for the exit of the maze.</div>
S108032
https://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Scan&diff=20399
Embedded Motion Control 2015 Group 3/Scan
2015-06-26T10:52:45Z
<p>S108032: /* Collision avoidance */</p>
<hr />
<div>= Scan = <br />
This page is part of the [[Embedded_Motion_Control_2015_Group_3|EMC03 CST-wiki]].<br />
<br />
In order to solve the maze, the robot needs to be able to drive autonomously. One type of data that is available is the laser range finder data. The PICO robot has a 270 degrees view, with approximately thousand beams. <br />
<br />
=== Potential field ===<br />
<br />
By splitting up the received laser data from the LRF in x and y, and summing them up results in a large vector containing the appropiate angle for PICO to follow. In other words, PICO moves always to the point with the most room. Note, the actual magnitude of this resultant vector is of no importance, since the Drive block has is own conditions for velocity.<br />
<br />
In straight corridors potential field will let PICO drive in the middle in a robust manner. In the case that PICO approaches a T-junction or intersection a decision must be made by the decision maker<br />
<br />
Since, there are more than one options at intersections. There has to be an extra element to send the robot in the appropriate direction. This is done, by blocking the other directions with virtual walls. In principle an extra layer has been added with the modified laser range finder data that PICO sees. From there on the potential field will do its work and PICO will drive in its desired direction.<br />
<br />
The potential field function will perceive this virtual walls as real walls. Therefore, PICO will avoid these 'walls' and drive into the desired corridor. The 'decision maker' in combination with the 'mapping algorithm' will decide were to place the virtual walls.<br />
<br />
=== Collision avoidance ===<br />
[[File:collision.gif|200px|frame|right|Pico using collision avoidance]]<br />
The first level of saftey is provided by the potential field algoritm. Its resultant vector will always point towards the direction with the most room and therefore it is sufficient as first layer. However, avoidance collision is one of the top priorities since if Pico bumps into the wall the attempt of solving the maze is over. Another safety layer has been implemented to prevent the robot hitting walls or corners. The distance to the wals is continuosly measured and compared to a set safety margin. If the distance of multiple coextensive beams is smaller than this fixed parameter the robot will move in the opposite direction.<br />
<br />
=== Detection intersections ===<br />
<br />
At this stage the basic skill of driving with the potential field based on LRF data is complete. Next, the different type of junctions and intersections must be recognized in order to solve the maze. Not only is recognition necassary for driving through the maze, it is also a important part of mapping the maze, see [[Embedded_Motion_Control_2015_Group_3/Mapping| Mapping]].<br />
<br />
Since the maze is axis alligned there are three possibilites:<br />
<br />
# Crossroad<br />
# T-junction<br />
# Open space<br />
<br />
The first two cases are detected by taking n+10 and n-10 and looking if they differ more than 30 centimer, in that case there is a corridor. By using this simple but very effective method left and right corridors can be distinguished. Next, detecting if there is a corridor in front. This is done by adding up multiple beams in the front and diving them by the number of beams. If this differs more than a set value with the middle one, there is a corridor. <br />
<br />
===== Open space =====<br />
<br />
[[File:open_space.gif|200px|thumb|right|Figure 2) Pico handling open space]]<br />
When 80% of the LRF data is larger than 1 meter PICO knows it is in a open space and therefore it starts wall hugging in order to find the exit. Pico will stop this procedure if the corridor is equal or smaller than 1.5 meter, which is the maximum size of a corridor.<br />
<br />
=== Constructing virtual walls ===<br />
<br />
Constructing virtual walls is an essential part of driving PICO around the maze. First individual virtual walls were constructed therefore blocking potential corridors, which lead PICO into the desired direction. At a later stage this idea was slightly modified by computing a wall on a radius; therefore, PICO will move more smoothly through a corner.<br />
<br />
<br />
===== Crossroad ===== <br />
Consider an crossroad shown in the picture below, the left plot shows what pico sees when approaching this kind of junction. There are three maxima, which represent the possible directions PICO can go to. By slightly modifying the data the actual vision as seen in the simulator can be constructed, shown in (b). In Figure 1 two minima are shown that represent the far corners between the three maxima. These provide pico with reference points from where the virtual walls are constructed. Dependent on the direction of the desired turn the corner is used as a reference point for computing the radius where the virtual walls are set.<br />
<br />
{| align = "center"<br />
|[[File:crossroad.png|400px|Figure 1) The LRF data from PICO, (a) showing the data pico retrieves in this case 3 maxima and 2 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_crossroad.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
===== T-junction =====<br />
<br />
Now a T-junction is further examined, Figure 2 (a) shows what pico sees in this case. The figure shows two maxima with in between a minima. These two maxima are used as bounds for finding the minima. When the robot turn it is hard to keep a reference point and therefore this is a good method of finding the reference point, which is a minima in this case, to construct the virtual walls.<br />
<br />
{| align = "center"<br />
|[[File:T-junction.png|400px|Figure 2) The LRF data from PICO, (a) showing the data pico retrieves in this case 2 maxima and 1 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_Tjunction.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
In the case of a T-junction the situation is slightly different, in this case using the above method the minima will not represent a corner. However locating this minima is usefull, dependent on the kind of turn, 100+n[minimum] or 100-n[minimum], a radius is computed which will represent the virtual wall.<br />
<br />
=== Door Detection ===<br />
<br />
Since a door is basicly a dead end which can be opened, PICO should search for dead ends. These have a spefic profile were always three walls are visible and connected. And since the maxe is axis aligned, two of these walls will be parallel and one, of them, the one in between perpendicular on top of the others. These dead ends can be found at the end of a corridor and in junctions longer than 0.3 meters. This means PICO has to detect dead ends/doors in front, and at the side during turns. Therefore PICO will search in three regions in its LRF-data for doors. PICO will look left, in front and right to minimize detecting faulty doors and to be able to easily tell where the door is. All regions use the same methods for detecting doors, this method is based on the profile of a dead end, and PICO tries to recognize dead ends by searching its LRF-data with some conditions. . PICO will search for the two corner points where the walls meet. In between these corner points, the dead end/door can be detected. <br />
PICO will first start by searching the left corner point within a certain range. If this point can be found, pico will search for the wall or door which should be right of this point. This will be the closest point to PICO slightly right of this corner point. If this point can be found, PICO will search for the last point which is the right corner point. See figure 3, the points which PICO must detect are highlighted by a red cross. Notice that PICO will only look for the next point if the last one is found. <br />
<br />
To prevent PICO from detecting faulty doors, two extra conditions to qualify as a door/dead end are added. When the point are found, the distance to these points and the angles are knows. This makes it possible to determine whether all points are aligned. This is done by calculating the distance of all points according to figure 3 as "distance to pico". All three lenghts should be approximately equal. <br />
The second condition is the length of the door which has to be within the bound given in the assignment thus: 0.5 > door length < 1.5. If all condition are met, this area will qualify as a daed end/door and, if the distance to PICO is small enough, PICO has reached the door area.<br />
During experiments we noticed that faulty doors could still be detected by placing the walls a little askew or due to measurement noise. Therefore the last fix was introduced. PICO has to detect dead ends/doors ten times in a row before it actualy quaslifies as a real dead end/dead. This is to eliminate measurement noise/faults. <br />
<br />
[[File:wiki_doors.png|400px|thumb|center|Figure 3) PICO detecting doors, top images showing how pico detects doors/dead ends in front. The middle images show PICO detecting a door/dead ends on the right side. Bottom images showing PICO detecting incoming doors/dead ends]]<br />
<br />
If PICO has detected a dead end/door and its positioned in the door area, PICO will immediately stop and send the door request. After this PICO will stand still for six second to wait if the doors opens. After this waiting time, PICO will look for one second whether it is still in the door area. If PICO is still in the door area this means that nothing has changed and the door has not opened. It will qualify this as a regular dead end and turn around. If PICO is not in the door area anymore, this means that the door has opened and PICO will continue its path. Since this path was directed at the door, PICO will go thru the door and search for the exit of the maze.</div>
S108032
https://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Scan&diff=20381
Embedded Motion Control 2015 Group 3/Scan
2015-06-26T10:45:35Z
<p>S108032: /* Open space */</p>
<hr />
<div>= Scan = <br />
This page is part of the [[Embedded_Motion_Control_2015_Group_3|EMC03 CST-wiki]].<br />
<br />
In order to solve the maze, the robot needs to be able to drive autonomously. One type of data that is available is the laser range finder data. The PICO robot has a 270 degrees view, with approximately thousand beams. <br />
<br />
=== Potential field ===<br />
<br />
By splitting up the received laser data from the LRF in x and y, and summing them up results in a large vector containing the appropiate angle for PICO to follow. In other words, PICO moves always to the point with the most room. Note, the actual magnitude of this resultant vector is of no importance, since the Drive block has is own conditions for velocity.<br />
<br />
In straight corridors potential field will let PICO drive in the middle in a robust manner. In the case that PICO approaches a T-junction or intersection a decision must be made by the decision maker<br />
<br />
Since, there are more than one options at intersections. There has to be an extra element to send the robot in the appropriate direction. This is done, by blocking the other directions with virtual walls. In principle an extra layer has been added with the modified laser range finder data that PICO sees. From there on the potential field will do its work and PICO will drive in its desired direction.<br />
<br />
The potential field function will perceive this virtual walls as real walls. Therefore, PICO will avoid these 'walls' and drive into the desired corridor. The 'decision maker' in combination with the 'mapping algorithm' will decide were to place the virtual walls.<br />
<br />
=== Collision avoidance ===<br />
[[File:collision.gif|200px|thumb|right|Figure 1) Pico using collision avoidance]]<br />
The first level of saftey is provided by the potential field algoritm. Its resultant vector will always point towards the direction with the most room and therefore it is sufficient as first layer. However, avoidance collision is one of the top priorities since if Pico bumps into the wall the attempt of solving the maze is over. Another safety layer has been implemented to prevent the robot hitting walls or corners. The distance to the wals is continuosly measured and compared to a set safety margin. If the distance of multiple coextensive beams is smaller than this fixed parameter the robot will move in the opposite direction.<br />
<br />
=== Detection intersections ===<br />
<br />
At this stage the basic skill of driving with the potential field based on LRF data is complete. Next, the different type of junctions and intersections must be recognized in order to solve the maze. Not only is recognition necassary for driving through the maze, it is also a important part of mapping the maze, see [[Embedded_Motion_Control_2015_Group_3/Mapping| Mapping]].<br />
<br />
Since the maze is axis alligned there are three possibilites:<br />
<br />
# Crossroad<br />
# T-junction<br />
# Open space<br />
<br />
The first two cases are detected by taking n+10 and n-10 and looking if they differ more than 30 centimer, in that case there is a corridor. By using this simple but very effective method left and right corridors can be distinguished. Next, detecting if there is a corridor in front. This is done by adding up multiple beams in the front and diving them by the number of beams. If this differs more than a set value with the middle one, there is a corridor. <br />
<br />
===== Open space =====<br />
<br />
[[File:open_space.gif|200px|thumb|right|Figure 2) Pico handling open space]]<br />
When 80% of the LRF data is larger than 1 meter PICO knows it is in a open space and therefore it starts wall hugging in order to find the exit. Pico will stop this procedure if the corridor is equal or smaller than 1.5 meter, which is the maximum size of a corridor.<br />
<br />
=== Constructing virtual walls ===<br />
<br />
Constructing virtual walls is an essential part of driving PICO around the maze. First individual virtual walls were constructed therefore blocking potential corridors, which lead PICO into the desired direction. At a later stage this idea was slightly modified by computing a wall on a radius; therefore, PICO will move more smoothly through a corner.<br />
<br />
<br />
===== Crossroad ===== <br />
Consider an crossroad shown in the picture below, the left plot shows what pico sees when approaching this kind of junction. There are three maxima, which represent the possible directions PICO can go to. By slightly modifying the data the actual vision as seen in the simulator can be constructed, shown in (b). In Figure 1 two minima are shown that represent the far corners between the three maxima. These provide pico with reference points from where the virtual walls are constructed. Dependent on the direction of the desired turn the corner is used as a reference point for computing the radius where the virtual walls are set.<br />
<br />
{| align = "center"<br />
|[[File:crossroad.png|400px|Figure 1) The LRF data from PICO, (a) showing the data pico retrieves in this case 3 maxima and 2 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_crossroad.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
===== T-junction =====<br />
<br />
Now a T-junction is further examined, Figure 2 (a) shows what pico sees in this case. The figure shows two maxima with in between a minima. These two maxima are used as bounds for finding the minima. When the robot turn it is hard to keep a reference point and therefore this is a good method of finding the reference point, which is a minima in this case, to construct the virtual walls.<br />
<br />
{| align = "center"<br />
|[[File:T-junction.png|400px|Figure 2) The LRF data from PICO, (a) showing the data pico retrieves in this case 2 maxima and 1 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_Tjunction.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
In the case of a T-junction the situation is slightly different, in this case using the above method the minima will not represent a corner. However locating this minima is usefull, dependent on the kind of turn, 100+n[minimum] or 100-n[minimum], a radius is computed which will represent the virtual wall.<br />
<br />
=== Door Detection ===<br />
<br />
Since a door is basicly a dead end which can be opened, PICO should search for dead ends. These have a spefic profile were always three walls are visible and connected. And since the maxe is axis aligned, two of these walls will be parallel and one, of them, the one in between perpendicular on top of the others. These dead ends can be found at the end of a corridor and in junctions longer than 0.3 meters. This means PICO has to detect dead ends/doors in front, and at the side during turns. Therefore PICO will search in three regions in its LRF-data for doors. PICO will look left, in front and right to minimize detecting faulty doors and to be able to easily tell where the door is. All regions use the same methods for detecting doors, this method is based on the profile of a dead end, and PICO tries to recognize dead ends by searching its LRF-data with some conditions. . PICO will search for the two corner points where the walls meet. In between these corner points, the dead end/door can be detected. <br />
PICO will first start by searching the left corner point within a certain range. If this point can be found, pico will search for the wall or door which should be right of this point. This will be the closest point to PICO slightly right of this corner point. If this point can be found, PICO will search for the last point which is the right corner point. See figure 3, the points which PICO must detect are highlighted by a red cross. Notice that PICO will only look for the next point if the last one is found. <br />
<br />
To prevent PICO from detecting faulty doors, two extra conditions to qualify as a door/dead end are added. When the point are found, the distance to these points and the angles are knows. This makes it possible to determine whether all points are aligned. This is done by calculating the distance of all points according to figure 3 as "distance to pico". All three lenghts should be approximately equal. <br />
The second condition is the length of the door which has to be within the bound given in the assignment thus: 0.5 > door length < 1.5. If all condition are met, this area will qualify as a daed end/door and, if the distance to PICO is small enough, PICO has reached the door area.<br />
During experiments we noticed that faulty doors could still be detected by placing the walls a little askew or due to measurement noise. Therefore the last fix was introduced. PICO has to detect dead ends/doors ten times in a row before it actualy quaslifies as a real dead end/dead. This is to eliminate measurement noise/faults. <br />
<br />
[[File:wiki_doors.png|400px|thumb|center|Figure 3) PICO detecting doors, top images showing how pico detects doors/dead ends in front. The middle images show PICO detecting a door/dead ends on the right side. Bottom images showing PICO detecting incoming doors/dead ends]]<br />
<br />
If PICO has detected a dead end/door and its positioned in the door area, PICO will immediately stop and send the door request. After this PICO will stand still for six second to wait if the doors opens. After this waiting time, PICO will look for one second whether it is still in the door area. If PICO is still in the door area this means that nothing has changed and the door has not opened. It will qualify this as a regular dead end and turn around. If PICO is not in the door area anymore, this means that the door has opened and PICO will continue its path. Since this path was directed at the door, PICO will go thru the door and search for the exit of the maze.</div>
S108032
https://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3&diff=20366
Embedded Motion Control 2015 Group 3
2015-06-26T10:36:16Z
<p>S108032: /* Scan block */</p>
<hr />
<div>This is the Wiki-page for EMC-group 3, part of the [[Embedded_Motion_Control_2015|Embedded Motion Control 2015 course]].<br />
<br />
= Checklist Wiki contents =<br />
This table shows some checkpoints that still have to be done. The first part are derived from the email from Sjoerd. At the end some general points are added. Feel free to update this table. You can also add extra checkpoints.<br />
<br />
{| border="1" class="wikitable"<br />
|-<br />
! <br />
!<br />
!<math>{{Check}}</math><br />
!Remarks<br />
|- <br />
|1.1<br />
|Overview software architecture and approach<br />
|X<br />
|Should be check for (minor) errors<br />
|-<br />
|1.2<br />
|How does it map to the paradigms explained in this course?<br />
|<br />
|Still has to be implemented more clearly, I think<br />
|-<br />
|2.1<br />
|Description why our solution is awesome (nice images)<br />
|<br />
|Don't know, could be more specific<br />
|- <br />
|2.2<br />
|Why unique/ what are we proud of?<br />
|<br />
|Don't know, could be more specific<br />
|- <br />
|3.1<br />
|What difficult problems and how solved?<br />
|<br />
|<br />
|-<br />
|4.1<br />
|Evaluation maze challenge (well/wrong/why/improvements?)<br />
|X<br />
|Finished I think<br />
|-<br />
|5.1<br />
|videos / gifs / animations / diagrams / pictures<br />
|X<br />
|Adding a animation would be nice<br />
|- <br />
|6.1<br />
|Link to interesting pieces of the code (use snippet system like https://gist.github.com)<br />
|X<br />
|Add code on scan subpage if necessary<br />
|-<br />
|6.2 <br />
| Comment the code and add introduction/explanatory<br />
| <br />
|Finished?<br />
|- <br />
|7<br />
|Cohesion between main-page and subpages, especially in section 'Software implementation'<br />
|<br />
|<br />
|-<br />
|8<br />
|Check if we did not forget to describe an essential step<br />
|<br />
|<br />
|-<br />
|9<br />
|Check every part for (small) mistakes/errors<br />
|<br />
|<br />
|}<br />
<br />
= Group members = <br />
{| border="1" class="wikitable"<br />
|-<br />
! Name <br />
! Student number<br />
! Email<br />
|-<br />
| Max van Lith<br />
| 0767328<br />
| m.m.g.v.lith@student.tue.nl<br />
|-<br />
| Shengling Shi<br />
| 0925030<br />
| s.shi@student.tue.nl<br />
|- <br />
| Michèl Lammers<br />
| 0824359<br />
| m.r.lammers@student.tue.nl<br />
|-<br />
| Jasper Verhoeven<br />
| 0780966<br />
| j.w.h.verhoeven@student.tue.nl<br />
|- <br />
| Ricardo Shousha<br />
| 0772504<br />
| r.shousha@student.tue.nl<br />
|-<br />
| Sjors Kamps<br />
| 0793442<br />
| j.w.m.kamps@student.tue.nl<br />
|- <br />
| Stephan van Nispen<br />
| 0764290<br />
| s.h.m.v.nispen@student.tue.nl<br />
|-<br />
| Luuk Zwaans<br />
| 0743596<br />
| l.w.a.zwaans@student.tue.nl<br />
|-<br />
| Sander Hermanussen<br />
| 0774293<br />
| s.j.hermanussen@student.tue.nl<br />
|-<br />
| Bart van Dongen<br />
| 0777752<br />
| b.c.h.v.dongen@student.tue.nl<br />
|}<br />
<br />
= General information = <br />
This course is about software designs and how to apply this in the context of autonomous robots. The accompanying assignment is about applying this knowledge to a real-life robotics task.<br />
<br />
The goal of this course is to acquire knowledge and insight about the design and implementation of embedded motion systems. Furthermore, the purpose is to develop insight in the possibilities and limitations in relation with the embedded environment (actuators, sensors, processors, RTOS). To make this operational and to practically implement an embedded control system for an autonomous robot, there is the Maze Challenge. In which the robot has to find its way out in a maze.<br />
<br />
PICO is the name of the robot that will be used. In this case, PICO has two types of useful inputs:<br />
# The laser data from the laser range finder<br />
# The odometry data from the wheels<br />
<br />
In the fourth week there is the "Corridor Competition". During this challenge, students have to let the robot drive through a corridor and then take the first exit (whether left or right).<br />
<br />
At the end of the project, the "A-maze-ing challenge" has to be solved. The goal of this competition is to let PICO autonomously drive through a maze and find the exit. Group 3 was the only group capable of solving the maze.<br />
<br />
= Design =<br />
In this section the general design of the project is discussed.<br />
<br />
=== Requirements ===<br />
The final goal of the project is to solve a random maze, fully autonomously. Based on the description of the maze challenge, several requirements can be set:<br />
* Move and reach the exit of the maze.<br />
** As fast as possible<br />
** Enter a door<br />
** Do not get stuck in a loop<br />
* The robot should avoid bumping into the walls. <br />
* Therefore, it should perceive its surroundings.<br />
* The robot has to solve the maze in a 'smart' way.<br />
<br />
=== Functions & Communication ===<br />
<br />
[[File:behaviour_diagram.png|250px|thumb|right|Blockdiagram for connection between the contexts]] The robot will know a number of basic functions. These functions can be divided into two categories: tasks and skills. <br />
<br />
The task are the most high level proceedings the robot should be able to do. These are:<br />
*Determine situation<br />
*Decision making<br />
*Skill selection<br />
<br />
The skills are specific actions that accomplish a certain goal. The list of skills is as follows:<br />
*Handle intersections<br />
*Handle dead ends<br />
*Discover doors<br />
*Mapping environment<br />
*Make decisions based on the map<br />
*Detect the end of the maze<br />
<br />
These skills need the following functions of the robot:<br />
*Drive<br />
*Rotate<br />
*Read out sensor data to scan environment<br />
<br />
=== Software architecture ===<br />
<br />
[[File:Overrall structure.jpg|250px|thumb|right|Overall structure]]To solve the problem, it is divided into different blocks with their own functions. We have chosen to make these five blocks: Scan, Drive, Localisation, Decision and Mapping. The figure on the right shows a simplified scheme of the software architecture and the cohesion of the individual blocks. In practice, Drive/Scan and Localisation/Mapping are closely linked. Now, a short clarification of the figure will be given. More detailed information of each block will be discussed in the next sections. <br />
<br />
Lets start with the Scan block:<br />
* Scan receives information about the environment. To do this it uses his laser range finder data.<br />
* Based on this data Scan consults its potential field algorithm to make a vector for Drive.<br />
* Drive interprets the vector and sends the robot in that direction.<br />
* Together the LRF and odometry data determine the traveled distance and direction. Localisation saves this in an orthogonal grid.<br />
* Mapping consults these positions to 'tell' Decision at what interesting point the robot is. For instance, this can be a junction or a dead end.<br />
* Then it should know if the robot has been there before. Based on that, Decision can send a new action to Scan/Drive. <br />
* Now the new vector is based on the environment data and the information from Decision. In this way, the robot should find a strategic way to drive through the maze.<br />
<br />
<br />
=== Calibration ===<br />
<p>[[File:Originaldata.png|250px|thumb|right|Calibration: Difference between odometry and LRF data]] In the lectures, the claim was made that 'the odometry data is not reliable'. We decided to quantify the errors in the robot's sensors in some way. The robot was programmed to drive back and forth in front of a wall. At every time instance, it would collect odometry data as well as laser data. The laser data point that was straight in front of the robot was compared to the odometry data, i.e. the driven distance is compared to the measured distance to the wall in front of the robot. The top figure on the right shows these results. The starting distance from the wall is substracted from the laser data signal. Then, the sign is flipped so that the laser data should match the odometry exactly, if the sensors would provide perfect data. Two things are now notable from this figure:<br />
*The laserdata and the odometry data do not return exactly the same values.<br />
*The odometry seems to produce no noise at all.<br />
<br />
[[File:StaticLRF.png|250px|thumb|right|alt=Static LRF|Calibration: Static LRF]]<br />
<br />
The noisy signal that was returned by the laser is presented in the bottom picture on the right. Here, a part of the laser data is picked from a robot that was not moving.<br />
* The maximum amplitude of the noise is roughly 12 mm.<br />
* The standard deviation of the noise is roughly 5.5 mm<br />
* The laser produces a noisy signal. Do not trust one measurement but take the average over time instead.<br />
* The odometry produces no notable noise at all, but it has a significant drift as the driven distance increases. Usage is recommended only for smaller distances (<1 m)</p><br />
<br><br><br><br><br><br><br><br><br><br><br><br />
<br />
= Software implementation =<br />
In this section, implementation of this software will be discussed based on the block division we made.<br />
<br />
Brief instruction about one block can be found here. In addition, there are also more detailed problem-solving processes and ideas which can be found in the sub-pages of each block.<br />
<br />
=== Drive block ===<br />
[[File:Drive.jpg|250px|thumb|right|Composition pattern of Drive]] Basically, the [[Embedded_Motion_Control_2015_Group_3/Drive|Drive block]] is the doer (not the thinker) of the complete system. The figure shows the composition pattern of Drive. In our case, the robot moves around using potential field. How the potential field works in detail is shown in [[Embedded_Motion_Control_2015_Group_3/Scan|Scan]]. Potential field is an easy way to drive through corridors, and making turns. Important is to note that information from the Decision maker can influence the tasks Drive has to do. <br />
<br />
Two other methods were also considered: [[Embedded_Motion_Control_2015_Group_3/Drive#Simple_method|Simple method]] and [[Embedded_Motion_Control_2015_Group_3/Drive#Path_planning_for_turning|Path planning]]. Especially, we worked a lot of time on the Path planning method. However, after testing, the potential field was the most robust and most convenient method.<br />
<br><br><br><br><br><br />
<br />
<br />
<br />
<br />
<br />
=== Scan block ===<br />
[[File:Scan_cp_new.jpg|250px|thumb|right|Composition pattern of Scan]][[Embedded_Motion_Control_2015_Group_3/Scan|The block Scan]] processes the laser data of the Laser Range Finders. This data is used to detect corridors, doors, and different kind of junctions. The data that is retrieved by 'scan' is used by all three other blocks. <br />
<br />
# Scan directly gives information to 'drive'. Drive uses this to avoid collisions.<br />
# The scan sends its data to 'decision' to determine an action at a junction for the 'drive' block.<br />
# Mapping also uses data from scan to map the maze.<br />
<br><br><br><br><br />
<br />
PICO moves always to the place with the most space using its potential field. However, at junctions and intersections the current potential field is incapable of leading PICO into the desired direction. Virtual walls are constructed to shield potential path ways, than PICO will move to its desired direction which is made by the decision maker. To create an extra layer of safety, collision avoidance has been added on top of the potential field. Also, the scan block is capable of detecting doors, which is a necassary part of solving the maze. More detailed information about the following properties is found in [[Embedded_Motion_Control_2015_Group_3/Scan|the block Scan]]:<br />
<br />
* Potential field<br />
* Detecting junctions/intersections<br />
* Virtual walls<br />
* Collision avoidance<br />
* Detecting doors<br />
<br />
=== Decision block ===<br />
[[File:Composition_Pattern_Decision.png|250px|thumb|right|Composition pattern of Decision]]The [[Embedded_Motion_Control_2015_Group_3/Decision|Decision block]] contains the algorithm for solving the maze. It can be seen as the 'brain' of the robot. It receives the data of the world from 'Scan'; then decides what to do (it can consult 'Mapping'); finally it sends commands to 'Drive'.<br />
<br />
<ins>Input:</ins><br />
* Mapping model<br />
* Scan data<br />
<br />
<ins>Output:</ins><br />
* Specific drive action command<br />
<br />
The used maze solving algorithm is called: Trémaux's algorithm. This algorithm requires drawing lines on the floor. Every time a direction is chosen it is marked bij drawing a line on the floor (from junction to junction). Choose every time the direction with the fewest marks. If two direction are visited as often, then choose random between these two. Finally, the exit of the maze will be reached.<br />
<br />
=== Mapping block ===<br />
[[File:Emc03 wayfindingCP1.png|250px|thumb|right|Mapping & solve algorithm]] [[Embedded_Motion_Control_2015_Group_3/Mapping|The mapping block]] will store the corridors and junctions of the maze. This way, the decision maker can make informed decisions at intersections, to ensure that the maze will be solved in a strategic way.<br />
<br />
To do this, the [http://www.cems.uvm.edu/~rsnapp/teaching/cs32/lectures/tremaux.pdf Tremaux algorithm] is used, which is an implementation of Depth First Search.<br />
<br />
The maze will consist of nodes and edges. A node is either a dead end, or any place in the maze where the robot can go in more than one direction (i.e., an intersection). An edge is the connection between one node and another, and as such is also called a corridor. An edge may also lead to the same node. In the latter case, this edge is a loop. The algorithm is called by the general decision maker whenever the robot encounters a node (junction or a dead end). The input of the algorithm is the possible routes the robot can go (left, straight ahead, right, turn around) and the output is a direction that the Mapping block considers the best option.<br />
<br />
In order to detect loops, the position of the robot must be known as well as the position of each node, to see when the robot has returned to the same location. This is decoupled from the Mapping block and done in the [[Embedded_Motion_Control_2015_Group_3/Localisation|Localisation block]]. Since the localization did not work in the end, a Random Walk implementation was also made in the Mapping block.<br />
<br />
<br />
<br />
<br />
<br />
<br />
=== Localisation block ===<br />
The purpose of the localisation is that the robot can prevent itself from driving in a loop for infinite time, by knowing where it is at a given moment in time. By knowing where it is, it can decide based on this information what to do next. As a result, the robot will be able to exit the maze within finite time, or it will tell there is no exit if it has searched everywhere without success.<br />
<br />
The localisation algorithm is explained in on the [[Embedded_Motion_Control_2015_Group_3/Localisation|Localisation page]]; by separating and discussing the important factors.<br />
<br />
= A-maze-ing Challenge =<br />
In the third week of this project we had to do the corridor challenge. During this challenge, we have to let the robot drive through a corridor and then take the first exit (whether left or right). This job can be tackled with two different approaches:<br />
# Make a script only based on the corridor challenge.<br />
# Make a script for the corridor challenge but with clear references to the final maze challenge.<br />
We chose the second approach. This implies that we will have to do some extra work to think about a properly structured code. Because only then the same script can be used for the final challenge. After the corridor competition, we can discuss about our choice because we failed the corridor challenge while other groups succeed. But most of these group had selected approach 1 and we already had a decent base for the a-maze-ing challenge. And this was proving its worth later..<br />
<br />
For the a-maze-ing challenge we decided on using two versions of our software package. In the first run (see section Video's further down on the page), we implemented Tremaux's algorithm together with a localiser that would together map the maze and try to solve it. Our second run was conducted with the Tremaux's algorithm and localisation algorithm turned off. Each time the robot encountered a intersection, a random decision was made on where to go next.<br />
<br />
=== Run 1 ===<br />
The first run is taped on video and can be seen [https://www.youtube.com/watch?v=fzsNA2OUwww here]. The robot recognizes a four-way cross-section and decides to turn to the left corridor. It then immediately starts do chatter as the corridor was more narrow than expected. Next, it follows the corridor smoothly until it encounters the next T-juction. The robot is confused because of the intersection immediatly to its left. After driving closer to the wall, it mistakes it for a door. Because it (of course) didn't open, it decides to turn to right and explore the dead end. In the part between 20 seconds and 24 seconds in to the video, the robot is visibly having a hard time with the narrow corridor. It tries to drive straight but also evade the walls to the left and to the right. It recognizes another dead-end and turns around swiftly. It crosses the T-junction again by going straight and at 43 seconds it again thinks it is in front of a door. After ringing the bell, it waits for the maximum of 5 seconds that it can take to open the door. Now, it recognized that also this is a dead-end and not a door. After turning around it drives back to the starting position. Between 1:11 and 1:30, it explores the edges that he has not yet seen. Here, the Tremaux's algorithm and the localiser 'seem' to be doing their job just fine. Unfortunately, as can be seen in the rest of the video, something went wrong with the other nodes to be placed. It decides to follow the same route as the first time, fails to drive to the corridor with the door in it and eventually got stuck in a loop.<br />
<br />
Main reason for failure is thought to be the node placement. The first T-junction that the robot encountered made PICO go into its collision avoiding mode, which might have interfered with the commands to place a node. It is also possible that this actually happened, but that the localization went wrong because of all the lateral swaying to avoid collisions with the wall. It was clear that the combination of localisation, the maze-solving algorithm and the situation recognition by LRF was not yet ready to be implemented as a whole. Therefore, we decided to make the second run with a more simple version of our software, running only the core-modules that were tested and found to be reliable.<br />
<br />
=== Run 2 ===<br />
For the second run, we ran a version of our software without the Tremaux's algorithm implemented and with the global localiser absent. These features were developed later in the project and were not finished 100%. For this run, a random decision was passed to the decision maker every time it asked for a new direction to head to.<br />
<br />
The second run can be seen [https://www.youtube.com/watch?v=UHz_41Bsi7c here]. Again the robot immediately decides to go left. Note that the first corner it takes in the corridor, between 0:02 and 0:04 are exactly the same. This is because the robot is driven by separate blocks of software. The blocks that are active during the following of a corridor were exactly the same for both runs. At 00:7, the collision detection works just in time to prevent a head on collision with the wall in front of PICO at the T-junction. Now, a random decision is made to go left, followed by a right turn in to the corridor with the door. It recognizes the door in front of it exactly as expected and stops to ring the doorbell. Although the door started moving immediately after ringing the bell, the robot is programmed to wait for five seconds until it is allowed to move again. During these five seconds, it used the LRF to check if the door moved out of its way. After the passage was all clear, the robot started exploring the new area. Now, the robot drives in to the open space. Note that, between 0:30 and 0:36, the robot made a zigzag manoeuvre. When it first drives into the open space, the potential field points at the center of this open space. Between 0:36 and 0:46 it drives in 'open space mode'. This means that the robot will drive to the nearest wall and starts driving alongside of it. It should thereby always find a new node where a new decision can be made. By doing so, it drives into a corridor. Note that at 0:47, the normal 'corridor mode' started working again. The potential field method will direct the robot towards the middle of the corridor. This explains the sharp turn it made at 0:47. After hearing the presenter ask to 'Please go left... Please go left?!?', the robot makes another random decision. As luck would have it, the random decision was indeed to go left. It slightly overturns, but the collision detection saves PICO from crashing into the wall yet again at 1:06. At 1:10, the well earned applause for PICO started as he finished the maze in a total time of 1:16!<br />
<br />
= Experiments =<br />
Seven experiments are done during the course. [[Embedded_Motion_Control_2015_Group_3/Experiments|Here]] you can find short information about dates and goals of the experiments. Also there is a short evaluation for each experiment.<br />
<br />
= Files & presentations =<br />
<br />
# Initial design document (week 1): [[File:init_design.pdf]]<br />
# First presentation (week 3): [[File:Group3_May6.pdf]]<br />
# Second presentation (week 6): [[File:Group3_May27.pdf]]<br />
# Final design presentation (week 8): [[File:EMC03 finalpres.pdf]]<br />
<br />
= Videos = <br />
<br />
Experiment 4: Testing the potential field on May 29, 2015.<br />
* https://youtu.be/UAZqDMAHKq8<br />
<br />
Maze challenge: Tremaux's algorithm, but failing to solve the maze. June 17, 2015.<br />
* https://www.youtube.com/watch?v=fzsNA2OUwww<br />
<br />
Maze challenge: Winning attempt! on June 17, 2015.<br />
* https://www.youtube.com/watch?v=UHz_41Bsi7c<br />
<br />
= EMC03 CST-wiki sub-pages =<br />
* [[Embedded_Motion_Control_2015_Group_3/Drive|Drive]] <br />
* [[Embedded_Motion_Control_2015_Group_3/Scan|Scan]]<br />
* [[Embedded_Motion_Control_2015_Group_3/Decision|Decision]]<br />
* [[Embedded_Motion_Control_2015_Group_3/Mapping|Mapping]]<br />
* [[Embedded_Motion_Control_2015_Group_3/Localisation|Localisation]]<br />
* [[Embedded_Motion_Control_2015_Group_3/Experiments|Experiments]]</div>
S108032
https://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Scan&diff=20307
Embedded Motion Control 2015 Group 3/Scan
2015-06-26T09:56:07Z
<p>S108032: /* Open space */</p>
<hr />
<div>= Scan = <br />
This page is part of the [[Embedded_Motion_Control_2015_Group_3|EMC03 CST-wiki]].<br />
<br />
In order to solve the maze, the robot needs to be able to drive autonomously. One type of data that is available is the laser range finder data. The PICO robot has a 270 degrees view, with approximately thousand beams. <br />
<br />
=== Potential field ===<br />
<br />
By splitting up the received laser data from the LRF in x and y, and summing them up results in a large vector containing the appropiate angle for PICO to follow. In other words, PICO moves always to the point with the most room. Note, the actual magnitude of this resultant vector is of no importance, since the Drive block has is own conditions for velocity.<br />
<br />
In straight corridors potential field will let PICO drive in the middle in a robust manner. In the case that PICO approaches a T-junction or intersection a decision must be made by the decision maker<br />
<br />
Since, there are more than one options at intersections. There has to be an extra element to send the robot in the appropriate direction. This is done, by blocking the other directions with virtual walls. In principle an extra layer has been added with the modified laser range finder data that PICO sees. From there on the potential field will do its work and PICO will drive in its desired direction.<br />
<br />
The potential field function will perceive this virtual walls as real walls. Therefore, PICO will avoid these 'walls' and drive into the desired corridor. The 'decision maker' in combination with the 'mapping algorithm' will decide were to place the virtual walls.<br />
<br />
=== Collision avoidance ===<br />
[[File:collision.gif|200px|thumb|right|Figure 1) Pico using collision avoidance]]<br />
The first level of saftey is provided by the potential field algoritm. Its resultant vector will always point towards the direction with the most room and therefore it is sufficient as first layer. However, avoidance collision is one of the top priorities since if Pico bumps into the wall the attempt of solving the maze is over. Another safety layer has been implemented to prevent the robot hitting walls or corners. The distance to the wals is continuosly measured and compared to a set safety margin. If the distance of multiple coextensive beams is smaller than this fixed parameter the robot will move in the opposite direction.<br />
<br />
=== Detection intersections ===<br />
<br />
At this stage the basic skill of driving with the potential field based on LRF data is complete. Next, the different type of junctions and intersections must be recognized in order to solve the maze. Not only is recognition necassary for driving through the maze, it is also a important part of mapping the maze, see [[Embedded_Motion_Control_2015_Group_3/Mapping| Mapping]].<br />
<br />
Since the maze is axis alligned there are three possibilites:<br />
<br />
# Crossroad<br />
# T-junction<br />
# Open space<br />
<br />
The first two cases are detected by taking n+10 and n-10 and looking if they differ more than 30 centimer, in that case there is a corridor. By using this simple but very effective method left and right corridors can be distinguished. Next, detecting if there is a corridor in front. This is done by adding up multiple beams in the front and diving them by the number of beams. If this differs more than a set value with the middle one, there is a corridor. <br />
<br />
===== Open space =====<br />
<br />
[[File:open_space.gif|200px|thumb|right|Figure 1) Pico handling open space]]<br />
When 80% of the LRF data is larger than 1 meter PICO knows it is in a open space and therefore it starts wall hugging in order to find the exit. Pico will stop this procedure if the corridor is equal or smaller than 1.5 meter, which is the maximum size of a corridor.<br />
<br />
=== Constructing virtual walls ===<br />
<br />
Constructing virtual walls is an essential part of driving PICO around the maze. First individual virtual walls were constructed therefore blocking potential corridors, which lead PICO into the desired direction. At a later stage this idea was slightly modified by computing a wall on a radius; therefore, PICO will move more smoothly through a corner.<br />
<br />
<br />
===== Crossroad ===== <br />
Consider an crossroad shown in the picture below, the left plot shows what pico sees when approaching this kind of junction. There are three maxima, which represent the possible directions PICO can go to. By slightly modifying the data the actual vision as seen in the simulator can be constructed, shown in (b). In Figure 1 two minima are shown that represent the far corners between the three maxima. These provide pico with reference points from where the virtual walls are constructed. Dependent on the direction of the desired turn the corner is used as a reference point for computing the radius where the virtual walls are set.<br />
<br />
{| align = "center"<br />
|[[File:crossroad.png|400px|Figure 1) The LRF data from PICO, (a) showing the data pico retrieves in this case 3 maxima and 2 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_crossroad.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
===== T-junction =====<br />
<br />
Now a T-junction is further examined, Figure 2 (a) shows what pico sees in this case. The figure shows two maxima with in between a minima. These two maxima are used as bounds for finding the minima. When the robot turn it is hard to keep a reference point and therefore this is a good method of finding the reference point, which is a minima in this case, to construct the virtual walls.<br />
<br />
{| align = "center"<br />
|[[File:T-junction.png|400px|Figure 2) The LRF data from PICO, (a) showing the data pico retrieves in this case 2 maxima and 1 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_Tjunction.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
In the case of a T-junction the situation is slightly different, in this case using the above method the minima will not represent a corner. However locating this minima is usefull, dependent on the kind of turn, 100+n[minimum] or 100-n[minimum], a radius is computed which will represent the virtual wall.<br />
<br />
=== Door Detection ===<br />
<br />
Since a door is basicly a dead end which can be opened, PICO should search for dead ends. These have a spefic profile were always three walls are visible and connected. And since the maxe is axis aligned, two of these walls will be parallel and one, of them, the one in between perpendicular on top of the others. These dead ends can be found at the end of a corridor and in junctions longer than 0.3 meters. This means PICO has to detect dead ends/doors in front, and at the side during turns. Therefore PICO will search in three regions in its LRF-data for doors. PICO will look left, in front and right to minimize detecting faulty doors and to be able to easily tell where the door is. All regions use the same methods for detecting doors, this method is based on the profile of a dead end, and PICO tries to recognize dead ends by searching its LRF-data with some conditions. . PICO will search for the two corner points where the walls meet. In between these corner points, the dead end/door can be detected. <br />
PICO will first start by searching the left corner point within a certain range. If this point can be found, pico will search for the wall or door which should be right of this point. This will be the closest point to PICO slightly right of this corner point. If this point can be found, PICO will search for the last point which is the right corner point. See figure 3, the points which PICO must detect are highlighted by a red cross. Notice that PICO will only look for the next point if the last one is found. <br />
<br />
To prevent PICO from detecting faulty doors, two extra conditions to qualify as a door/dead end are added. When the point are found, the distance to these points and the angles are knows. This makes it possible to determine whether all points are aligned. This is done by calculating the distance of all points according to figure 3 as "distance to pico". All three lenghts should be approximately equal. <br />
The second condition is the length of the door which has to be within the bound given in the assignment thus: 0.5 > door length < 1.5. If all condition are met, this area will qualify as a daed end/door and, if the distance to PICO is small enough, PICO has reached the door area.<br />
During experiments we noticed that faulty doors could still be detected by placing the walls a little askew or due to measurement noise. Therefore the last fix was introduced. PICO has to detect dead ends/doors ten times in a row before it actualy quaslifies as a real dead end/dead. This is to eliminate measurement noise/faults. <br />
<br />
[[File:wiki_doors.png|400px|thumb|center|Figure 3) PICO detecting doors, top images showing how pico detects doors/dead ends in front. The middle images show PICO detecting a door/dead ends on the right side. Bottom images showing PICO detecting incoming doors/dead ends]]<br />
<br />
If PICO has detected a dead end/door and its positioned in the door area, PICO will immediately stop and send the door request. After this PICO will stand still for six second to wait if the doors opens. After this waiting time, PICO will look for one second whether it is still in the door area. If PICO is still in the door area this means that nothing has changed and the door has not opened. It will qualify this as a regular dead end and turn around. If PICO is not in the door area anymore, this means that the door has opened and PICO will continue its path. Since this path was directed at the door, PICO will go thru the door and search for the exit of the maze.</div>
S108032
https://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Scan&diff=20306
Embedded Motion Control 2015 Group 3/Scan
2015-06-26T09:55:44Z
<p>S108032: /* Collision avoidance */</p>
<hr />
<div>= Scan = <br />
This page is part of the [[Embedded_Motion_Control_2015_Group_3|EMC03 CST-wiki]].<br />
<br />
In order to solve the maze, the robot needs to be able to drive autonomously. One type of data that is available is the laser range finder data. The PICO robot has a 270 degrees view, with approximately thousand beams. <br />
<br />
=== Potential field ===<br />
<br />
By splitting up the received laser data from the LRF in x and y, and summing them up results in a large vector containing the appropiate angle for PICO to follow. In other words, PICO moves always to the point with the most room. Note, the actual magnitude of this resultant vector is of no importance, since the Drive block has is own conditions for velocity.<br />
<br />
In straight corridors potential field will let PICO drive in the middle in a robust manner. In the case that PICO approaches a T-junction or intersection a decision must be made by the decision maker<br />
<br />
Since, there are more than one options at intersections. There has to be an extra element to send the robot in the appropriate direction. This is done, by blocking the other directions with virtual walls. In principle an extra layer has been added with the modified laser range finder data that PICO sees. From there on the potential field will do its work and PICO will drive in its desired direction.<br />
<br />
The potential field function will perceive this virtual walls as real walls. Therefore, PICO will avoid these 'walls' and drive into the desired corridor. The 'decision maker' in combination with the 'mapping algorithm' will decide were to place the virtual walls.<br />
<br />
=== Collision avoidance ===<br />
[[File:collision.gif|200px|thumb|right|Figure 1) Pico using collision avoidance]]<br />
The first level of saftey is provided by the potential field algoritm. Its resultant vector will always point towards the direction with the most room and therefore it is sufficient as first layer. However, avoidance collision is one of the top priorities since if Pico bumps into the wall the attempt of solving the maze is over. Another safety layer has been implemented to prevent the robot hitting walls or corners. The distance to the wals is continuosly measured and compared to a set safety margin. If the distance of multiple coextensive beams is smaller than this fixed parameter the robot will move in the opposite direction.<br />
<br />
=== Detection intersections ===<br />
<br />
At this stage the basic skill of driving with the potential field based on LRF data is complete. Next, the different type of junctions and intersections must be recognized in order to solve the maze. Not only is recognition necassary for driving through the maze, it is also a important part of mapping the maze, see [[Embedded_Motion_Control_2015_Group_3/Mapping| Mapping]].<br />
<br />
Since the maze is axis alligned there are three possibilites:<br />
<br />
# Crossroad<br />
# T-junction<br />
# Open space<br />
<br />
The first two cases are detected by taking n+10 and n-10 and looking if they differ more than 30 centimer, in that case there is a corridor. By using this simple but very effective method left and right corridors can be distinguished. Next, detecting if there is a corridor in front. This is done by adding up multiple beams in the front and diving them by the number of beams. If this differs more than a set value with the middle one, there is a corridor. <br />
<br />
===== Open space =====<br />
<br />
When 80% of the LRF data is larger than 1 meter PICO knows it is in a open space and therefore it starts wall hugging in order to find the exit. Pico will stop this procedure if the corridor is equal or smaller than 1.5 meter, which is the maximum size of a corridor.<br />
<br />
<br />
[[File:open_space.gif|200px|thumb|right|Figure 1) Pico handling open space]]<br />
<br />
=== Constructing virtual walls ===<br />
<br />
Constructing virtual walls is an essential part of driving PICO around the maze. First individual virtual walls were constructed therefore blocking potential corridors, which lead PICO into the desired direction. At a later stage this idea was slightly modified by computing a wall on a radius; therefore, PICO will move more smoothly through a corner.<br />
<br />
<br />
===== Crossroad ===== <br />
Consider an crossroad shown in the picture below, the left plot shows what pico sees when approaching this kind of junction. There are three maxima, which represent the possible directions PICO can go to. By slightly modifying the data the actual vision as seen in the simulator can be constructed, shown in (b). In Figure 1 two minima are shown that represent the far corners between the three maxima. These provide pico with reference points from where the virtual walls are constructed. Dependent on the direction of the desired turn the corner is used as a reference point for computing the radius where the virtual walls are set.<br />
<br />
{| align = "center"<br />
|[[File:crossroad.png|400px|Figure 1) The LRF data from PICO, (a) showing the data pico retrieves in this case 3 maxima and 2 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_crossroad.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
===== T-junction =====<br />
<br />
Now a T-junction is further examined, Figure 2 (a) shows what pico sees in this case. The figure shows two maxima with in between a minima. These two maxima are used as bounds for finding the minima. When the robot turn it is hard to keep a reference point and therefore this is a good method of finding the reference point, which is a minima in this case, to construct the virtual walls.<br />
<br />
{| align = "center"<br />
|[[File:T-junction.png|400px|Figure 2) The LRF data from PICO, (a) showing the data pico retrieves in this case 2 maxima and 1 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_Tjunction.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
In the case of a T-junction the situation is slightly different, in this case using the above method the minima will not represent a corner. However locating this minima is usefull, dependent on the kind of turn, 100+n[minimum] or 100-n[minimum], a radius is computed which will represent the virtual wall.<br />
<br />
=== Door Detection ===<br />
<br />
Since a door is basicly a dead end which can be opened, PICO should search for dead ends. These have a spefic profile were always three walls are visible and connected. And since the maxe is axis aligned, two of these walls will be parallel and one, of them, the one in between perpendicular on top of the others. These dead ends can be found at the end of a corridor and in junctions longer than 0.3 meters. This means PICO has to detect dead ends/doors in front, and at the side during turns. Therefore PICO will search in three regions in its LRF-data for doors. PICO will look left, in front and right to minimize detecting faulty doors and to be able to easily tell where the door is. All regions use the same methods for detecting doors, this method is based on the profile of a dead end, and PICO tries to recognize dead ends by searching its LRF-data with some conditions. . PICO will search for the two corner points where the walls meet. In between these corner points, the dead end/door can be detected. <br />
PICO will first start by searching the left corner point within a certain range. If this point can be found, pico will search for the wall or door which should be right of this point. This will be the closest point to PICO slightly right of this corner point. If this point can be found, PICO will search for the last point which is the right corner point. See figure 3, the points which PICO must detect are highlighted by a red cross. Notice that PICO will only look for the next point if the last one is found. <br />
<br />
To prevent PICO from detecting faulty doors, two extra conditions to qualify as a door/dead end are added. When the point are found, the distance to these points and the angles are knows. This makes it possible to determine whether all points are aligned. This is done by calculating the distance of all points according to figure 3 as "distance to pico". All three lenghts should be approximately equal. <br />
The second condition is the length of the door which has to be within the bound given in the assignment thus: 0.5 > door length < 1.5. If all condition are met, this area will qualify as a daed end/door and, if the distance to PICO is small enough, PICO has reached the door area.<br />
During experiments we noticed that faulty doors could still be detected by placing the walls a little askew or due to measurement noise. Therefore the last fix was introduced. PICO has to detect dead ends/doors ten times in a row before it actualy quaslifies as a real dead end/dead. This is to eliminate measurement noise/faults. <br />
<br />
[[File:wiki_doors.png|400px|thumb|center|Figure 3) PICO detecting doors, top images showing how pico detects doors/dead ends in front. The middle images show PICO detecting a door/dead ends on the right side. Bottom images showing PICO detecting incoming doors/dead ends]]<br />
<br />
If PICO has detected a dead end/door and its positioned in the door area, PICO will immediately stop and send the door request. After this PICO will stand still for six second to wait if the doors opens. After this waiting time, PICO will look for one second whether it is still in the door area. If PICO is still in the door area this means that nothing has changed and the door has not opened. It will qualify this as a regular dead end and turn around. If PICO is not in the door area anymore, this means that the door has opened and PICO will continue its path. Since this path was directed at the door, PICO will go thru the door and search for the exit of the maze.</div>
S108032
https://cstwiki.wtb.tue.nl/index.php?title=File:Open_space.gif&diff=19876
File:Open space.gif
2015-06-23T12:15:02Z
<p>S108032: Open space handling</p>
<hr />
<div>Open space handling</div>
S108032
https://cstwiki.wtb.tue.nl/index.php?title=File:Collision.gif&diff=19866
File:Collision.gif
2015-06-23T11:54:06Z
<p>S108032: Collision avaidance in the simulator</p>
<hr />
<div>Collision avaidance in the simulator</div>
S108032
https://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Scan&diff=19821
Embedded Motion Control 2015 Group 3/Scan
2015-06-23T10:04:56Z
<p>S108032: /* Constructing virtual walls */</p>
<hr />
<div>= Scan = <br />
This page is part of the [http://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3 EMC03 CST-wiki].<br />
<br />
In order to solve the maze, the robot needs to be able to drive autonomously. One type of data that is available is the laser range finder data. The PICO robot has a 270 degrees view, with approximately thousand beams. <br />
<br />
=== Potential field ===<br />
<br />
By splitting up the received laser data from the LRF in x and y, and summing them up results in a large vector containing the appropiate angle for PICO to follow. In other words, PICO moves always to the point with the most room. Note, the actual magnitude of this resultant vector is of no importance, since the Drive block has is own conditions for velocity.<br />
<br />
In straight corridors potential field will let PICO drive in the middle in a robust manner. In the case that PICO approaches a T-junction or intersection a decision must be made by the decision maker<br />
<br />
Since, there are more than one options at intersections. There has to be an extra element to send the robot in the appropriate direction. This is done, by blocking the other directions with virtual walls. In principle an extra layer has been added with the modified laser range finder data that PICO sees. From there on the potential field will do its work and PICO will drive in its desired direction.<br />
<br />
The potential field function will perceive this virtual walls as real walls. Therefore, PICO will avoid these 'walls' and drive into the desired corridor. The 'decision maker' in combination with the 'mapping algorithm' will decide were to place the virtual walls.<br />
<br />
=== Avoidance collision ===<br />
<br />
The first level of saftey is provided by the potential field algoritm. Its resultant vector will always point towards the direction with the most room and therefore it is sufficient as first layer. However, avoidance collision is one of the top priorities since if Pico bumps into the wall the attempt of solving the maze is over. Another safety layer has been implemented to prevent the robot hitting walls or corners. The distance to the wals is continuosly measured and compared to a set safety margin. If the distance of multiple coextensive beams is smaller than this fixed parameter the robot will move in the oppositie direction.<br />
<br />
=== Detection intersections ===<br />
<br />
At this stage the basic skill of driving with the potential field based on LRF data is complete. Next, the different type of junctions and intersections must be recognized in order to solve the maze. Not only is recognition necassary for driving through the maze, it is also a important part of mapping the maze, see [http://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Mapping Mapping].<br />
<br />
Since the maze is axis alligned there are three possibilites:<br />
<br />
# Crossroad<br />
# T-junction<br />
# Open space<br />
<br />
The first two cases are detected by taking n+10 and n-10 and looking if they differ more than 30 centimer, in that case there is a corridor. By using this simple but very effective method left and right corridors can be distinguished. Next, detecting if there is a corridor in front. This is done by adding up multiple beams in the front and diving them by the number of beams. If this differs more than a set value with the middle one, there is a corridor. <br />
<br />
===== Open space =====<br />
<br />
When 80% of the LRF data is larger than 1 meter PICO knows it is in a open space and therefore it starts wall hugging in order to find the exit. Pico will stop this procedure if the corridor is equal or smaller than 1.5 meter, which is the maximum size of a corridor.<br />
<br />
=== Constructing virtual walls ===<br />
<br />
Constructing virtual walls is an essential part of driving PICO around the maze. First individual virtual walls were constructed therefore blocking potential corridors, which lead PICO into the desired direction. At a later stage this idea was slightly modified by computing a wall on a radius; therefore, PICO will move more smoothly through a corner.<br />
<br />
<br />
===== Crossroad ===== <br />
Consider an crossroad shown in the picture below, the left plot shows what pico sees when approaching this kind of junction. There are three maxima, which represent the possible directions PICO can go to. By slightly modifying the data the actual vision as seen in the simulator can be constructed, shown in (b). In Figure 1 two minima are shown that represent the far corners between the three maxima. These provide pico with reference points from where the virtual walls are constructed. Dependent on the direction of the desired turn the corner is used as a reference point for computing the radius where the virtual walls are set.<br />
<br />
{| align = "center"<br />
|[[File:crossroad.png|400px|Figure 1) The LRF data from PICO, (a) showing the data pico retrieves in this case 3 maxima and 2 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_crossroad.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
===== T-junction =====<br />
<br />
Now a T-junction is further examined, Figure 2 (a) shows what pico sees in this case. The figure shows two maxima with in between a minima. These two maxima are used as bounds for finding the minima. When the robot turn it is hard to keep a reference and therefore this is a good method of finding the reference point to construct the virtual walls.<br />
<br />
{| align = "center"<br />
|[[File:T-junction.png|400px|Figure 2) The LRF data from PICO, (a) showing the data pico retrieves in this case 2 maxima and 1 minima, (b) showing the slightly modified data to show the actual corridors]][[File:Wall_Tjunction.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
In the case of a T-junction the situation is slightly different, in this case using the above method the minima will not represent a corner. However locating this minima is usefull, dependent on the kind of turn, 100+n[minimum] or 100-n[minimum], a radius is computed which will represent the virtual wall.<br />
<br />
=== Door Detection ===<br />
<br />
[[File:wiki_doors.png|400px|thumb|center|Figure 3) PICO detecting doors, top images showing how pico detects doors/dead ends in front. The middle images show PICO detecting a door/dead ends on the right side. Bottom images showing PICO detecting incoming doors/dead ends]]</div>
S108032
https://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Scan&diff=19820
Embedded Motion Control 2015 Group 3/Scan
2015-06-23T10:03:29Z
<p>S108032: /* Constructing virtual walls */</p>
<hr />
<div>= Scan = <br />
This page is part of the [http://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3 EMC03 CST-wiki].<br />
<br />
In order to solve the maze, the robot needs to be able to drive autonomously. One type of data that is available is the laser range finder data. The PICO robot has a 270 degrees view, with approximately thousand beams. <br />
<br />
=== Potential field ===<br />
<br />
By splitting up the received laser data from the LRF in x and y, and summing them up results in a large vector containing the appropiate angle for PICO to follow. In other words, PICO moves always to the point with the most room. Note, the actual magnitude of this resultant vector is of no importance, since the Drive block has is own conditions for velocity.<br />
<br />
In straight corridors potential field will let PICO drive in the middle in a robust manner. In the case that PICO approaches a T-junction or intersection a decision must be made by the decision maker<br />
<br />
Since, there are more than one options at intersections. There has to be an extra element to send the robot in the appropriate direction. This is done, by blocking the other directions with virtual walls. In principle an extra layer has been added with the modified laser range finder data that PICO sees. From there on the potential field will do its work and PICO will drive in its desired direction.<br />
<br />
The potential field function will perceive this virtual walls as real walls. Therefore, PICO will avoid these 'walls' and drive into the desired corridor. The 'decision maker' in combination with the 'mapping algorithm' will decide were to place the virtual walls.<br />
<br />
=== Avoidance collision ===<br />
<br />
The first level of saftey is provided by the potential field algoritm. Its resultant vector will always point towards the direction with the most room and therefore it is sufficient as first layer. However, avoidance collision is one of the top priorities since if Pico bumps into the wall the attempt of solving the maze is over. Another safety layer has been implemented to prevent the robot hitting walls or corners. The distance to the wals is continuosly measured and compared to a set safety margin. If the distance of multiple coextensive beams is smaller than this fixed parameter the robot will move in the oppositie direction.<br />
<br />
=== Detection intersections ===<br />
<br />
At this stage the basic skill of driving with the potential field based on LRF data is complete. Next, the different type of junctions and intersections must be recognized in order to solve the maze. Not only is recognition necassary for driving through the maze, it is also a important part of mapping the maze, see [http://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Mapping Mapping].<br />
<br />
Since the maze is axis alligned there are three possibilites:<br />
<br />
# Crossroad<br />
# T-junction<br />
# Open space<br />
<br />
The first two cases are detected by taking n+10 and n-10 and looking if they differ more than 30 centimer, in that case there is a corridor. By using this simple but very effective method left and right corridors can be distinguished. Next, detecting if there is a corridor in front. This is done by adding up multiple beams in the front and diving them by the number of beams. If this differs more than a set value with the middle one, there is a corridor. <br />
<br />
===== Open space =====<br />
<br />
When 80% of the LRF data is larger than 1 meter PICO knows it is in a open space and therefore it starts wall hugging in order to find the exit. Pico will stop this procedure if the corridor is equal or smaller than 1.5 meter, which is the maximum size of a corridor.<br />
<br />
=== Constructing virtual walls ===<br />
<br />
Constructing virtual walls is an essential part of driving PICO around the maze. First individual virtual walls were constructed therefore blocking potential corridors, which lead PICO into the desired direction. At a later stage this idea was slightly modified by computing a wall on a radius; therefore, PICO will move more smoothly through a corner.<br />
<br />
<br />
===== Crossroad ===== <br />
Consider an crossroad shown in the picture below, the left plot shows what pico sees when approaching this kind of junction. There are three maxima, which represent the possible directions PICO can go to. By slightly modifying the data the actual vision as seen in the simulator can be constructed, shown in (b). In Figure 1 two minima are shown that represent the far corners between the three maxima. These provide pico with reference points from where the virtual walls are constructed. Dependent on the direction of the desired turn the corner is used as a reference point for computing the radius where the virtual walls are set.<br />
<br />
{| align = "center"<br />
|[[File:crossroad.png|400pxFigure 1) The LRF data from PICO, (a) showing the data pico retrieves in this case 3 maxima and 2 minima, (b) showing the slightly modified data to show the actual corridors]]|[[File:Wall_crossroad.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
===== T-junction =====<br />
<br />
Now a T-junction is further examined, Figure 2 (a) shows what pico sees in this case. The figure shows two maxima with in between a minima. These two maxima are used as bounds for finding the minima. When the robot turn it is hard to keep a reference and therefore this is a good method of finding the reference point to construct the virtual walls.<br />
<br />
{| align = "center"<br />
|[[File:T-junction.png|400px|Figure 2) The LRF data from PICO, (a) showing the data pico retrieves in this case 2 maxima and 1 minima, (b) showing the slightly modified data to show the actual corridors]]|[[File:Wall_Tjunction.png|400px| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
|}<br />
<br />
In the case of a T-junction the situation is slightly different, in this case using the above method the minima will not represent a corner. However locating this minima is usefull, dependent on the kind of turn, 100+n[minimum] or 100-n[minimum], a radius is computed which will represent the virtual wall.<br />
<br />
=== Door Detection ===<br />
<br />
[[File:wiki_doors.png|400px|thumb|center|Figure 3) PICO detecting doors, top images showing how pico detects doors/dead ends in front. The middle images show PICO detecting a door/dead ends on the right side. Bottom images showing PICO detecting incoming doors/dead ends]]</div>
S108032
https://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Scan&diff=19812
Embedded Motion Control 2015 Group 3/Scan
2015-06-23T09:48:57Z
<p>S108032: /* Crossroad */</p>
<hr />
<div>= Scan = <br />
This page is part of the [http://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3 EMC03 CST-wiki].<br />
<br />
In order to solve the maze, the robot needs to be able to drive autonomously. One type of data that is available is the laser range finder data. The PICO robot has a 270 degrees view, with approximately thousand beams. <br />
<br />
=== Potential field ===<br />
<br />
By splitting up the received laser data from the LRF in x and y, and summing them up results in a large vector containing the appropiate angle for PICO to follow. In other words, PICO moves always to the point with the most room. Note, the actual magnitude of this resultant vector is of no importance, since the Drive block has is own conditions for velocity.<br />
<br />
In straight corridors potential field will let PICO drive in the middle in a robust manner. In the case that PICO approaches a T-junction or intersection a decision must be made by the decision maker<br />
<br />
Since, there are more than one options at intersections. There has to be an extra element to send the robot in the appropriate direction. This is done, by blocking the other directions with virtual walls. In principle an extra layer has been added with the modified laser range finder data that PICO sees. From there on the potential field will do its work and PICO will drive in its desired direction.<br />
<br />
The potential field function will perceive this virtual walls as real walls. Therefore, PICO will avoid these 'walls' and drive into the desired corridor. The 'decision maker' in combination with the 'mapping algorithm' will decide were to place the virtual walls.<br />
<br />
=== Avoidance collision ===<br />
<br />
The first level of saftey is provided by the potential field algoritm. Its resultant vector will always point towards the direction with the most room and therefore it is sufficient as first layer. However, avoidance collision is one of the top priorities since if Pico bumps into the wall the attempt of solving the maze is over. Another safety layer has been implemented to prevent the robot hitting walls or corners. The distance to the wals is continuosly measured and compared to a set safety margin. If the distance of multiple coextensive beams is smaller than this fixed parameter the robot will move in the oppositie direction.<br />
<br />
=== Detection intersections ===<br />
<br />
At this stage the basic skill of driving with the potential field based on LRF data is complete. Next, the different type of junctions and intersections must be recognized in order to solve the maze. Not only is recognition necassary for driving through the maze, it is also a important part of mapping the maze, see [http://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Mapping Mapping].<br />
<br />
Since the maze is axis alligned there are three possibilites:<br />
<br />
# Crossroad<br />
# T-junction<br />
# Open space<br />
<br />
The first two cases are detected by taking n+10 and n-10 and looking if they differ more than 30 centimer, in that case there is a corridor. By using this simple but very effective method left and right corridors can be distinguished. Next, detecting if there is a corridor in front. This is done by adding up multiple beams in the front and diving them by the number of beams. If this differs more than a set value with the middle one, there is a corridor. <br />
<br />
===== Open space =====<br />
<br />
When 80% of the LRF data is larger than 1 meter PICO knows it is in a open space and therefore it starts wall hugging in order to find the exit. Pico will stop this procedure if the corridor is equal or smaller than 1.5 meter, which is the maximum size of a corridor.<br />
<br />
=== Constructing virtual walls ===<br />
<br />
Constructing virtual walls is an essential part of driving PICO around the maze. First individual virtual walls were constructed therefore blocking potential corridors, which lead PICO into the desired direction. At a later stage this idea was slightly modified by computing a wall on a radius; therefore, PICO will move more smoothly through a corner.<br />
<br />
<br />
===== Crossroad ===== <br />
Consider an crossroad shown in the picture below, the left plot shows what pico sees when approaching this kind of junction. There are three maxima, which represent the possible directions PICO can go to. By slightly modifying the data the actual vision as seen in the simulator can be constructed, shown in (b). In Figure 1 two minima are shown that represent the far corners between the three maxima. These provide pico with reference points from where the virtual walls are constructed. Dependent on the direction of the desired turn the corner is used as a reference point for computing the radius where the virtual walls are set.<br />
<br />
[[File:crossroad.png|600px|thumb|left|Figure 1) The LRF data from PICO, (a) showing the data pico retrieves in this case 3 maxima and 2 minima, (b) showing the slightly modified data to show the actual corridors]]<br />
<br />
[[File:Wall_crossroad.png|600px|thumb|right| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
<br />
===== T-junction =====<br />
<br />
Now a T-junction is further examined, Figure 2 (a) shows what pico sees in this case. The figure shows two maxima with in between a minima. These two maxima are used as bounds for finding the minima. When the robot turn it is hard to keep a reference and therefore this is a good method of finding the reference point to construct the virtual walls.<br />
<br />
<br />
[[File:T-junction.png|400px|thumb|center|Figure 2) The LRF data from PICO, (a) showing the data pico retrieves in this case 2 maxima and 1 minima, (b) showing the slightly modified data to show the actual corridors]]<br />
<br />
[[File:Wall_Tjunction.png|400px|thumb|center| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
<br />
<br />
In the case of a T-junction the situation is slightly different, in this case using the above method the minima will not represent a corner. However locating this minima is usefull, dependent on the kind of turn, 100+n[minimum] or 100-n[minimum], a radius is computed which will represent the virtual wall.<br />
<br />
=== Door Detection ===<br />
<br />
[[File:wiki_doors.png|400px|thumb|center|Figure 3) PICO detecting doors, top images showing how pico detects doors/dead ends in front. The middle images show PICO detecting a door/dead ends on the right side. Bottom images showing PICO detecting incoming doors/dead ends]]</div>
S108032
https://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Scan&diff=19809
Embedded Motion Control 2015 Group 3/Scan
2015-06-23T09:40:51Z
<p>S108032: /* T-junction */</p>
<hr />
<div>= Scan = <br />
This page is part of the [http://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3 EMC03 CST-wiki].<br />
<br />
In order to solve the maze, the robot needs to be able to drive autonomously. One type of data that is available is the laser range finder data. The PICO robot has a 270 degrees view, with approximately thousand beams. <br />
<br />
=== Potential field ===<br />
<br />
By splitting up the received laser data from the LRF in x and y, and summing them up results in a large vector containing the appropiate angle for PICO to follow. In other words, PICO moves always to the point with the most room. Note, the actual magnitude of this resultant vector is of no importance, since the Drive block has is own conditions for velocity.<br />
<br />
In straight corridors potential field will let PICO drive in the middle in a robust manner. In the case that PICO approaches a T-junction or intersection a decision must be made by the decision maker<br />
<br />
Since, there are more than one options at intersections. There has to be an extra element to send the robot in the appropriate direction. This is done, by blocking the other directions with virtual walls. In principle an extra layer has been added with the modified laser range finder data that PICO sees. From there on the potential field will do its work and PICO will drive in its desired direction.<br />
<br />
The potential field function will perceive this virtual walls as real walls. Therefore, PICO will avoid these 'walls' and drive into the desired corridor. The 'decision maker' in combination with the 'mapping algorithm' will decide were to place the virtual walls.<br />
<br />
=== Avoidance collision ===<br />
<br />
The first level of saftey is provided by the potential field algoritm. Its resultant vector will always point towards the direction with the most room and therefore it is sufficient as first layer. However, avoidance collision is one of the top priorities since if Pico bumps into the wall the attempt of solving the maze is over. Another safety layer has been implemented to prevent the robot hitting walls or corners. The distance to the wals is continuosly measured and compared to a set safety margin. If the distance of multiple coextensive beams is smaller than this fixed parameter the robot will move in the oppositie direction.<br />
<br />
=== Detection intersections ===<br />
<br />
At this stage the basic skill of driving with the potential field based on LRF data is complete. Next, the different type of junctions and intersections must be recognized in order to solve the maze. Not only is recognition necassary for driving through the maze, it is also a important part of mapping the maze, see [http://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Mapping Mapping].<br />
<br />
Since the maze is axis alligned there are three possibilites:<br />
<br />
# Crossroad<br />
# T-junction<br />
# Open space<br />
<br />
The first two cases are detected by taking n+10 and n-10 and looking if they differ more than 30 centimer, in that case there is a corridor. By using this simple but very effective method left and right corridors can be distinguished. Next, detecting if there is a corridor in front. This is done by adding up multiple beams in the front and diving them by the number of beams. If this differs more than a set value with the middle one, there is a corridor. <br />
<br />
===== Open space =====<br />
<br />
When 80% of the LRF data is larger than 1 meter PICO knows it is in a open space and therefore it starts wall hugging in order to find the exit. Pico will stop this procedure if the corridor is equal or smaller than 1.5 meter, which is the maximum size of a corridor.<br />
<br />
=== Constructing virtual walls ===<br />
<br />
Constructing virtual walls is an essential part of driving PICO around the maze. First individual virtual walls were constructed therefore blocking potential corridors, which lead PICO into the desired direction. At a later stage this idea was slightly modified by computing a wall on a radius; therefore, PICO will move more smoothly through a corner.<br />
<br />
<br />
===== Crossroad ===== <br />
Consider an crossroad shown in the picture below, the left plot shows what pico sees when approaching this kind of junction. There are three maxima, which represent the possible directions PICO can go to. By slightly modifying the data the actual vision as seen in the simulator can be constructed, shown in (b). <br />
<br />
[[File:crossroad.png|400px|thumb|center|Figure 1) The LRF data from PICO, (a) showing the data pico retrieves in this case 3 maxima and 2 minima, (b) showing the slightly modified data to show the actual corridors]]<br />
<br />
[[File:Wall_crossroad.png|400px|thumb|center| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
<br />
In Figure 1 two minima are shown that represent the far corners between the three maxima. These provide pico with reference points from where the virtual walls are constructed. Dependent on the direction of the desired turn the corner is used as a reference point for computing the radius where the virtual walls are set.<br />
<br />
===== T-junction =====<br />
<br />
Now a T-junction is further examined, Figure 2 (a) shows what pico sees in this case. The figure shows two maxima with in between a minima. These two maxima are used as bounds for finding the minima. When the robot turn it is hard to keep a reference and therefore this is a good method of finding the reference point to construct the virtual walls.<br />
<br />
<br />
[[File:T-junction.png|400px|thumb|center|Figure 2) The LRF data from PICO, (a) showing the data pico retrieves in this case 2 maxima and 1 minima, (b) showing the slightly modified data to show the actual corridors]]<br />
<br />
[[File:Wall_Tjunction.png|400px|thumb|center| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
<br />
<br />
In the case of a T-junction the situation is slightly different, in this case using the above method the minima will not represent a corner. However locating this minima is usefull, dependent on the kind of turn, 100+n[minimum] or 100-n[minimum], a radius is computed which will represent the virtual wall.<br />
<br />
=== Door Detection ===<br />
<br />
[[File:wiki_doors.png|400px|thumb|center|Figure 3) PICO detecting doors, top images showing how pico detects doors/dead ends in front. The middle images show PICO detecting a door/dead ends on the right side. Bottom images showing PICO detecting incoming doors/dead ends]]</div>
S108032
https://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Scan&diff=19808
Embedded Motion Control 2015 Group 3/Scan
2015-06-23T09:40:25Z
<p>S108032: /* Crossroad */</p>
<hr />
<div>= Scan = <br />
This page is part of the [http://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3 EMC03 CST-wiki].<br />
<br />
In order to solve the maze, the robot needs to be able to drive autonomously. One type of data that is available is the laser range finder data. The PICO robot has a 270 degrees view, with approximately thousand beams. <br />
<br />
=== Potential field ===<br />
<br />
By splitting up the received laser data from the LRF in x and y, and summing them up results in a large vector containing the appropiate angle for PICO to follow. In other words, PICO moves always to the point with the most room. Note, the actual magnitude of this resultant vector is of no importance, since the Drive block has is own conditions for velocity.<br />
<br />
In straight corridors potential field will let PICO drive in the middle in a robust manner. In the case that PICO approaches a T-junction or intersection a decision must be made by the decision maker<br />
<br />
Since, there are more than one options at intersections. There has to be an extra element to send the robot in the appropriate direction. This is done, by blocking the other directions with virtual walls. In principle an extra layer has been added with the modified laser range finder data that PICO sees. From there on the potential field will do its work and PICO will drive in its desired direction.<br />
<br />
The potential field function will perceive this virtual walls as real walls. Therefore, PICO will avoid these 'walls' and drive into the desired corridor. The 'decision maker' in combination with the 'mapping algorithm' will decide were to place the virtual walls.<br />
<br />
=== Avoidance collision ===<br />
<br />
The first level of saftey is provided by the potential field algoritm. Its resultant vector will always point towards the direction with the most room and therefore it is sufficient as first layer. However, avoidance collision is one of the top priorities since if Pico bumps into the wall the attempt of solving the maze is over. Another safety layer has been implemented to prevent the robot hitting walls or corners. The distance to the wals is continuosly measured and compared to a set safety margin. If the distance of multiple coextensive beams is smaller than this fixed parameter the robot will move in the oppositie direction.<br />
<br />
=== Detection intersections ===<br />
<br />
At this stage the basic skill of driving with the potential field based on LRF data is complete. Next, the different type of junctions and intersections must be recognized in order to solve the maze. Not only is recognition necassary for driving through the maze, it is also a important part of mapping the maze, see [http://cstwiki.wtb.tue.nl/index.php?title=Embedded_Motion_Control_2015_Group_3/Mapping Mapping].<br />
<br />
Since the maze is axis alligned there are three possibilites:<br />
<br />
# Crossroad<br />
# T-junction<br />
# Open space<br />
<br />
The first two cases are detected by taking n+10 and n-10 and looking if they differ more than 30 centimer, in that case there is a corridor. By using this simple but very effective method left and right corridors can be distinguished. Next, detecting if there is a corridor in front. This is done by adding up multiple beams in the front and diving them by the number of beams. If this differs more than a set value with the middle one, there is a corridor. <br />
<br />
===== Open space =====<br />
<br />
When 80% of the LRF data is larger than 1 meter PICO knows it is in a open space and therefore it starts wall hugging in order to find the exit. Pico will stop this procedure if the corridor is equal or smaller than 1.5 meter, which is the maximum size of a corridor.<br />
<br />
=== Constructing virtual walls ===<br />
<br />
Constructing virtual walls is an essential part of driving PICO around the maze. First individual virtual walls were constructed therefore blocking potential corridors, which lead PICO into the desired direction. At a later stage this idea was slightly modified by computing a wall on a radius; therefore, PICO will move more smoothly through a corner.<br />
<br />
<br />
===== Crossroad ===== <br />
Consider an crossroad shown in the picture below, the left plot shows what pico sees when approaching this kind of junction. There are three maxima, which represent the possible directions PICO can go to. By slightly modifying the data the actual vision as seen in the simulator can be constructed, shown in (b). <br />
<br />
[[File:crossroad.png|400px|thumb|center|Figure 1) The LRF data from PICO, (a) showing the data pico retrieves in this case 3 maxima and 2 minima, (b) showing the slightly modified data to show the actual corridors]]<br />
<br />
[[File:Wall_crossroad.png|400px|thumb|center| In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human]]<br />
<br />
In Figure 1 two minima are shown that represent the far corners between the three maxima. These provide pico with reference points from where the virtual walls are constructed. Dependent on the direction of the desired turn the corner is used as a reference point for computing the radius where the virtual walls are set.<br />
<br />
===== T-junction =====<br />
<br />
Now a T-junction is further examined, Figure 2 (a) shows what pico sees in this case. The figure shows two maxima with in between a minima. These two maxima are used as bounds for finding the minima. When the robot turn it is hard to keep a reference and therefore this is a good method of finding the reference point to construct the virtual walls.<br />
<br />
<br />
[[File:T-junction.png|400px|thumb|center|Figure 2) The LRF data from PICO, (a) showing the data pico retrieves in this case 2 maxima and 1 minima, (b) showing the slightly modified data to show the actual corridors]]<br />
<br />
In the case of a T-junction the situation is slightly different, in this case using the above method the minima will not represent a corner. However locating this minima is usefull, dependent on the kind of turn, 100+n[minimum] or 100-n[minimum], a radius is computed which will represent the virtual wall.<br />
<br />
=== Door Detection ===<br />
<br />
[[File:wiki_doors.png|400px|thumb|center|Figure 3) PICO detecting doors, top images showing how pico detects doors/dead ends in front. The middle images show PICO detecting a door/dead ends on the right side. Bottom images showing PICO detecting incoming doors/dead ends]]</div>
S108032
https://cstwiki.wtb.tue.nl/index.php?title=File:Wall_Tjunction.png&diff=19807
File:Wall Tjunction.png
2015-06-23T09:37:49Z
<p>S108032: In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human</p>
<hr />
<div>In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human</div>
S108032
https://cstwiki.wtb.tue.nl/index.php?title=File:Wall_crossroad.png&diff=19806
File:Wall crossroad.png
2015-06-23T09:37:12Z
<p>S108032: In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human</p>
<hr />
<div>In blue the original LRF data and in red the adjusted wall making LRF data. On the left the data PICO sees and on the right the modified data to recognize the corridors better as a human</div>
S108032