Code for Sprint 2
Dependencies: C12832 mbed rtos RangeFinder
README.txt@7:24d62ef1ed34, 2015-03-23 (annotated)
- Committer:
- Soldier7
- Date:
- Mon Mar 23 18:07:16 2015 +0000
- Revision:
- 7:24d62ef1ed34
Started up-down servo control. Not working. Readme added.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Soldier7 | 7:24d62ef1ed34 | 1 | = Issues: = |
Soldier7 | 7:24d62ef1ed34 | 2 | |
Soldier7 | 7:24d62ef1ed34 | 3 | * There are mainly two options to handle the camera. Detached from the lamp or attached to the lamp head. |
Soldier7 | 7:24d62ef1ed34 | 4 | The algorithm for the two, are very different therefore we have to consider it as soon as possible. |
Soldier7 | 7:24d62ef1ed34 | 5 | The following evaluation is about the detached one if we go with it. |
Soldier7 | 7:24d62ef1ed34 | 6 | |
Soldier7 | 7:24d62ef1ed34 | 7 | = The follwoing devices we should handle: = |
Soldier7 | 7:24d62ef1ed34 | 8 | |
Soldier7 | 7:24d62ef1ed34 | 9 | * Sonar sensor. We have to specify a working range where the detectable face can appear and should be followed. |
Soldier7 | 7:24d62ef1ed34 | 10 | This range approx. 70-250cm which have to be calibrated at the build time. |
Soldier7 | 7:24d62ef1ed34 | 11 | The working range data should be converted to between 0 and 1 value to easier manageable. |
Soldier7 | 7:24d62ef1ed34 | 12 | |
Soldier7 | 7:24d62ef1ed34 | 13 | * Camera. From the camera we are getting a horizontal and a vertical value of the tracked face from openCV to mbed, |
Soldier7 | 7:24d62ef1ed34 | 14 | which is the ratio value of the camera resolution between 0 and 1. |
Soldier7 | 7:24d62ef1ed34 | 15 | But because this is the position of the middle of the square around the face, it never 0 or 1, but around 0.1 - 0.9. |
Soldier7 | 7:24d62ef1ed34 | 16 | |
Soldier7 | 7:24d62ef1ed34 | 17 | * Pan servo. The pan servo should simply follow the face provided by the horizontal position. |
Soldier7 | 7:24d62ef1ed34 | 18 | |
Soldier7 | 7:24d62ef1ed34 | 19 | * Tilt servo. The tilt servo mainly similar with the pan, but it should be modified according to the neccessary |
Soldier7 | 7:24d62ef1ed34 | 20 | up-down movement. See the description below. |
Soldier7 | 7:24d62ef1ed34 | 21 | |
Soldier7 | 7:24d62ef1ed34 | 22 | * Up-down servo. The up-down servo should work together with the tilt one. There are many solution could be develop. |
Soldier7 | 7:24d62ef1ed34 | 23 | The following one is one of them. |
Soldier7 | 7:24d62ef1ed34 | 24 | If the distance of the face is close to the minimum, then the vertical movement should be mostly followed |
Soldier7 | 7:24d62ef1ed34 | 25 | by the up-down servo. If the face goes below or above the minimum-maximum position of the up-down servo, |
Soldier7 | 7:24d62ef1ed34 | 26 | then the out of range movement should be followed by the tilt servo. |
Soldier7 | 7:24d62ef1ed34 | 27 | As long as the face goes far, it should be more followed by the tilt servo and less with the up-down. |