Friday, 29 April 2016

sprint 3 Reflection David O Mahony

Author: David O Mahony
Team:    ESD 



Introduction 
This is a reflection of the final sprint for the team project. This sprint led on from the last and involves bug fixing from the last sprint and combining the setup of all team members’ modules in to one.  The outcome o this sprint will be to have the lamp finished and a working demonstration. Sadly due to time constraints not all modules were integrated in to the system. As time was critical I elected to drop the motor mask sound effects from the demo. As this would save time and found the TTOS more beneficial to the project. A demo video was created on the last day the shows the lamp introducing itself, look for a face, once seen it would follow the face and say “ I see you there” the light colour of the lamp would also change as the face moved from one position to another. If the lamp lost the face it would say “were have you gone”.
Tech reflection
Text to Speech
I was very happy with the outcome of the TTOS in sprint two and from the video of the demo it was seen that it could accurately tell the user the colour the camera could see. The demo for this sprint was to see a face and track it. For this i changed the code so it would have a rising edge and falling edge trigger. This would mean that the lamp would only speck once when it lost or found a face. From the demo video it seen that this works well and gives the lamp a personality. One flaw that was found was if the lamp lost the face for a split second it would speck even when it was unwanted. Away to stop this that would not take long to develop would be to put an increment in to the system that would have the system have to see a change for a cretin length of time before talking. Bar this change I was happy with the outcome of the model it worked very well and is easy to implement for any application.
            Motor sound effect mask
This code picks a random sound effect to be played when the motors work, after the second sprint there were some slight bugs. After these were removed the program was ready to be integrated. Due to timing issues and getting a working system together, the motor mask sound effect thread was dropped, this was due to the fact that I already had a working thread on the system and it was important for everyone to get something working.
Threads
Threads are a main component of a RTOS real time operating system, the RTOS controls the flow of the program and schedules the order in which the threads act. RTOS can also control for how long and using priority levels. When a thread with a high priority has to run it can set off interrupts that will interrupt threads of lower priority.
The thread system set up by Kamil is used throughout this sprint with each user creating, their own threads to be integrated into the project. The two threads I create rely heavily on other users outputs to decide on action to take. The TTOS thread checks the faces detect, object detects and colour detect threads to decide what to say. It has its own output values which are read by the motor mask thread. The motor mask thread reads the TTOS thread to make sure it is not talking and the motor moving thread to see that motors are moving when both these things happens the thread will play, Kamils over all architecture initialise the threads and has master control over the system.
IPC Inter-process communication
The threads use IPC’s to transfer values from one thread to another. This allows one thread such as the camera thread to create a variable sent this to another thread such as the TTOS were upon the TTOS can use the same variable to act on. The threads can read the IPC of other threads without changing them.
            Thread reading other variable set by other threads.
                ##input color true and value of color
                colorset = self.getInputs().colourDTC
                rvalue =colorset.R //sets variables from other threads to variables in this thread
                gvalue =colorset.G
                bvalue =colorset.B
            set the output variables of the thread
self.output("ttos", Obj("playing", playing))
// sets the name and object variables in
//in this case playing

Project management
In this sprint I tried to take on more of a leadership role. This involved regularly talking to each team member to ensure that nobody was stuck and to help were needed. In the start of the final week we made a push to combine the project. This is something I would not have done before but have built up the confidence to do over the past few months. It was decided to work towards getting the face tracking demo setup this involved setting up the camera board and motor control board simultaneously. Once the camera board was setup it was possible to test the comms setup by using another raspberry pi to receive the signal as a test. From this test it was possible to confirm the comms were working and was able to integrate the TTOS module I created and to test its workings. After sprint two each team worked on their respective parts and refined them fixing bugs found. People worked closer together in this sprint compared to other sprints. This was due to people needing to combine their work with other peoples to test and to complete the project.
Through talks with Luke it was decide to create a modified version of his setup to change colour of the led to mach face movement. This would then show the work of Luke’s code in the main demo.
After this the board with the camera setup and the motor control boards were connected and setup was tested. There were slight bugs found with different issues.
Once the system was at demo able stage the boards and hardware were transferred to the lampbot body with the final setup built. This setup was tested and a video recording made of its operation.
The combining process was a slow process which took time and patience for everyone involved in the setup process, my thanks to all who put the hard work in necessary for the demo to be achieved.

Conclusions
While not all aspects of the project were complete, I believe that the demo video shows a system with great potential. A lot of head way was made on new features that future teams can take and fully integrate and improve upon. I believe that next year if the lamp is under taken they can take the current system and complete the game idea we had hoped to archive with relative ease. 
I am proud of the hard work the team put in getting the system setup and the prototype demo we created.  I am happy with the two modules i created especially with the way the TTOS thread turned out and can see it being implemented in to the project in future years in interesting ways.
From doing projects I have learnt to be more patient with people and to better recognise when people need help.

Mottos for the future:
Always move forward.
Keep it simple.
Don’t let a failure hold you back.


David O'Mahony entry 9

Past entry:





No comments:

Post a Comment