Mobile Robot Control 2020 Group 1

From Control Systems Technology Group
Jump to navigation Jump to search

Group Members

Name Student Number
1 T.J.M. Snijders 1017557
2 B.P.J. Reijnen 0988918
3 J.H.B. de Zwart 1020347
4 S.C.M. Mennen 1004332
5 A.C.C.E. Vissers 0914776
6 B. Godschalk 1265172

Introduction

This Wiki-page reports the progress made by Group 1 towards completion of the Escape Room Challenge and Hospital Challenge. The goal of the Escape Room Challenge is to escape a rectangular room as fast as possible without bumping into walls. The goal of the Hospital Challenge is to deliver medicines from one cabinet to another as fast as possible and without bumping into static and dynamic objects.

Logs

Meeting Date Time Chairman Secretary Summary Download
1 24-04-2020 15.00 - - Introduction
2 28-04-2020 15.00 - T.J.M. Snijders Introduction to tutor, discussed contents of Design Document Notes
3 01-05-2020 14.00 B. Godschalk S.C.M. Mennen Discussed software architecture Notes
4 03-05-2020 14.00 - - Discussed strategy for Escape Room Challenge
5 05-05-2020 14.00 - - Discussed Escape Room Challenge software structure
6 08-05-2020 15.00 S.C.M. Mennen B.P.J. Reijnen Notes
7 11-05-2020 14.00 - - Decided that the current solution for the escape room challenge is sufficient
8 12-05-2020 14.00 - - Last meeting before Escaperoom Challenge
9 15-05-2020 14.00 B.P.J. Reijnen J.H.B. de Zwart Start architecture and flow chart for Hospital Challenge
10 19-05-2020 14.00 - - Decided upon Hosptial Challenge strategy
11 22-05-2020 14.00 A.C.C.E. Vissers J.H.B. de Zwart Continue in same groups on specific parts
12 26-05-2020 14.00 - -
13 29-05-2020 14.00 J.H.B. de Zwart T.J.M. Snijders Discussion about presentation and Hospital Challenge
14 02-06-2020 14.00 - -
15 05-06-2020 14.00 T.J.M. Snijders B. Godschalk Continue with separate parts, more testing required
16 09-06-2020 14.00 - - Last preparation for Hospital Challenge
17 12-06-2020 13.00 - - Division of tasks for Wiki page

Design document

In order to get a good overview of the assignment a design document was composed which can be found here. This document describes the requirements, the software architecture which consists of the functions, components and interfaces and at last the system specifications. This document provides a guideline to succesfully complete the assignment.

Escape Room Challenge

Strategy

Strategy for Escape Room Challenge

To create a solid strategy a number of options have been outlined. Two solid versions were considered; wall following and a gap scan version. After confirming that the gap scan version can, if correctly implemented, be a lot faster than following the wall, the gap scan version is used in the escape room challenge since the goal of the escape room challenge is to escape as fast as possible. On the right the strategy flow has been mapped in a flow chart, which starts at 'Inactive' and ends at 'Move forwards' until the PICO (simulation) is stopped.

The first step that will be executed is the 'Initialize' step. This step will be used to clear and set all variable values to the default state from which it will continue to the '360° scan'. In this scan all Laser Range Finder measurements will be mapped into wall objects. When walls don not connect a gap occurs which can be a possible exit or a faulty measurement.

The next step 'Gap?' is checking if the gaps found can be considered as a exit. If no gaps meet the specifications of a gap, the next step will be 'Move to better scan position' and PICO will redo the previous steps. If a gap meets the specifications the next step is 'Path planning', which will be executed to calculate the best possible way to the exit. When the path is set the following step will be 'Move to gap'.

The final step will be 'Center?' which will center the robot in the corridor of the exit to prevent that incorrect alignment with the exit will result in a crash with the walls.

Parallel to this flow PICO will continuously keep track of objects with the laser range finder. Whenever a object is detected in a specific range of the robot a flag will be thrown. This flag can be used to update the path planning, which will prevent crashes when the robot is heading in the wrong direction.

The simulation

Simulation in emc-sim for Escape Room



With the created strategy in mind the first step was to find a way to detect the corridor of the exit in the Escape Room Challenge.

To differentiate between the walls and the exit a least squares regression line algorithm has been written. The Laser Range Finder (LRF) data points are fed into this algorithm and gives all the walls in the field of view (VOF) of the LRF. By connecting the walls together it can be possible that a gap occurs, which will be saved into the global reference frame. To collect the data the robot starts with a 360 degree VOF rotation, while doing so collecting all gaps. When the scan stops, all the collected gaps are checked based on some criteria to see if it is a door and if it is the best door possible and, if needed, fixed (straightened based on the adjacent walls). After founding the exit, the path planning calculates the needed angle and distance that needs to be driven to drive to the exit point. From there the robot rotates to the exit and starts moving towards the corridor connected to the exit (gap). When in between the walls, the robot starts to monitor the left and right wall to center itself between the walls of the corridor while moving towards the finish line. The invented strategy has been simulated in emc-sim and can be seen in the gif. The heightmap used for this simulation is shown below.



Escape Room heightmap used in emc-sim simulation




Escape Room no gap simulation in emc-sim

When the scan can not find any gaps in the walls, PICO will move 1 meter to the furthest point measured in the scan and performs a new scan. If, for any reason, PICO walks into a wall, the robot will move backwards and starts a new scan.

Escape Room Challenge results

Escape Room Challenge live stream result.

Immediately in the first attempt a record set of 55 seconds! After some doubt from the jury, whether a second attempt was necessary (since the robot did behave a bit strange outside of the corridor) the first attempt was declared valid. However, for us as a group the moving behaviour was partly confusing but in the end very proud of the result.

As can be seen in the scanning, the robot rotates in a smooth counterclockwise rotation in which the gap detection algorithm detects the exit. After validation of the gap, a pretarget and target are placed in relation to the detected gap location. However, after that, the movement towards it goes wrong. Better said the rotation. Normally, in the motion component of the software, the smallest rotation is calculated between the rotation of PICO and the pre- & target of the gap. During the development and validation of the written software in the simulator, this component worked as expected. However, during the challenge it emerged that the calculation did not work when comparing positive and negative angles. As a result, the calculation showed that a positive angle had to turn to negative in order to reach its target. Because of this problem PICO started to rotate 270 degrees to the right instead of 90 degrees to the left. This problem came up 2 times, both after the 360 degrees scan and after reaching the pretarget.

After the challenge we looked at this problem and applied a possible solution. If the simulation would be performed again with the right rotations the simulation time could be reduced to 25 seconds which would have resulted in a 2nd place during the challenge, instead of our 4th place that we placed this time.

In summary, every software component worked fine without failing completely. However, now after a bug fix in the motion component, everything works optimally without any known errors. Since the software is built via Agile, the wall detection and motion software can be taken to the hospital challenge and made usable with some additions without starting from scratch again. The used heightmap in the live stream Escape Room Challenge can be found below.

Escape Room Challenge live stream heightmap

Hospital Challenge

Will be updated on the go!

Hospital Challenge