Embedded Motion Control 2019 Group 5: Difference between revisions
Line 4: | Line 4: | ||
==Group members== | ==Group members== | ||
{| | {| border="1" cellpadding="5" cellspacing="1" style="float:left;" | ||
! scope="col" width="200" | Name | ! scope="col" width="200" | Name | ||
! scope="col" width="200" | TU/e Number | ! scope="col" width="200" | TU/e Number |
Revision as of 14:54, 18 June 2019
Welcome to the Wiki Page for Group 5 in the Embedded Motion Control Course (4SC020) 2019. This page contains the design plans and other details of our work in this course.
Introduction
Group members
Name | TU/e Number |
---|---|
Winston Mendonca | 1369237 |
Muliang Du | 1279874 |
Yi Qin | 1328441 |
Shubham Ghatge | 1316982 |
Robert Rompelberg | 0905720 |
Mayukh Samanta | 1327720 |
Introduction
The world around us is changing rapidly. The new technological possibilities triggers new ways of life. These innovations, like self driving cars, could make life easier but also safer. In this course we have programmed a robot to assist in the hospital, instead of a self driving car. However, autonomous robots in a hospital environment could decrease the amount of mistakes in a hospital. If the robot is programmed correctly, it could deliver the right medicines to the right patient. Also, since a robot never sleeps, patients could get their medicine at night, if they need something for the pain for example. In our challenge we had program a robot (PICO) which is able to drive to different cabinets (hence patients), recognize the different cabinets and recognize it has arrived (hence delivering the medicine.)
Overview of Wiki
The wiki will cover the main topics regarding our project. Several functions which are crucial for the program are discussed in detail. Furthermore the challenges are described in detail, the strategy applied is covered, the results are covered and also some thoughts for improvements are given.
Task Requirements
In the following section the task requirements of the PICO are given.
Generic
The following performance requirements are expected to be met for the:
- PICO should be able to leave the room from any initial position.
- PICO should not hit the wall of the room, the corridor or (dynamic/static) objects under any condition.
- PICO should not remain idle for more 30 seconds.
- PICO should be able to move translational with a speed of 0.5 m/s and rotational with a speed of 1.2 rad/s.
- Only one executable has to be called in order to start.
Escape Room Challenge
The following performance requirements are expected to be met for the Escape room challenge:
- The rear wheels of PICO have to pass the finish line
- PICO should complete the task within 5 minutes.
Hospital Challenge
The following performance requirements are expected to be met for the hospital challenge:
- PICO should determine its position with respect to its surroundings (walls, obstacles, etc.)
- PICO should determine its position on the global map in the world model.
- When PICO visits a cabinet, it should give a clear sound of which cabinet it is visiting (i.e.,“I have visited the cabinet zero”).
- PICO has to make a snapshot of the map once a cabinet is reached.
- PICO should reach all the cabinets in a correct order.
- PICO should be able to detect the obstacles.
- PICO should not hit any walls and objects except for slightly touching.
- PICO should try to detect the static and dynamic objects and present them in its own world model.
- PICO should complete the task within 10 minutes.
Hardware Description
PICO has several components which are:
- Sensors:
- Proximity measurement with Laser Range Finder (LRF)
- Motion measurement with Wheel encoders (Odometer)
- Control Effort Sensor
- Actuators:
- Holonomic Base - Omni wheels that facilitate 2D translation and rotation
- Computer:
- Intel i7 Processor
- OS: Ubuntu 16.04
- Interaction
- PICO has the ability to produce sound through a speaker in its body
- PICO has a display, mounted on top of the robot
Software Architecture
World Model
Functions
Measurement
Mapping
Planning
Actuation
Additional Functions
Escape Room Challenge
Link to Challenge Description
Challenge Strategy
State Diagram
End Result and Future Improvements
Hospital Challenge
Link to Challenge Description
Challenge Strategy
State Diagram
End Result and Future Improvements
Initial Design of Escape Room Competition
A brief summary of embedded software functions design is described in the following chapters.
Design Document
The Initial Design Plan for the Escape Room Competition and the Hospital Competition with PICO could be found here.
Functions
Function | Description | |
---|---|---|
High-level | Detect Wall | Set a safe distance between wall and PICO. If there are too closer with each other, PICO would execute corresponding movements. |
Detect Corner | Detect the number of corners of the room. | |
Startup | Identity the initial angle of PICO in the start position. And then, compute an angle -- θ. | |
Scan for Exit | Rotate PICO to detect all the distances between wall and robot in order to find the exact position of the corridor. | |
Move to Max | If PICO do not detect enough walls in the room, it will move to the direction of the maximal distance and detect walls again. | |
Face Exit | Let PICO face to the exit corridor straightly but not perfectly. PICO would not rotate itself in a defined error range. | |
Drive to Exit | PICO moves to the exit. | |
Enter Exit Corridor | Enter the exit corridor with a safe range between the walls of the corridor and PICO itself. | |
Follow Corridor | Follow the walls of the corridor with a safe range until PICO crosses the finish line. | |
Low-level | Initialize | Initialize actuators |
Read Data of Sensors | Read the odometer and laser data | |
Drive Forward | Move straightly | |
Drive Backward | Move back | |
Drive Left | Move left | |
Drive Right | Move right | |
Turn Left | Turn 90°left | |
Turn Right | Turn 90°right | |
Turn Around | Rotate | |
Stop Movement | Stop current movement. |
Interfaces
Escape Room Challenge Execution
- Introductions about functions of code. Explain each mode more or less in order to let readers know what happened in our PICO. Just like what Winston did in Tuesday evening. -- YI
Startup
This mode involves computing the required angle for PICO to complete a full 360 degree view if needed. Once the angle has been determined the state switches to SCAN_FOR_EXIT.
Scan for exit
This mode searches for an exit in its available field of view which is around 230 degrees. If it does not manage to find an exit in this field of view, it uses the angle computed in the STARTUP to complete to rotate until it manages to find the exit. If it happens to be the case that it still did not manage to find any exit it switches to a state MOVE_TO_MAX. This scenario is generally encountered if PICO is initially put in a corner adjacent to the exit wall.
Move to max
Face exit
Exit undetectable
Orient to exit wall
Drive to exit
Enter exit corridor
Exit corridor follow
Stop
Results
During the escape room challenge we were able to escape the room and won the first prize. The first try our robot bumped into the wall, so we had to lower the speed of the robot. The second time the robot reached the exit without bumping into the wall. This lead to an improved code for the actuation of the robot.
Hospital Competition
The main objective for PICO is to "deliver" the medicines from one cabinet to another which will be defined by the judges just before the challenge starts. The PICO will be operating under an environment amidst static and dynamic obstacles.
Software architecture
The main components of our architecture are the world model, the planning, the mapping, the measurement and actuation parts. The world model contains all the data of the environment and data like the position of the robot. The mapping module ensures the world model is updated and a map is provided. The planning ensures a path is planned from the current position of the robot towards a certain goal. The measurement part feeds data and some basic information into the word model and the actuation ensures the robot actually moves. These components will be worked out in more detail below.
World model
The world model contains all the data of the environment and the robot like its position. From the world model information is sent towards the other blocks, which process them and provide new information to the world map.
State machine
Measurement
For the measurements the laser range finder present on the PICO is used. This data is received in an array, where the indices contribute to some angle and the value of the second column present the distance to the nearest point in that direction. For calculating the angle the range of the PICO is determined during the configuration state. Once this is done, the total angle is divided by the angle increment of the PICO to determine the length of the array and multiplied again to know the angle. From the angle and the radial distance a set of Cartesian coordinates can be calculated which are used in the localization and planning parts.
Planning
To be able to plan a path the A* algorithm is used.
Mapping
we create two types of map
1.Global map.
2.Local Map
Global Map
In order to implement the A* path planning algorithm, the given map, which is in the form of a json file, is converted into a binary map. The objects of the map is given based on points with x and y coordinates. The walls and cabinets are described with lines, where the lines are defined by the start point and end point.
The first step to build the binary map is to find the range of the map. Therefore,
This is created using the Json file , which contains the x,y coordinates of the points which make up the wall and cabinates.
Using the x,y coordinates of the points we create the binary map made up of 1's and 0's where 1's represent any sort of obstacle such as walls or cabinates.
Local Map
This is created from the laser data provided the LRF .
We convert the LRF data to cartesian cordinates which in turn is used to convert it to binary map made up of 1's and 0's.
This map is used to identify any sorts of unknown structure which can be added to the global map for path planning.
Actuation
Results
Improvements
During the project the implementation ideas changed a lot. It is advisable to come to an agreement of the final implementation as soon as possible.