Embedded Motion Control 2015 Group 3: Difference between revisions
Line 7: | Line 7: | ||
! | ! | ||
!<math>{{Check}}</math> | !<math>{{Check}}</math> | ||
!Remarks | |||
|- | |- | ||
|1.1 | |1.1 | ||
|Overview software architecture and approach | |Overview software architecture and approach | ||
| | |X | ||
|Should be check for (minor) errors | |||
|- | |- | ||
|1.2 | |1.2 | ||
|How does it map to the paradigms explained in this course? | |How does it map to the paradigms explained in this course? | ||
| | | | ||
|Still has to be implemented more clearly, I think | |||
|- | |- | ||
|2.1 | |2.1 | ||
|Description why our solution is awesome (nice images) | |Description why our solution is awesome (nice images) | ||
| | | | ||
|Don't know, could be more specific | |||
|- | |- | ||
|2.2 | |2.2 | ||
|Why unique/ what are we proud of? | |Why unique/ what are we proud of? | ||
| | | | ||
|Don't know, could be more specific | |||
|- | |- | ||
|3.1 | |3.1 | ||
|What difficult problems and how solved? | |What difficult problems and how solved? | ||
| | |||
| | | | ||
|- | |- | ||
|4.1 | |4.1 | ||
|Evaluation maze challenge (well/wrong/why/improvements?) | |Evaluation maze challenge (well/wrong/why/improvements?) | ||
| | |X | ||
|Finished I think | |||
|- | |- | ||
|5.1 | |5.1 | ||
|videos / gifs / animations / diagrams / pictures | |videos / gifs / animations / diagrams / pictures | ||
| | |X | ||
|Adding a animation would be nice | |||
|- | |- | ||
|6.1 | |6.1 | ||
|Link to interesting pieces of the code (use snippet system like https://gist.github.com) | |Link to interesting pieces of the code (use snippet system like https://gist.github.com) | ||
| | |X | ||
|Add code on scan subpage if necessary | |||
|- | |- | ||
|6.2 | |6.2 | ||
| Comment the code and add introduction/explanatory | | Comment the code and add introduction/explanatory | ||
| | | | ||
| | |Finished? | ||
} | |||
= Group members = | = Group members = |
Revision as of 17:13, 25 June 2015
This is the Wiki-page for EMC-group 3, part of the Embedded Motion Control 2015 course.
Checklist Wiki contents
[math]\displaystyle{ {{Check}} }[/math] | Remarks | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1.1 | Overview software architecture and approach | X | Should be check for (minor) errors | |||||||||||||||||||||||||||||||||
1.2 | How does it map to the paradigms explained in this course? | Still has to be implemented more clearly, I think | ||||||||||||||||||||||||||||||||||
2.1 | Description why our solution is awesome (nice images) | Don't know, could be more specific | ||||||||||||||||||||||||||||||||||
2.2 | Why unique/ what are we proud of? | Don't know, could be more specific | ||||||||||||||||||||||||||||||||||
3.1 | What difficult problems and how solved? | |||||||||||||||||||||||||||||||||||
4.1 | Evaluation maze challenge (well/wrong/why/improvements?) | X | Finished I think | |||||||||||||||||||||||||||||||||
5.1 | videos / gifs / animations / diagrams / pictures | X | Adding a animation would be nice | |||||||||||||||||||||||||||||||||
6.1 | Link to interesting pieces of the code (use snippet system like https://gist.github.com) | X | Add code on scan subpage if necessary | |||||||||||||||||||||||||||||||||
6.2 | Comment the code and add introduction/explanatory | Finished?
} Group members
General informationThis course is about software designs and how to apply this in the context of autonomous robots. The accompanying assignment is about applying this knowledge to a real-life robotics task. The goal of this course is to acquire knowledge and insight about the design and implementation of embedded motion systems. Furthermore, the purpose is to develop insight in the possibilities and limitations in relation with the embedded environment (actuators, sensors, processors, RTOS). To make this operational and to practically implement an embedded control system for an autonomous robot, there is the Maze Challenge. In which the robot has to find its way out in a maze. PICO is the name of the robot that will be used. In this case, PICO has two types of useful inputs:
In the fourth week there is the "Corridor Competition". During this challenge, students have to let the robot drive through a corridor and then take the first exit (whether left or right). At the end of the project, the "A-maze-ing challenge" has to be solved. The goal of this competition is to let PICO autonomously drive through a maze and find the exit. Group 3 was the only group capable of solving the maze. DesignIn this section the general design of the project is discussed. RequirementsThe final goal of the project is to solve a random maze, fully autonomously. Based on the description of the maze challenge, several requirements can be set:
Functions & Communication![]() The task are the most high level proceedings the robot should be able to do. These are:
The skills are specific actions that accomplish a certain goal. The list of skills is as follows:
Software architecture![]() Lets start with the Scan block:
Calibration![]()
![]() The noisy signal that was returned by the laser is presented in 'Figure 2 - Calibration'. Here, a part of the laser data is picked from a robot that was not moving.
Software implementationIn this section, implementation of this software will be discussed based on the block division we made. Brief instruction about one block can be found here. In addition, there are also more detailed problem-solving processes and ideas which can be found in the sub-pages of each block. Drive block![]() Two other methods were also considered: Simple method and Path planning. Especially, we worked a lot of time on the Path planning method. However, after testing, the potential field was the most robust and most convenient method.
Scan block![]()
PICO moves always to the place with the most space using its potential field. However, at junctions and intersections the current potential field is incapable of leading PICO into the desired direction. Virtual walls are constructed to shield potential path ways, than PICO will move to its desired direction which is made by the decision maker. To create an extra layer of safety, collision avoidance has been added on top of the potential field. Also, the scan block is capable of detecting doors, which is a necassary part of solving the maze. More detailed information about these properties:
Decision block![]() Input:
Output:
The used maze solving algorithm is called: Trémaux's algorithm. This algorithm requires drawing lines on the floor. Every time a direction is chosen it is marked bij drawing a line on the floor (from junction to junction). Choose every time the direction with the fewest marks. If two direction are visited as often, then choose random between these two. Finally, the exit of the maze will be reached. Mapping block![]() To do this, the Tremaux algorithm is used, which is an implementation of Depth First Search. The maze will consist of nodes and edges. A node is either a dead end, or any place in the maze where the robot can go in more than one direction (i.e., an intersection). An edge is the connection between one node and another, and as such is also called a corridor. An edge may also lead to the same node. In the latter case, this edge is a loop. The algorithm is called by the general decision maker whenever the robot encounters a node (junction or a dead end). The input of the algorithm is the possible routes the robot can go (left, straight ahead, right, turn around) and the output is a direction that the Mapping block considers the best option. In order to detect loops, the position of the robot must be known as well as the position of each node, to see when the robot has returned to the same location. This is decoupled from the Mapping block and done in the Localisation block. Since the localization did not work in the end, a Random Walk implementation was also made in the Mapping block. Localisation blockThe purpose of the localisation is that the robot can prevent itself from driving in a loop for infinite time, by knowing where it is at a given moment in time. By knowing where it is, it can decide based on this information what to do next. As a result, the robot will be able to exit the maze within finite time, or it will tell there is no exit if it has searched everywhere without success. The localisation algorithm is explained in on the Localisation page; by separating and discussing the important factors. A-maze-ing ChallengeIn the third week of this project we had to do the corridor challenge. During this challenge, we have to let the robot drive through a corridor and then take the first exit (whether left or right). This job can be tackled with two different approaches:
We chose the second approach. This implies that we will have to do some extra work to think about a properly structured code. Because only then the same script can be used for the final challenge. After the corridor competition, we can discuss about our choice because we failed the corridor challenge while other groups succeed. But most of these group had selected approach 1 and we already had a decent base for the a-maze-ing challenge. And this was proving its worth later.. For the a-maze-ing challenge we decided on using two versions of our software package. In the first run (see section Video's further down on the page), we implemented Tremaux's algorithm together with a localiser that would together map the maze and try to solve it. Our second run was conducted with the Tremaux's algorithm and localisation algorithm turned off. Each time the robot encountered a intersection, a random decision was made on where to go next. Run 1The first run is taped on video and can be seen here. The robot recognizes a four-way cross-section and decides to turn to the left corridor. It then immediately starts do chatter as the corridor was more narrow than expected. Next, it follows the corridor smoothly until it encounters the next T-juction. The robot is confused because of the intersection immediatly to its left. After driving closer to the wall, it mistakes it for a door. Because it (of course) didn't open, it decides to turn to right and explore the dead end. In the part between 20 seconds and 24 seconds in to the video, the robot is visibly having a hard time with the narrow corridor. It tries to drive straight but also evade the walls to the left and to the right. It recognizes another dead-end and turns around swiftly. It crosses the T-junction again by going straight and at 43 seconds it again thinks it is in front of a door. After ringing the bell, it waits for the maximum of 5 seconds that it can take to open the door. Now, it recognized that also this is a dead-end and not a door. After turning around it drives back to the starting position. Between 1:11 and 1:30, it explores the edges that he has not yet seen. Here, the Tremaux's algorithm and the localiser 'seem' to be doing their job just fine. Unfortunately, as can be seen in the rest of the video, something went wrong with the other nodes to be placed. It decides to follow the same route as the first time, fails to drive to the corridor with the door in it and eventually got stuck in a loop. Main reason for failure is thought to be the node placement. The first T-junction that the robot encountered made PICO go into its collision avoiding mode, which might have interfered with the commands to place a node. It is also possible that this actually happened, but that the localization went wrong because of all the lateral swaying to avoid collisions with the wall. It was clear that the combination of localisation, the maze-solving algorithm and the situation recognition by LRF was not yet ready to be implemented as a whole. Therefore, we decided to make the second run with a more simple version of our software, running only the core-modules that were tested and found to be reliable. Run 2For the second run, we ran a version of our software without the Tremaux's algorithm implemented and with the global localiser absent. These features were developed later in the project and were not finished 100%. For this run, a random decision was passed to the decision maker every time it asked for a new direction to head to. The second run can be seen here. Again the robot immediately decides to go left. Note that the first corner it takes in the corridor, between 0:02 and 0:04 are exactly the same. This is because the robot is driven by separate blocks of software. The blocks that are active during the following of a corridor were exactly the same for both runs. At 00:7, the collision detection works just in time to prevent a head on collision with the wall in front of PICO at the T-junction. Now, a random decision is made to go left, followed by a right turn in to the corridor with the door. It recognizes the door in front of it exactly as expected and stops to ring the doorbell. Although the door started moving immediately after ringing the bell, the robot is programmed to wait for five seconds until it is allowed to move again. During these five seconds, it used the LRF to check if the door moved out of its way. After the passage was all clear, the robot started exploring the new area. Now, the robot drives in to the open space. Note that, between 0:30 and 0:36, the robot made a zigzag manoeuvre. When it first drives into the open space, the potential field points at the center of this open space. Between 0:36 and 0:46 it drives in 'open space mode'. This means that the robot will drive to the nearest wall and starts driving alongside of it. It should thereby always find a new node where a new decision can be made. By doing so, it drives into a corridor. Note that at 0:47, the normal 'corridor mode' started working again. The potential field method will direct the robot towards the middle of the corridor. This explains the sharp turn it made at 0:47. After hearing the presenter ask to 'Please go left... Please go left?!?', the robot makes another random decision. As luck would have it, the random decision was indeed to go left. It slightly overturns, but the collision detection saves PICO from crashing into the wall yet again at 1:06. At 1:10, the well earned applause for PICO started as he finished the maze in a total time of 1:16! ExperimentsSeven experiments are done during the course. Here you can find short information about dates and goals of the experiments. Also there is a short evaluation for each experiment. Files & presentations
VideosExperiment 4: Testing the potential field on May 29, 2015. Maze challenge: Tremaux's algorithm, but failing to solve the maze. June 17, 2015. Maze challenge: Winning attempt! on June 17, 2015. EMC03 CST-wiki sub-pages |