Control Systems Technology Group - User contributions [en]
https://cstwiki.wtb.tue.nl/wiki/Special:Contributions/L.a.oei@student.tue.nl
User contributionsenMediaWiki 1.37.6Sat, 25 Mar 2023 05:32:27 GMTMobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117160
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117160<p>L.a.oei@student.tue.nl: /* Line Extraction */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction Algorithm==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
[[File:X coordinate.PNG|200 px|]],<br />
<br />
and<br />
<br />
[[File:Y coordinate.PNG|200 px|]],<br />
<br />
where i is the index starting from 0 and ending at 999. <math>\Delta \theta</math> is the angular resolution, which is 4 mrad.<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|500 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. This makes the line less prone to noise influences. The line is fitted via the linear least-square method by calculating the slope m and intercept b:<br />
<br />
[[File:Linear least square.PNG|300 px|]],<br />
<br />
[[File:Linear least square b.PNG|300 px|]].<br />
<br />
However, the disadvantage of using the linear least-square approach is that it can not represent lines parallel to the y-axis. This is due to <math>\Delta x</math> becoming 0, which causes the slope m of the line to approach infinity. This is solved practically by only applying the linear least-square method when the distance x between the begin point and end point of the line is above a certain threshold. Because of the limitation of the linear least-square approach, a total least-square solution is considered for the Hospital challenge, which overcomes these limitations.<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 21:04:01 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117159
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117159<p>L.a.oei@student.tue.nl: /* Line Fitting */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
[[File:X coordinate.PNG|200 px|]],<br />
<br />
and<br />
<br />
[[File:Y coordinate.PNG|200 px|]],<br />
<br />
where i is the index starting from 0 and ending at 999. <math>\Delta \theta</math> is the angular resolution, which is 4 mrad.<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|500 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. This makes the line less prone to noise influences. The line is fitted via the linear least-square method by calculating the slope m and intercept b:<br />
<br />
[[File:Linear least square.PNG|300 px|]],<br />
<br />
[[File:Linear least square b.PNG|300 px|]].<br />
<br />
However, the disadvantage of using the linear least-square approach is that it can not represent lines parallel to the y-axis. This is due to <math>\Delta x</math> becoming 0, which causes the slope m of the line to approach infinity. This is solved practically by only applying the linear least-square method when the distance x between the begin point and end point of the line is above a certain threshold. Because of the limitation of the linear least-square approach, a total least-square solution is considered for the Hospital challenge, which overcomes these limitations.<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 20:59:47 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117158
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117158<p>L.a.oei@student.tue.nl: /* Pre-processing of Laser Data */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
[[File:X coordinate.PNG|200 px|]],<br />
<br />
and<br />
<br />
[[File:Y coordinate.PNG|200 px|]],<br />
<br />
where i is the index starting from 0 and ending at 999. <math>\Delta \theta</math> is the angular resolution, which is 4 mrad.<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|500 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. This makes the line less prone to noise influences. The line is fitted via the linear least-square method by calculating the slope m and intercept b:<br />
<br />
[[File:Linear least square.PNG|300 px|]],<br />
<br />
[[File:Linear least square b.PNG|300 px|]].<br />
<br />
However, the disadvantage of using the linear least-square approach is that it can not represent lines parallel to the y-axis. This is due to <math>\Delta x</math> is becoming 0, which causes the slope m of the line to approach infinity. This is solved practically by only applying the linear least-square method when the distance x between the begin point and end point of the line is above a certain threshold. Because of the limitation of the linear least-square approach, a total least-square solution is considered for the Hospital challenge, which overcomes these limitations.<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 20:56:29 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117157
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117157<p>L.a.oei@student.tue.nl: /* Pre-processing of Laser Data */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
[[File:X coordinate.PNG|200 px|]],<br />
<br />
and<br />
<br />
[[File:Y coordinate.PNG|200 px|]],<br />
<br />
where i is the index starting from 0 and ending at 999. <math>\Delta\theta</math> is the angular resolution, which is 4 mrad.<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|500 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. This makes the line less prone to noise influences. The line is fitted via the linear least-square method by calculating the slope m and intercept b:<br />
<br />
[[File:Linear least square.PNG|300 px|]],<br />
<br />
[[File:Linear least square b.PNG|300 px|]].<br />
<br />
However, the disadvantage of using the linear least-square approach is that it can not represent lines parallel to the y-axis. This is due to <math>\Delta x</math> is becoming 0, which causes the slope m of the line to approach infinity. This is solved practically by only applying the linear least-square method when the distance x between the begin point and end point of the line is above a certain threshold. Because of the limitation of the linear least-square approach, a total least-square solution is considered for the Hospital challenge, which overcomes these limitations.<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 20:56:11 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117156
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117156<p>L.a.oei@student.tue.nl: /* Pre-processing of Laser Data */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
[[File:X coordinate.PNG|200 px|]],<br />
<br />
and<br />
<br />
[[File:Y coordinate.PNG|200 px|]],<br />
<br />
where i is the index starting from 0 and ends at 999<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|500 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. This makes the line less prone to noise influences. The line is fitted via the linear least-square method by calculating the slope m and intercept b:<br />
<br />
[[File:Linear least square.PNG|300 px|]],<br />
<br />
[[File:Linear least square b.PNG|300 px|]].<br />
<br />
However, the disadvantage of using the linear least-square approach is that it can not represent lines parallel to the y-axis. This is due to <math>\Delta x</math> is becoming 0, which causes the slope m of the line to approach infinity. This is solved practically by only applying the linear least-square method when the distance x between the begin point and end point of the line is above a certain threshold. Because of the limitation of the linear least-square approach, a total least-square solution is considered for the Hospital challenge, which overcomes these limitations.<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 20:54:46 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117155
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117155<p>L.a.oei@student.tue.nl: /* Segmentation */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
[[File:X coordinate.PNG|200 px|]],<br />
<br />
and<br />
<br />
[[File:Y coordinate.PNG|200 px|]].<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|500 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. This makes the line less prone to noise influences. The line is fitted via the linear least-square method by calculating the slope m and intercept b:<br />
<br />
[[File:Linear least square.PNG|300 px|]],<br />
<br />
[[File:Linear least square b.PNG|300 px|]].<br />
<br />
However, the disadvantage of using the linear least-square approach is that it can not represent lines parallel to the y-axis. This is due to <math>\Delta x</math> is becoming 0, which causes the slope m of the line to approach infinity. This is solved practically by only applying the linear least-square method when the distance x between the begin point and end point of the line is above a certain threshold. Because of the limitation of the linear least-square approach, a total least-square solution is considered for the Hospital challenge, which overcomes these limitations.<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 20:52:57 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117154
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117154<p>L.a.oei@student.tue.nl: /* Pre-processing of Laser Data */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
[[File:X coordinate.PNG|200 px|]],<br />
<br />
and<br />
<br />
[[File:Y coordinate.PNG|200 px|]].<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|400 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. This makes the line less prone to noise influences. The line is fitted via the linear least-square method by calculating the slope m and intercept b:<br />
<br />
[[File:Linear least square.PNG|300 px|]],<br />
<br />
[[File:Linear least square b.PNG|300 px|]].<br />
<br />
However, the disadvantage of using the linear least-square approach is that it can not represent lines parallel to the y-axis. This is due to <math>\Delta x</math> is becoming 0, which causes the slope m of the line to approach infinity. This is solved practically by only applying the linear least-square method when the distance x between the begin point and end point of the line is above a certain threshold. Because of the limitation of the linear least-square approach, a total least-square solution is considered for the Hospital challenge, which overcomes these limitations.<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 20:52:47 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117153
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117153<p>L.a.oei@student.tue.nl: /* Pre-processing of Laser Data */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
[[File:X coordinate.PNG|300 px|]],<br />
<br />
and<br />
<br />
[[File:Y coordinate.PNG|300 px|]].<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|400 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. This makes the line less prone to noise influences. The line is fitted via the linear least-square method by calculating the slope m and intercept b:<br />
<br />
[[File:Linear least square.PNG|300 px|]],<br />
<br />
[[File:Linear least square b.PNG|300 px|]].<br />
<br />
However, the disadvantage of using the linear least-square approach is that it can not represent lines parallel to the y-axis. This is due to <math>\Delta x</math> is becoming 0, which causes the slope m of the line to approach infinity. This is solved practically by only applying the linear least-square method when the distance x between the begin point and end point of the line is above a certain threshold. Because of the limitation of the linear least-square approach, a total least-square solution is considered for the Hospital challenge, which overcomes these limitations.<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 20:52:40 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6File:Y coordinate.PNG
https://cstwiki.wtb.tue.nl/index.php?title=File:Y_coordinate.PNG&diff=117152
https://cstwiki.wtb.tue.nl/index.php?title=File:Y_coordinate.PNG&diff=117152<p>L.a.oei@student.tue.nl: </p>
<hr />
<div></div>Sun, 06 Jun 2021 20:51:31 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/File_talk:Y_coordinate.PNGFile:X coordinate.PNG
https://cstwiki.wtb.tue.nl/index.php?title=File:X_coordinate.PNG&diff=117151
https://cstwiki.wtb.tue.nl/index.php?title=File:X_coordinate.PNG&diff=117151<p>L.a.oei@student.tue.nl: </p>
<hr />
<div></div>Sun, 06 Jun 2021 20:51:24 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/File_talk:X_coordinate.PNGMobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117150
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117150<p>L.a.oei@student.tue.nl: /* Line Fitting */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|400 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. This makes the line less prone to noise influences. The line is fitted via the linear least-square method by calculating the slope m and intercept b:<br />
<br />
[[File:Linear least square.PNG|300 px|]],<br />
<br />
[[File:Linear least square b.PNG|300 px|]].<br />
<br />
However, the disadvantage of using the linear least-square approach is that it can not represent lines parallel to the y-axis. This is due to <math>\Delta x</math> is becoming 0, which causes the slope m of the line to approach infinity. This is solved practically by only applying the linear least-square method when the distance x between the begin point and end point of the line is above a certain threshold. Because of the limitation of the linear least-square approach, a total least-square solution is considered for the Hospital challenge, which overcomes these limitations.<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 20:47:16 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117149
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117149<p>L.a.oei@student.tue.nl: /* Line Fitting */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|400 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. This makes the line less prone to noise influences. The line is fitted via the linear least-square method by calculating the slope m and intercept b:<br />
<br />
[[File:Linear least square.PNG|300 px|]],<br />
<br />
[[File:Linear least square b.PNG|300 px|]].<br />
<br />
However, the disadvantage of using the linear least-square approach is that it can not represent lines parallel to the y-axis. This is due to <math>\Delta x</math> is becoming 0, which causes the slope m of the line to approach infinity. This is solved practically by only applying the linear least-square method when the distance x between the begin point and end point of the line is above a certain threshold. Because of the limitation of the linear least-square approach, a total least-square solution is considered for the Hospital challenge and overcomes these limitations.<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 20:46:18 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117148
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117148<p>L.a.oei@student.tue.nl: /* Line Fitting */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|400 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. This makes the line less prone to noise influences. The line is fitted via the linear least-square method by calculating the slope m and intercept b:<br />
<br />
[[File:Linear least square.PNG|300 px|]],<br />
<br />
[[File:Linear least square b.PNG|300 px|]].<br />
<br />
However, the disadvantage of using the linear least-square approach is that it can not represent lines parallel to the y-axis. This is due to <math>\Delta x</math> is becoming 0, which causes the slope m of the line to approache infinity. This is solved practically by only applying the linear least-square method when the distance x between the begin point and end point of the line is above a certain threshold. Because of the limitation of the linear least-square approach, a total least-square solution is considered for the Hospital challenge and overcomes these limitations.<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 20:46:02 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117147
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117147<p>L.a.oei@student.tue.nl: /* Line Fitting */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|400 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. This makes the line less prone to noise influences. The line is fitted via the linear least-square method by calculating the slope m and intercept b:<br />
<br />
[[File:Linear least square.PNG|300 px|]],<br />
<br />
[[File:Linear least square b.PNG|300 px|]].<br />
<br />
However, the disadvantage of using the linear least-square approach is that it can not represent lines parallel to the y-axis. This is due to <math>\delta x</math> is becoming 0, which causes the slope m of the line to approache infinity. This is solved practically by only applying the linear least-square method when the distance x between the begin point and end point of the line is above a certain threshold. Because of the limitation of the linear least-square approach, a total least-square solution is considered for the Hospital challenge and overcomes these limitations.<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 20:45:43 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117146
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117146<p>L.a.oei@student.tue.nl: /* Line Fitting */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|400 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. This makes the line less prone to noise influences. The line is fitted via the linear least-square method by calculating the slope m and intercept b:<br />
<br />
[[File:Linear least square.PNG|300 px|]],<br />
<br />
[[File:Linear least square b.PNG|300 px|]].<br />
<br />
However, the disadvantage of using the linear least-square approach is that it can not represent lines parallel to the y-axis. This is due to x is becoming 0, which causes the slope m of the line to approache infinity. This is solved practically by only applying the linear least-square method when the distance x between the begin point and end point of the line is above a certain threshold. Because of the limitation of the linear least-square approach, a total least-square solution is considered for the Hospital challenge and overcomes these limitations.<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 20:43:15 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117145
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117145<p>L.a.oei@student.tue.nl: /* Line Fitting */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|400 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. This makes the line less prone to noise influences. The line is fitted via the linear least-square method by calculating the slope m and intercept b:<br />
<br />
[[File:Linear least square.PNG|300 px|]],<br />
<br />
[[File:Linear least square b.PNG|300 px|]].<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 20:35:53 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117144
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117144<p>L.a.oei@student.tue.nl: /* Line Fitting */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|400 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. This makes the line less prone to noise influences. The line is fitted via the linear least-square method by calculating the slope m and intercept b:<br />
<br />
[[File:Linear least square.PNG|400 px|]].<br />
[[File:Linear least square b.PNG|400 px|]].<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 20:35:31 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117143
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117143<p>L.a.oei@student.tue.nl: /* Line Fitting */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|400 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. This makes the line less prone to noise influences. The line is fitted via the linear least-square method by calculating the slope m and intercept b:<br />
[[File:Linear least square.PNG|400 px|]].<br />
[[File:Linear least square b.PNG|400 px|]].<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 20:35:24 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6File:Linear least square b.PNG
https://cstwiki.wtb.tue.nl/index.php?title=File:Linear_least_square_b.PNG&diff=117142
https://cstwiki.wtb.tue.nl/index.php?title=File:Linear_least_square_b.PNG&diff=117142<p>L.a.oei@student.tue.nl: </p>
<hr />
<div></div>Sun, 06 Jun 2021 20:35:11 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/File_talk:Linear_least_square_b.PNGFile:Linear least square.PNG
https://cstwiki.wtb.tue.nl/index.php?title=File:Linear_least_square.PNG&diff=117141
https://cstwiki.wtb.tue.nl/index.php?title=File:Linear_least_square.PNG&diff=117141<p>L.a.oei@student.tue.nl: uploaded a new version of "File:Linear least square.PNG"</p>
<hr />
<div></div>Sun, 06 Jun 2021 20:34:59 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/File_talk:Linear_least_square.PNGMobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117140
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117140<p>L.a.oei@student.tue.nl: /* Line Fitting */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|400 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. This makes the line less prone to noise influences. The line is fitted via the linear least-square method by calculating the slope m and intercept b:<br />
[[File:Linear least square.PNG|400 px|]].<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 20:33:49 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117139
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117139<p>L.a.oei@student.tue.nl: /* Line Fitting */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|400 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. This makes the line less prone to noise influences. The line is fitted via the linear least-square method by calculating the slope m and intercept b:<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 20:33:29 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6File:Linear least square.PNG
https://cstwiki.wtb.tue.nl/index.php?title=File:Linear_least_square.PNG&diff=117138
https://cstwiki.wtb.tue.nl/index.php?title=File:Linear_least_square.PNG&diff=117138<p>L.a.oei@student.tue.nl: </p>
<hr />
<div></div>Sun, 06 Jun 2021 20:33:24 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/File_talk:Linear_least_square.PNGFile:Perpendicular distance.PNG
https://cstwiki.wtb.tue.nl/index.php?title=File:Perpendicular_distance.PNG&diff=117137
https://cstwiki.wtb.tue.nl/index.php?title=File:Perpendicular_distance.PNG&diff=117137<p>L.a.oei@student.tue.nl: uploaded a new version of "File:Perpendicular distance.PNG"</p>
<hr />
<div></div>Sun, 06 Jun 2021 20:14:21 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/File_talk:Perpendicular_distance.PNGFile:Perpendicular distance.PNG
https://cstwiki.wtb.tue.nl/index.php?title=File:Perpendicular_distance.PNG&diff=117136
https://cstwiki.wtb.tue.nl/index.php?title=File:Perpendicular_distance.PNG&diff=117136<p>L.a.oei@student.tue.nl: uploaded a new version of "File:Perpendicular distance.PNG"</p>
<hr />
<div></div>Sun, 06 Jun 2021 20:13:06 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/File_talk:Perpendicular_distance.PNGMobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117135
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117135<p>L.a.oei@student.tue.nl: /* Segmentation */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2]:<br />
<br />
[[File:Perpendicular distance.PNG|400 px|]].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. The line is fitted via the linear least-square method:<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Sun, 06 Jun 2021 20:12:26 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6File:Perpendicular distance.PNG
https://cstwiki.wtb.tue.nl/index.php?title=File:Perpendicular_distance.PNG&diff=117134
https://cstwiki.wtb.tue.nl/index.php?title=File:Perpendicular_distance.PNG&diff=117134<p>L.a.oei@student.tue.nl: </p>
<hr />
<div></div>Sun, 06 Jun 2021 20:11:15 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/File_talk:Perpendicular_distance.PNGMobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117121
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117121<p>L.a.oei@student.tue.nl: /* Line Fitting */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
After a new segment has been found, a line is fitted through the laserdata points of this segment. The line is fitted via the linear least-square method:<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Fri, 04 Jun 2021 15:16:29 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117118
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=117118<p>L.a.oei@student.tue.nl: /* Line Extraction */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. Moreover, by using lines as features that consist only of two points, the amount of data to be processed for corner and entrance detection is reduced. This improves computational effort.<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Fri, 04 Jun 2021 12:35:56 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116344
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116344<p>L.a.oei@student.tue.nl: /* Line Extraction */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Thu, 20 May 2021 20:59:33 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116343
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116343<p>L.a.oei@student.tue.nl: /* Line Segmentation */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Extraction==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Thu, 20 May 2021 16:02:34 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116342
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116342<p>L.a.oei@student.tue.nl: /* The Algorithm */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Segmentation==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
===Segmentation===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Thu, 20 May 2021 16:02:17 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116341
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116341<p>L.a.oei@student.tue.nl: /* Line Segmentation */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Segmentation==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
<br />
===Pre-processing of Laser Data===<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
===The Algorithm===<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Thu, 20 May 2021 16:01:29 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116340
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116340<p>L.a.oei@student.tue.nl: /* Line Segmentation */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Segmentation==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm [1].]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Thu, 20 May 2021 15:59:45 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116339
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116339<p>L.a.oei@student.tue.nl: /* Line Segmentation */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Segmentation==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm.]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm is illustrated in Figure 2 and works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Thu, 20 May 2021 15:59:13 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116338
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116338<p>L.a.oei@student.tue.nl: /* Line Segmentation */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Segmentation==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm.]]<br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Thu, 20 May 2021 15:58:40 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116337
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116337<p>L.a.oei@student.tue.nl: /* Line Segmentation */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Segmentation==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
<math>=</math><br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm works as follows:<br />
<br />
[[File:Line segmentation algorithm.PNG|400 px|thumb|left|Figure 2: The line segmentation algorithm.]]<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Thu, 20 May 2021 15:58:17 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116336
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116336<p>L.a.oei@student.tue.nl: /* Line Segmentation */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Segmentation==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
<math>=</math><br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm works as follows:<br />
<br />
[[File:Line segmentation algorithm.PNG|500 px|thumb|left|Figure 2: The line segmentation algorithm.]]<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Thu, 20 May 2021 15:58:10 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116335
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116335<p>L.a.oei@student.tue.nl: /* Line Segmentation */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Segmentation==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
<math>=</math><br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm works as follows:<br />
<br />
[[File:Line segmentation algorithm.PNG|300 px|thumb|left|Figure 2: The line segmentation algorithm.]]<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected due to noise in a single wall. Increasing the threshold may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Thu, 20 May 2021 15:55:23 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116334
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116334<p>L.a.oei@student.tue.nl: /* Line Segmentation */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Segmentation==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
<math>=</math><br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm works as follows:<br />
<br />
[[File:Line segmentation algorithm.PNG|300 px|thumb|left|Figure 2: The line segmentation algorithm.]]<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected in a single wall. Doing this may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Thu, 20 May 2021 15:53:16 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116333
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116333<p>L.a.oei@student.tue.nl: /* Line Segmentation */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Segmentation==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
<math>=</math><br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm works as follows:<br />
<br />
[[File:Line segmentation algorithm.PNG|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected in a single wall. Doing this may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Thu, 20 May 2021 15:52:51 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6File:Line segmentation algorithm.PNG
https://cstwiki.wtb.tue.nl/index.php?title=File:Line_segmentation_algorithm.PNG&diff=116332
https://cstwiki.wtb.tue.nl/index.php?title=File:Line_segmentation_algorithm.PNG&diff=116332<p>L.a.oei@student.tue.nl: </p>
<hr />
<div></div>Thu, 20 May 2021 15:51:46 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/File_talk:Line_segmentation_algorithm.PNGMobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116331
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116331<p>L.a.oei@student.tue.nl: /* Line Segmentation */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Segmentation==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
<math>=</math><br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to step 2, but sets i_begin equal to one index further from the end of the last segment found. If it is not below the threshold, it goes back to step 3 and splits the line again.<br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected in a single wall. Doing this may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Thu, 20 May 2021 15:49:56 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116330
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116330<p>L.a.oei@student.tue.nl: /* Bibliography */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Segmentation==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
<math>=</math><br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to point 2, but sets i_begin equal to one index further from the end of the last segment found. <br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected in a single wall. Doing this may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno<br />
<br />
[3] Samuel T. Pfister, Stergios I. Roumeliotis, Joel W. Burdick - Weighted Line Fitting Algorithms for Mobile Robot Map Building and Efficient Data Representation - California Institute of Technology</div>Thu, 20 May 2021 15:47:14 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116329
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116329<p>L.a.oei@student.tue.nl: /* Line Segmentation */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Segmentation==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
<math>=</math><br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end [2].<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to point 2, but sets i_begin equal to one index further from the end of the last segment found. <br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected in a single wall. Doing this may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices [3].<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno</div>Thu, 20 May 2021 15:46:25 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116328
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116328<p>L.a.oei@student.tue.nl: /* Line Segmentation */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Segmentation==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
<math>=</math><br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end.<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to point 2, but sets i_begin equal to one index further from the end of the last segment found. <br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected in a single wall. Doing this may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room this is fine, because there are no such protruding walls. However, if there are thin protruding walls in the hospital challenge, a merging algorithm has to be implemented too. A merging criterion based on the chi-squared test is considered, which determines the difference between two lines based on their combined covariance matrices.<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno</div>Thu, 20 May 2021 15:45:37 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116327
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116327<p>L.a.oei@student.tue.nl: /* Line Segmentation */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Segmentation==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
<math>=</math><br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm [1]. The algorithm works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end.<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to point 2, but sets i_begin equal to one index further from the end of the last segment found. <br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
6. Lines consisting only of a few data points are thrown away. These lines are considered not reliable. <br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected in a single wall. Doing this may result in incorrectly indentifying a line between a wall and a small wall segment, e.g. a thin protruded wall. For the escape-room<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno</div>Thu, 20 May 2021 15:40:54 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116324
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116324<p>L.a.oei@student.tue.nl: /* Bibliography */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Segmentation==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
<math>=</math><br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm. The algorithm works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end.<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to point 2, but sets i_begin equal to one index further from the end of the last segment found. <br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected in a single wall. Doing this may result in incorrectly indentifying a line when a small wall segment is present.<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
<br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno</div>Thu, 20 May 2021 15:29:16 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116323
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116323<p>L.a.oei@student.tue.nl: /* Bibliography */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Segmentation==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
<math>=</math><br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm. The algorithm works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end.<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to point 2, but sets i_begin equal to one index further from the end of the last segment found. <br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected in a single wall. Doing this may result in incorrectly indentifying a line when a small wall segment is present.<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] http://ais.informatik.uni-freiburg.de/teaching/ss09/robotics/slides/feature_extraction.pdf <br />
[2] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno</div>Thu, 20 May 2021 15:29:11 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6Mobile Robot Control 2021 Group 6
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116322
https://cstwiki.wtb.tue.nl/index.php?title=Mobile_Robot_Control_2021_Group_6&diff=116322<p>L.a.oei@student.tue.nl: /* Bibliography */</p>
<hr />
<div>== Group Members ==<br />
<br />
Stefan van der Palen - 1501054 <br/><br />
<br />
Paul Munns - 1522795 <br/><br />
<br />
Saray Bakker - 1002248 <br/><br />
<br />
Liang Oei - 1522779 <br/><br />
<br />
Boudewijn Kempers - 1398164 <br/><br />
<br />
Walter MacAulay - 1632817 <br/><br />
<br />
== Design Document ==<br />
<br />
The Design Document: [[media:MRC_Design_Document_Group6.pdf]]<br />
<br />
= Escape Room Competition =<br />
<br />
For the Escape room competition two version were build, a smarter robot and a back-up version were the robot follows the wall. For both cases a 20 Hz execution rate is used.<br />
<br />
The general structure of the smarter robot is given below. First, an initial scan is performed to find the entrance of the hallway. If an entrance is found, PICO will receive a point where it can move towards via the states 'Move entrance rotation' and 'Move entrance forward'. How the exit is determined is explained in the section 'Line segments and entrance detection'. If no entrance is detected, PICO will perform a partial rotation of 30 degrees and start scanning again for an exit. When no entrance is found after performing a full scan of the room, it is likely that the entrance is not visible from the current position of the robot. In the state 'No entrance - move to free space', PICO will move forward towards a new spot and try to locate the entrance at the new position. <br />
<br />
If an entrance is detected, PICO will rotate until it faces the entrance and move forward. Since it should be taken into account that PICO might indicate an exit where there is none, an evaluation is performed after a few steps. If the entrance is still in front of the robot, PICO keeps moving forward. If the entrance is not directly in front of PICO due to drift, a rotation is performed before moving forward again. It could be possible that a false exit was detected before or PICO has drifted too much to still find the exit. Then a new full room scan is performed. <br />
<br />
PICO should avoid running into obstacles including static and dynamic objects. Therefore a function is designed that maintains a certain distance from all obstacles which is called 'bubbleRobot'. When PICO is too close to an obstacle, it will stop and move in the opposite direction. To avoid running into the obstacle again, the movement away from the obstacle is more than the distance to leave the bubble. When the robot has moved away from the obstacle, it will reevaluate its position. <br />
<br />
[[File:chart_escape_room.PNG]]<br />
<br />
<br />
==Line Segmentation==<br />
Line detection from data points is a fundamental task in many fields of science and engineering. In the case of the mobile robot, line detection algorithm is the underlying cornerstone for feature extraction, such as wall, corner and entrance detection. <br />
<br />
[[File:Pico_coordinates.png|300 px|thumb|right|Figure 1: The coordinate system used with the angular limits of the LRF.]]<br />
<br />
PICO acquires its data points via the laser range finder (LRF). The LRF outputs in one sweep 1000 data points, consisting of the distances (<math>r</math>) corresponding to particular angles (<math>\theta</math>), as shown in Figure 1. The first data point is at -2 rad and the last data point is at +2 rad. Invalid data points above 10 m and below 0.01 m are filtered out. The data points are then converted from polar coordinates to cartesian coordinates using the following geometric relations:<br />
<br />
x = <math>r</math> cos(-2 + <math>\Delta \theta</math>)<br />
<br />
and<br />
<br />
y = <math>r</math> sin(-2 + <math>\Delta \theta</math>)<br />
<br />
<math>=</math><br />
<br />
The line segmentation algorithm is based on the iterative end-point fit (IEPF) algorithm. The algorithm works as follows:<br />
<br />
1. A line is first drawn from the first data point (i_begin) to the last data point (i_end). This corresponds to -2 rad and +2 rad respectively when all data is valid, i.e. not filtered out.<br />
<br />
2. The perpendicular distances from the line are calculated for each data point between i_begin and i_end.<br />
<br />
3. The line is split at the point with the largest perpendicular distance from the line if it is above a certain threshold. <br />
<br />
4. If it is below the threshold, a line is found and the segment is stored. The algorithm goes back to point 2, but sets i_begin equal to one index further from the end of the last segment found. <br />
<br />
5. The algorithm repeats until all data points are considered, i.e. i_begin is now at i_end.<br />
<br />
This is also called the split-and-merge algorithm, but merging is not done. The drawback of omitting the merging part is that the threshold in step 3 has to be large enough in order to prevent multiple lines from being detected in a single wall. Doing this may result in incorrectly indentifying a line when a small wall segment is present.<br />
<br />
===Line Fitting===<br />
<br />
==Entrance Detection==<br />
<br />
<br />
Laser data can be quite noisy, which can result in a false detection of the entrance when just using one scan as input. Therefore a few scans after each other are performed. The median of the estimated angle and distance towards the entrance is used to plan the motion.<br />
<br />
The entrance detection algorithm uses the slopes of the walls to detect the entrance. Firstly the walls are detected via line segmentation of which the slopes can be calculated. For each segment (wall), the slope is compared to the slope of wall that follows next and also the slope of the wall that follows the next wall. So in total 3 segments are used for the algorithm. The following are compared;<br />
- The slopes are compared to each other if they are parallel/perpendicular in a certain bound. These bounds are introduced since the walls can be not perfectly parallel or perpedicular. These bounds also determine the robustness of the algorithm. <br />
- If the end-point of a segment is in a certain bound of the begin-point of the next segment. If these points differ a lot, this most likely will be an entrance and an entrance point is calculated. <br />
<br />
If there are more segments located, it will iterate through each segment and compares its slope with the following 2 segments. If there are 2 segments located, the algorithm will check if the system is parallel. If so, the system detects it as a hallway. Based on if a hallway is detected or an interance, a entrance point is calculated between the lines.<br />
<br />
[[File:Ezgif.com-gif-maker.gif]]<br />
<br />
= Hospital Competition =<br />
<br />
= Meeting Schedule =<br />
<br />
{| class="TablePager" style="width: 90%; min-width: 240px; margin-left: 2em; color: black;"<br />
|-<br />
! scope="col" | '''Date'''<br />
! scope="col" | '''Chairman'''<br />
! scope="col" | '''Secretary'''<br />
! scope="col" | '''Summary'''<br />
|-<br />
| 26-4-2021 || - || - || Introduction meeting<br />
|-<br />
| 28-4-2021 || Boudewijn Kempers || Paul Munns || First tutor meeting, dividing tasks for Design document<br />
|-<br />
| 3-5-2021 || Boudewijn Kempers || Paul Munns || Divide coding tasks: Perception (Liang and Paul), Path planning (Saray and Stefan), Initial/Main (Boudewijn and Walter)<br />
|-<br />
| 10-5-2021 || Paul Munns || Stefan van der Palen || Show functionality of wall following robot (dumb robot), show status smart robot which uses perception to find the entrance. <br />
|-<br />
| 17-5-2021 || Stefan van der Palen || Walter MacAulay || ..<br />
|-<br />
| 26-5-2021 || Walter MacAulay || Saray Bakker || ..<br />
|-<br />
| 31-5-2021 || Saray Bakker || Boudewijn Kempers || ..<br />
|-<br />
| 7-6-2021 || Boudewijn Kempers || Paul Munns || ..<br />
|-<br />
|}<br />
<br />
=Bibliography=<br />
[1] Tomáš Kubín, Martin Čapek, Jiri Stastny - Simple Distance Line-point Algorithm for Line Extraction from 2D Laser Data - Mendel University in Brno</div>Thu, 20 May 2021 15:24:20 GMTL.a.oei@student.tue.nlhttps://cstwiki.wtb.tue.nl/wiki/Talk:Mobile_Robot_Control_2021_Group_6