Embedded Motion Control 2018 Group 4
Group members
TU/e Number | Name | |
---|---|---|
1032743 | Shuyang (S.) An | s.an@student.tue.nl |
0890579 | Leontine (L.I.M.) Aarnoudse | l.i.m.aarnoudse@student.tue.nl |
0892629 | Sander (A.J.M.) Arts | a.j.m.arts@student.tue.nl |
1286560 | Pranjal (P.) Biswas | p.biswas@student.tue.nl |
0774811 | Koen (K.J.A.) Scheres | k.j.a.scheres@student.tue.nl |
0859466 | Erik (M.E.W.) Vos De Wael | m.e.w.vos.de.wael@student.tue.nl |
Files
File:EMC Group4 Initial Design.pdf
Initial Design
Goal
The main goal of the project is to enable PICO to autonomously map a given room and subsequently determine and execute a trajectory to leave this room. For the initial Escape Room Competition, the predefined task is completed once the finish line at the end of the corridor is crossed. For the Hospital Room Competition, the goal is to map all rooms situated in the complex, after which the robot returns to a given position from where it must be able to identify a placed object in order to position itself next to it. However, both competitions include several constraints:
- The robot must complete the task without bumping into any walls.
- The individual tasks must be completed within five minutes.
- The robot should not stand still for more than 30 seconds during the execution of each of the tasks.
Plan
Escape Room Competition
1. Initially, PICO should make a 360° turn once, to gather information about the surrounding environment.
2. It should act accordingly depending upon the initial data that is gathered. The following three scenarios are possible:
- A wall is detected, then it should go to the nearest wall and start following it.
- A door is detected, then it should go to the door, cross the finish line and stop.
- Nothing is found, then it should move forward until it detects either a wall or a door.
3. While following a wall, the following two scenarios are possible:
- Another wall is detected, then it should start following the next wall.
- A door is found, then it should go through the door and cross the finish line.
Hospital Competition
1. Initially, PICO should make a 360° turn once, to gather information on the surrounding environment.
2. It should start following the wall along the corridor, until a new door is found.
3. Then, it should enter the room through the new identified door, and start following the walls of the room. While following the walls of the room, it should identify all the corners of the room from the data gathered, and then exit the room. Also, while performing this task it is possible that a new door is detected inside the room, then it should enter that room and follow the same protocol as mentioned before.
4. Once PICO is in the corridor again, it should start searching for new doors, and explore each of the room similarly as mentioned above.
5. While performing these tasks, PICO simultaneously needs to create a map of the whole hospital. Once the whole hospital is mapped, it should park backwards to the wall behind the starting position.
6. After that depending on the hint given, PICO should find the object in the hospital and stop moving close to it.
Requirements
In order to follow the plan and reach the goal that was defined earlier, the system should meet certain requirements. From these requirements, the functions can be determined. The requirements are given by:
- The software should be easy to set-up and upload to the PICO.
- The software should not get stuck in deadlock or in an infinite loop.
- PICO should be able to run calculations autonomously.
- PICO should be able to make decisions based on these calculations.
- Walls, corners as well as doors should be detectable. This means that the data provided by the sensors must be read and interpreted to differentiate between these items.
- Based on the sensor data, a world model should be constructed. Hence, this model should store information that functions can refer to.
- PICO should be able to plan a path based on the strategy and autonomous decision-making.
- PICO should be able to follow a determined path closely
- PICO should be able to drive in a forward, backward, left and right motion.
- PICO should be able to turn with a predefined number of degrees (-90°, 90°, 180° and 360°).
- PICO should also be able to turn with a variable angle.
- The speed of each of the wheels should be monitored.
- The total velocity and direction of PICO should be monitored.
- The distance moved in any direction by PICO should be monitored.
- Detect when and for how long PICO is standing still.
- PICO should be able to either drive the entire rear wheel across the finish line or to stop moving close to the designated object for respective competition types.
Functions
In the table below, the different type of functions are listed. A distinction is made between the difficulty of the function, i.e. low-level, mid-level and high-level functions. In addition a distinction is made between functions that depend on input for the robot and functions that determine the output.
Low-level | Mid-level | High-level | |
Input | Read sensor data |
|
|
Output |
|
Avoid collision |
|
Components and specifications
The hardware of the PICO robot can be classified into four categories, which can be seen in the table below.
Component | Specifications |
Platform |
|
Sensors |
|
Actuator | Omni-wheels |
Controller | Intel i7 |
The escape room competition features the following environment specifications:
- PICO starts at a random position inside a rectangular room, which features one corridor leading to an exit.
- The corridor is oriented perpendicular to the wall and ranges in width from 0:5 to 1:5 meters.
- The finish line is located more than 3 down the corridor.
Most notably, the differences between the escape room competition and the hospital room competition include:
- PICO will start in the hallway of the hospital.
- The hospital features three to six separate rooms.
Interfaces
The interfaces for the initial design and the information exchanged between each interface are depicted in Figure 1.
Mapping
Feature Detection
Split and Merge
1. preprocess data(laser,odom)
- remove overlaping points
- push_back() them into vector, both laser and odom
2. merge (optional)
- connect fron scan with back scan
3. find gap(processed_laser)
- if each two points' distance larger than threshold; $ r1^2+r2^2-2*r1*r2*cos(delta_angle) $
- true, write down the first point's index A, and next point's index B, store index in a vector
4. define section
- the first initial point Z is where laser scan begin, its end point is A from findgap()
- next section's initial point is point B from findgap(), its end point is maybe point C
- check the point number in each index, e.g. A-Z, or C-B, if the number less than threshold
- true, declare they are outlier, remove both initial and end point from index vector in findgap
- output: each section's initial point, end point's index (of whole data after merge()). may define a struct with two vectors, section.init, section.end
5. find corner and wall
- may need to convert to xy coordinate
- in each section, fit the line crossing intial point and end point; $ a*x+b*y+c=0 $, $ a=(y1-y2)/(x1-x2) $, $ b=-1 $, $ c=(x1*y2-x2*y1)/(x1-x2) $
- calculate the distance from line to each point within this section; $ abs(a*x0+b*y0+c)/sqrt(a^2+b^2) $
- find max distance, if smaller than wall threshold
- true, declare it's a wall between two points, goto next step;
- fales, declare it's corner, replace initial point with the found corner, go back to step 1 in this function, write down the max distance point's index.
- connect two points that declared as wall
- connect each corner points with increasing index within current section
- connect current section's initial point with min index corner point, and max index corner point with end point
Notes
Rosbag
- Check bag info: rosbag info example.bag
- Split rosbag: while playing large rosbag file, open a new terminal, rosbag record (topic) -a --split --duration=8
- Extract rosbag data:
- In linux, rostopic echo -b example.bag -p /exampletopic > data.txt, or data.csv;
- In matlab, bag = rosbag(filename), bagInfo = rosbag('info',filename), rosbag info filename