Thor smith notebook - snowpuppy/augreality GitHub Wiki

Table of Contents

Summer Work

Summer Work Summary

  • Accomplishments:
    • Ran preliminary tests on XBee wireless devices.
    • Outlined preliminary functional design for the CCU (Central Control Unit).
  • Summer Work Total: 13 hrs
  • Project Work Total: 13 hrs

Week 01

  • Aug 22, 2013 (1 hr) Meeting to work on Project Proposal
  • Aug 23, 2013 (2 hr) Meeting to discuss interface for CCU and Headsets.
  • Aug 24, 2013 (4 hr) Meeting to test XBee devices, set up notebooks, and discuss CCU/Headset interface.

Week 01 Summary

  • Accomplishments:
    • Completed Preliminary Project Proposal.
    • Worked on interface between CCU and Headsets.
  • Weekly Work Total: 7 hrs
  • Project Work Total: 20 hrs

Week 02

  • Aug 28, 2013 (1 hr) Created final project proposal based on draft.
  • Aug 29, 2013 (1 hr) Finalized final project proposal.
  • Sept 1, 2013 (1 hr) Tested XBee device performance from Parking Garage to open field.
  • Sept 2, 2013 (3 hr) Meeting to analyze parts needed and start working on data formats.

Week 02 Summary

  • Accomlishments:
    • Completed Final Project Proposal.
    • Worked on deciding configuration settings for XBee.
  • Weekly Work Total: 6 hrs
  • Project Work Total: 26 hrs

Week 03

  • Sept 3, 2013 (1 hr) Created preliminary PSSC presentation.
  • Sept 4, 2013 (1 hr) Edited PSSC presenation to match feedback from instructors.
  • Sept 7, 2013 (3 hr) Tested 5dbi antennas with XBee devices and analyzed XBee configuration.

Week 03 Summary

  • Accomplishments:
    • Completed PSSC Presentation.
    • Ordered bigger 5dbi antennas for XBee.
    • Worked on XBee configuration.
  • Weekly Work Total: 5 hrs
  • Project Work Total: 31 hrs

Week 04

  • Sept 14, 2013 (3 hr) Worked on researching/designing headset packaging.
  • Sept 15, 2013 (3 hr) Worked on building a headset prototype using a baseball cap, project box, reflective glass, and lcd screen. Plastic, putty, and tape were used to hold the screen inside the project box which was attached to the bill of the hat. Part of the hat's bill was cut out so that light could come down to reflect off the glass. The glass was suspended from the project box at an angle using tape.

Week 04 Summary

  • Accomplishments:
    • Talked to DigiKey about wireless range. DigiKey suggested an online resource and informed me that a combined height of 8 feet will get 300 meters for our wireless devices. One mile will require a combined height of 32 feet.
    • Built headset prototype and researched materials to use in headset construction.
  • Weekly Work Total: 6 hrs
  • Project Work Total: 37 hrs

Week 05

  • Sept 21, 2013 (3 hr) Continued research on clarifying packaging details. A couple mechanical design ideas were considered for making the angle of the glass adjustable on the headset. Both ideas involve putting the glass in a plastic frame that can be attached to by a metal or plastic connector. Idea one involves using a hinge from the project box in the front of the headset that will allow the glass to rotate. The plastic frame will require a special tab to allow for this. The disadvantage to this design is that the glass can not be moved up/down. Idea two involves using a thin metal bar with a slot inside. The metal bar is attached to the headset above the ear using a wing nut so that the angle at which the bar comes off can be adjusted, allowing the glass to be adjusted in an arc in front of the users view. The other end of the metal bar with the long slot will be connected to the plastic frame housing the glass using a wing nut. This wing nut will allow the glass to rotate in place for adjusting the viewing angle. Currently, idea one is more popular because it is simpler to build mechanically. It is also possible that the added functionality of idea two may not prove necessary. The headset prototype has been built with a cloth baseball cap. The goal currently is to change this to a plastic baseball helmet. It is necessary to have a bill that is long enough to hold the project box with the lcd.
  • Sept 22, 2013 (1 hr) Worked with Alec Green in an attempt to get the f4 microcontroller environment started to work on translating the data from the 9dof to a useful format.

Week 05 Summary

  • Accomplishments:
    • Started ordering parts that will be needed for the pcb and for development.
    • Worked to explore other ideas for packaging to find a superior option to the current prototype.
  • Weekly Work Total: 3 hrs
  • Project Work Total: 40 hrs

Week 06

  • Sept 28, 2013 (5 hr) Worked with Steven Ellis on packaging design. Based on the materials needed, a list of hardware stores was generated that included Menards, Hobby Lobby, and a Sports store. The list was generated based on the need for a plastic helmet, hinges, and other various pieces. A stop was made to Autozone to look at the tinting plastic for vehicles to see if it was suitable for reflecting light based on knowledge that a previous senior design team used tinting for reflection. The material found at autozone was deemed too absorbant of light and not reflective enough. A store close by was recommended and should be visited to get more information about tinting and reflection. Hobby Lobby did not have any practical items that could be used for the packaging design, but did stimulate thought on other methods of mounting. Menards has a variety of tools and metal in various shapes and sizes. Clarification on sizes and shapes of metal that could be sold was found in visiting Menards, particularly on the size/shape of hinges. Acrylic was purchased in the hopes that it could be coated with a reflective material. The advantage to acrylic is that it is easier to cut than real glass. Steel rods were purchased with the intention of using them to help secure mountings to the helmet. Three hats were considered at Menards: two kinds of welding masks and a hard hat. The hard hat was purchased because it was very cheap, provided plastic for mounting, and did not obscure peripheral vision. It was determined that significant experimentation in packaging design will be required to make a visually appealing, physically sturdy, and functionally sound product.

Week 06 Summary

  • Accomplishments:
    • Most ordering of parts for pcb and development was completed. These items can be seen listed on the Hardware Research page. More progress was made on the design of the headset packaging. Parts were purchased for headset packaging.
  • Weekly Work Total: 5 hrs
  • Project Work Total: 45 hrs

Week 07

  • Oct 4, 2013 (5 hr) An initial timeline was created outlining the tasks left to be completed for the project. Care was taken to break up large tasks into smaller tasks and to work around dependencies. The type of tasks were broken into three categories: PCB Hardware Tasks, GPU Tasks, Data Processing Tasks, and CCU Tasks. All of these tasks are drawn in the spreadsheet as happening in parallel. The course calendar was also plotted on the timeline alongside group objectives. This allows the team to actively synchronize work with course objectives. The spreadsheet was created in Libre Office and saved as a xlsx file so as to be compatible with Microsoft Excel. Three sheets were used. The first sheet is a schedule/timeline of dates and tasks to be completed on those dates. The second sheet is just a list of tasks. The third sheet is a Gantt Chart designed to construct how tasks depend on each other and approximately how long each task is expected to take. The separation of these three helps in creating new tasks, aligning them with existing tasks, and scheduling them by allowing one to focus on each step individually. An analysis of the GPS resolution was also completed. Wikipedia was referenced to decide how data from the GPS will be represented in software. Since the GPS resolution gives about 2 decimeters worth of accuracy, it was decided that this could be stored in a 16bit integer in units of decimeters. A sample calculation was done to sample GPS values using values extracted from google maps. The values calculated using constants from the Wikipedia page linked above for meters/deg of lattitude and meters/deg of longitude were within 1 meter of accuracy. The python file running the calculation is here.
  • Oct 5, 2013 (4 hr) A meeting was scheduled to discuss packaging and Design Reviews. The schedule was presented at the meeting. Progress was made on the packaging for the headset using the materials from Menards. A collaborative effort between Thor and Steve attached aluminum rods to a hard hat. A hack saw was used to cut the aluminum to the correct size for the project box to be mounted. Extra length was also reserved for the back of the hat for mounting the GPU, pcb, and battery. A drill press was used to cut holes for screws into both the aluminum rods and the hard hat. A hand rotary tool was used to sand burs created by the drilling and to smooth out the rough aluminum created by the hack saw.
  • Oct 6, 2013 (4 hr) Thor and Steve met to continue working on the headset packaging. In a joint effort, the framework for the project box to rest and the lcd screen was added to the existing packaging. A hack saw was again used to cut the aluminum rods. A drill press was used to cut holes for screws. A pen was used to mark areas on the aluminum that needed to be drilled or cut. A file was used to smooth out rough aluminum. The bottom of the plastic project box was cut in such a way as to support the lcd screen, but allow the screen to show through. The project box was cut with a drill press and hack saw and a file was used to eliminate rough areas. The area to cut on the project box for the lcd screen was outlined using a paper trace of the front of the lcd screen. The lcd screen was then taped to the project box to prevent sliding. The result was a very solid mounting of the lcd screen to the hard hat. Remaining work includes: removing the bill of the hard hat, mounting a piece of glass to the framework at an angle, and mounting the enclosure for the GPU, battery, and pcb board.

Week 07 Summary

  • Accomplishments:
    • A timeline for project completion was created. Significant progress on packaging was completed. The prototype is nearly complete. An investigation on practical GPS performance was made. It was found that constants from Wikipedia are reliable for making distance calculations.
  • Weekly Work Total: 13 hrs
  • Project Work Total: 58 hrs

Week 08

  • Oct 12, 2013 (3 hr) The pcb was reviewed with Stephen Carlson present. Minor changes were made by Stephen Carlson. The packaging status was addressed. It was determined that additional materials were needed to complete the prototype. An attempt was made to measure the width of the box needed to house the battery, pcb, and raspberry pi by stacking the batteries on the bottom and putting an xbee on top of the raspberry pi. It was dtermined that there should be decent air flow between the raspberry pi and the battery. It was found that the headers in the lab needed to be taller for our pcb to properly sit on the raspberry pi because the composite connector will interfere otherwise. Two ideas were generated: desolder the composite connector and either make it shorter or solder wires to the composite connection points, and get taller headers. A quick search was made online and tall headers for the raspberry pi were found on Adafruit. The bill of the hard hat was cut off. Additional materials needed to complete the headset package are: hinge to mount acrylic, an additional aluminum rod, and a reflective film for the acrylic. A search on Amazon revealed a promising result. A trip to Menards was also conducted that yielded additional possibilities which will be finalized tomorrow.
  • Oct 13, 2013 (8 hr) Work on packaging experimentation continued. It was found that the display of the raspberry pi could be inverted on the y axis by adding "display_rotate=0x10000" to the config file. See raspberry pi config documentation here. A preliminary trial with a foggy piece of acrylic was performed to see the display. The acrylic was taped to the headset. A trip to Menards was made and platinum window tinting was purchased along with two hinges. Mirror tinting was also available at Mendards, but it was determined that the transparency was too low. The reflection for the platinum tinting was determined sufficient. The hinges were attached to the headset as displayed in the pictures below. Acrylic was cut to fit the headset using a hack saw. A drill press was used to put holes in the front of the headset and into the acrylic for attaching the acrylic while allowing it to swing to an adjustable angle. The angle was fixed using masking tape attached to the headset and the acrylic. The window tint was applied to the acrylic, but due to inaccurate placement there were several air bubbles.

Week 08 Summary

  • Accomplishments: A material for reflecting the picture for the lcd was chosen and purchased. The headset was modified to add the reflective surface hanging at an angle. It was found that the raspberry pi has a setting to tell its gpu to flip the display on the y axis. The headset display was tested for quality.
  • Weekly Work Total: 11 hrs
  • Project Work Total: 69 hrs

Week 09

  • Oct 14, 2013 (2 hr) Progress was made on the Cornell Cup application with Stephen Carlson. Many decisions about how the design will change for the Cornell Cup competition were made, such as the elimination of the central control unit. It was decided that I would update the timeline to add more detail for Cornell Cup.
  • Oct 15, 2013 (5 hr) The current timeline was updated with work for the following semester. A significant effort was made to ensure that task dependencies were considered for next semester and to break down the tasks that are expected.
  • Oct 16, 2013 (6 hr) Modifications were made to the current headset. The acrylic used for the display was cut shorter because it was found that it had to sit on the user's nose for the user to be able to see the lcd screen properly. The screen was re-applied by Carlson and Thor in an attempt to eliminate bubbles. The work was successful, but it also created stretch marks on the window tint that reflected colorful light. For display purposes, this is largely unnoticeable when viewing the screen with one's eyes. The problem was found when attempting to photograph the lcd reflecting off of the acrylic. The Cornell Cup application was re-approached and changes were made to update pictures and update the software section. Flow charts and a state diagram were completed to describe the overall expected flow of the software.
  • Oct 19, 2013 (2 hr) A meeting was held to discuss the current progress of the software for the project. Stephen Ellis finished creating an openGL program for moving pacMan on a fixed path per the deadline on the timeline. Progress was made on the gui design for the central control unit, but it was decided to push this work back in favor of completing the software design narrative for the following week. The environment for the STM32F4 micro-controller was configured on Thor's netbook in Windows.

Week 09 Summary

  • Accomplishments: The Cornell Cup application was submitted. The headset packaging was further enhanced and viewing was tested with a Fresnel lens. Progress was made on the design of the user interface for the central control unit and the interface components for the central control unit were purchased.
  • Weekly Work Total: 15 hrs
  • Project Work Total: 84 hrs

Week 10

  • Oct 22, 2013 (5 hr) More research was done on the STM32F4 in preparation for the software design narrative. The documents collected can be found on the Software Design page. The flow of the software required on the STM32F4 was analyzed specifically. A flow chart was created to describe the operation of the software on the STM32F4. It was determined that lots of examples and current work existed, but a significant portion of communication work needs to be completed. Data collection examples have been written for most sensors. A presentation was prepared for the software design review.
  • Oct 23, 2013 (2 hr) Adjustments were made to the presentation that modified the order of the slides and corrected the locations of program data and the stack in memory.
  • Oct 24, 2013 (5 hr) A new diagram was created to reflect the software hierarchy. This diagram has three trees because there are three separate pieces of hardware for which software is being developed: the GPU, the CCU, and the STM32F4. The software design narrative was completed.
  • Oct 27, 2013 (5 hr) A framework was put in place for the central control unit's gui. A state variable is used to transition between screens through the use of the "Enter" key. This had to be redesigned from a previous sketch because it was realized that traditional mouse input gui representations could not be used. All of the inputs will be numeric to compliment the numeric keypad used for input. All events for the gui will be key events. An initial design has been created that represents the expected behavior. It is noted that Tkinter automatically resizes a window to fit its contents. This may be undesireable and may be changed later. Tkinter offers grid, absolute, and pack fitting arangements. I chose a grid arangement because I expect that all of the items to be displayed will be displayed in a tabular fashion. Absolute placement is avoided because it is difficult to adapt to a different window configuration. Packing was avoided because of it's innacurate method of placing items. Effbot.org and the python built-in documentation were the primary references used when creating the design.

Week 10 Summary

  • Accomplishments: Additional research was performed on the operational modes of the STM32F4 and the register setting available. A new diagram was created for the flow of software on the STM32F4. Another diagram was created to reflect the hierarchy of software being designed for the project. The software design narrative was completed. A preliminary framework for the central control unit gui was created.
  • Weekly Work Total: 17 hrs
  • Project Work Total: 101 hrs

Week 11

  • Oct 28, 2013 (4 hr) Additional work was done on the central control unit's gui. All of the numeric key bindings were added. Additionally, a key binding to backspace was added to allow the user to go back to previous screens. Most of the screens to be used were implemented. The result looks very minimal and will need to be made prettier in the future. The remaining work for the gui depends on receiving wireless data from the headsets and also depends on having a simulation that works. It is intended that the gui and simulation will talk to a wireless module through dbus. More research is needed to find out exaclty how the interface to dbus works. If it seems too much work, then information that needs to be passed between programs could be written to a file. There are currently 4 screens: Welcome, select headsets, select simulation, and run simulation. The transition between each screen is implemented. There is no underlying functionality for the numeric key events.
  • Nov 1, 2013 (5 hr) Preliminary work was done to research the implementation of the wireless module on the central control unit. Data was has been sent to the XBee through minicom and pyserial. Research was performed on sending data using C through linux's APIs. A meeting took place between Thor, Ellis, and Carlson. The PCB has now been completely populated. All pieces were put on the unit for final packaging measurements and considerations of the final box to be built. The three performed a gps test outside. The test consisted of walking on a fixed path through the engineering mall. A gps log was collected of the longitude and latitude coordinates. Ellis fed the coordinates into his OpenGL demo to send a 3d cube along the path we had taken outside. The cube was given a relative size of 1m^3. The resulting animation was deemed acceptable. Further testing will tell if the final result is as good as this initial test.
  • Nov 2, 2013 (8 hr) Significant effort was put forth in implementing wireless drivers for the Xbee. Broadcast packets from the headset were successfully collected by the CCU. Research and experimentation tell me that floating point values are NOT safe to send over the network. All data values sent over the network should be integers or strings. The endian of the raspberry pi is the same as the STM32F4. It was also found that simply passing all of the bytes in a structure is not safe because some structures are packed with zeroes to increase speed when reading their values. Functions will need to be created for each packet to turn it's corresponding structure into a byte stream that can be sent over the network. Further testing needs to be done on the reliability of the network and a load test will need to be completed as well. Additionally, more progress was made on headset packaging. An attempt was made to 3d print a box for the PCB to be attached on the back of the headset. The 3d object was created in sketchup by Ellis. The print failed for unknown reasons. It is possible that the software used to export the 3d object performed poorly. As a last resort, a cardboard box was cut into the desired shape to house the PCB, raspberry pi, and the battery. The box was cut with scissors and taped to the back of the headset. The last aluminum support was cut and attached to the aluminum frame with screws. The headset packaging now closely resembles the final design. A last effort to create a solid box for the PCB and an effort to remove all masking tape needs to be made.

Week 11 Summary

  • Accomplishments: The ccu's gui was created and basic functionality was added. Code for sending broadcast packets from the headset to the ccu was written. This needs to integrated with the ccu gui. A basic package for the pcb was created out of cardboard.
  • Weekly Work Total: 17 hrs
  • Project Work Total: 118 hrs

Week 12

  • Nov 4, 2013 (3 hr) Work was done to debug an issue in transmitting floating point values. Carlson mentioned that it might be an endian issue, but this seemed unlikely because 2byte integers were transmitted just fine. To find the issue, hex values were transmitted and the character values were cast as hex to verify that what was being sent was being received. This revealed that the floats were being received by the ccu and then being erroneously assigned to an integer because of a programming error. After this was fixed, the floating point values were transmitted and interpreted correctly. The next step is to finish implementing the wireless packets and to test transmitting a tarball.
  • Nov 7, 2013 (5 hr) The safety and analysis report was completed. A third attempt was made to print the box for the pcb. This attempt was made with the assistance of the president of the Computer Society. With his help we were able to get a print that finished and fit our pcb. There is some warping where the SD card fits into the box to plug into the raspberry pi and the xbee had difficulty fitting inside the box. The box needs to be mounted permanently to the headset.
  • Nov 8, 2013 (8 hr) The printed box was mounted to the headset. A hole was drilled in the box and into the aluminum for mounting. Code was written to transfer data from the ccu wirelessly to the micro and then through spi to the gpu. Research was done on how the spi drivers operated on the raspberry pi. An example piece of code was modified such that data could be sent through all layers. It was found that some latency was required on the part of the gpu after receiving a non-zero byte before retrieving the remaining bytes associated with the message. This will probably change as the program is integrated with the rest of the gpu code.
  • Nov 10, 2013 (4 hr) The headset packaging was upgraded to eliminate most of the masking tape. The gps receiver was put on the underside of the helmet. The front box was covered with electrical tape because it is black and matches the color of the box. The screen's back was placed over the screen to hide the exposed electrical components. Holes were drilled into the acrylic sheet and solid wire was wrapped into the holes to hold the screen at an angle. The wires were not attached permanently to the frame so that the screen angle could still be adjusted. The screen now "flaps" a lot less and it feels better running with the headset on. When wearing the headset and shaking ones' head, there is a noticeable amount of inertia that comes from the disconnect of the part of the hat that fits the head and the rest of the hat. The ccu was stuffed with it's hardware components into a project box and the keyboard and lcd screen were mounted to the project box. The ccu's packaging is complete. Some details remain for the headset packaging. A new box for the back is in the processes of being requested from a different 3d printer. An additional screw will be needed for the box on the back for stability. The remaining masking tape will need to be removed.

Week 12 Summary

  • Accomplishments: Data transmission from the CCU through XBee to the STM32F4 through XBee to the GPU through SPI was successfully tested. A box for the raspberry pi and pcb was successfully printed and attached to the headset. The packaging for the headset was nearly finalized and the packaging for the CCU was finalized. Remaining work for the CCU is purely software.
  • Weekly Work Total: 20 hrs
  • Project Work Total: 138 hrs

Week 13

  • Nov 13, 2013 (8 hr) A meeting occurred with Steven Ellis with the goal to integrate gps into the rendering code for opengl. Interfaces between the gpu and microcontroller were defined. The gpu will send a byte to request data from the microcontroller. The byte it sends will indicate which kind of data it is requesting. XBee data will be put into the spi buffer as it is received and the gpu will request this first. The number of bytes to read is the first non-zero byte that the gpu receives from the microcontroller. After receiving all of the XBee data, the gpu will request a status update from the microcontroller that will include the gps data, imu data, rssi, and battery fuel. The gpu was set up to successfully retrieve gps data and render a cube based on the location of the user. A separate program was written to "zero" out the gps data because a particular gps coordinate is used as the origin and meters from this origin are passed to the gpu. IMU data should be integrated next.
  • Nov 15, 2013 (4 hr) Work was done to integrate the IMU data into the final code project for the microcontroller. Code written by Alec Green was ported. The data was verified on the gpu to make sure that the angles were reasonable. A cube was successfully rotated using the angles from the IMU data. The next step is to rotate the camera using the IMU angles. Rotating Cube Video
  • Nov 16, 2013 (4 hr) Steven Ellis integrated the imu data such that the camera now rotates as opposed to the object spinning based on the imu data. The angles were initially incorrect for looking at the object because it would turn in odd fashions (pitch would roll and roll would pitch and yaw was backwards). Carlson put together a new pcb for the second headset. An xbee, antenna, and raspberry pi are in the process of being delivered. A new box was printed with a 3d printer. This box is not warped and will be used for the second headset and the purple pcb.
  • Nov 17, 2013 (4 hr) Work was done to sketch the maze for the pacman game. It was discovered when looking at objects with imu and gps, that looking at them from a different perspective than the default meant that turning the camera resulted in the objects tilting the wrong way. For example, with the z axis up, rotations around the z axis were always fine, but when looking at the "other side" of an object the pitch turned into yaw and the yaw into pitch. A considerable amount of time was spent looking at the documentation for the ngl gpl code to determine that the functions did indeed perform the expected function. More research is required to determine why the orientation is incorrect.

Week 13 Summary

  • Accomplishments: The GPS and IMU data were integrated into the main source code for the headset. Rendering was done with respect to GPS locations and a cube was rotated based on IMU data. Work was completed on the design of the pacaman simulation which will be run on the ccu.
  • Weekly Work Total: 20 hrs
  • Project Work Total: 158 hrs

Week 14

  • Nov 18, 2013 (4 hr) Steven Ellis found that the reason for the incorrect rotations from Nov. 17 was because the rotations were applied in the incorrect order. Objects now rotate correctly. Work was done to make the virtual world axes align with the real world. It was discovered that the objects being viewed are not necessarily in the absolute gps location that the should be when the user views them because the imu points west when the user points north. Progress was made on writing packets and drawing the layout for the game. It was decided that the simulation area will be a box of 50 meters by 30 meters. There will be a virtual wall surrounding the simulation area and virtual walls inside the simulation area.
  • Nov 19, 2013 (8 hr) The xbee and antenna arrived for the second headset. When the new board was connected up to the gps and xbee, it was noticed that the software hung unexpectedly and returned zeroes over spi. The problem was found to be a direct consequence of not having the gps baud rate configured correctly. After fixing this issue, the new box was fitted with holes along with the back aluminium bar. Upon assembling the new board onto the helmet, it was discovered that the display did not come on. Further inspection revealed that the raspberry pi would not boot. The cause was found to be that the connectors to the SD card had become loose. The connectors were pulled out so that they would connect more firmly with the raspberry pi.
  • Nov 21, 2013 (4 hr) Updated source code on micro-controller to include a command to clear SPI data to prevent issues with the buffer not synching properly. When this was added, IMU data continued to be unreliable on boot. After some investigation of resetting the micro-controller it was found that if the micro was reset after the raspberry pi booted, then the configurations would work fine. A delay was added in the micro code to give the IMU some time to initialize itself. This seems to have been the cause of bad data.

Week 14 Summary

  • Accomplishments: Rotation problems for the headset were discovered and fixed. Progress was made on constructing the second headset and finalizing the packaging for the first headset. An ability to clear the SPI buffer on the headset was added for debugging and synching.
  • Weekly Work Total: 16 hrs
  • Project Work Total: 174 hrs

Week 15

  • Nov 25, 2013 (8 hr) A sample tar file and sample config file were added to the project. The sample tar file will be used to test file transfers from the CCU to the GPU. A python script was created for sending a file over Xbee. It was seen that the file was received on a netbook from the CCU. The next steps will be to send the file through the micro-controller.
  • Nov 26, 2013 (8 hr) A python script was created to automate the process of writing C structures and packing/unpacking C structures into byte streams. The script was written so that changes to the contents of the packets could easily be changed and associated functions and sizes of structures could be updated automatically. The headset's code was updated to allow for file transfer and provisions were made for sending and receiving other packet types.
  • Nov 27, 2013 (4 hr) The SPI code on the GPU was updated with the ability to receive file data and write the file data to a local file. Improvements were made to the python scripts for sending and receiving files over wireless. It was found that a file transfer would initialize, but lots of zeroes and bad data was read in to the GPU. It was determined that further work should concentrate on achieving the remaining functionality for the headset so that the file transfer problem could be resolved with a team member.
  • Dec 1, 2013 (8 hr) More time was spent improving the python file transfer scripts and attempting to send a file through the micro-controller to the GPU. All attempts to transfer files resulted in extra bytes being written to the destination file.

Week 15 Summary

  • Accomplishments: A script was written to automatically generate C code. Extensive debugging was performed in an attempt to figure out why file transfer was unreliable through SPI.
  • Weekly Work Total: 16 hrs
  • Project Work Total: 174 hrs

Week 16

  • Dec 2, 2013 (8 hr) The idea of using DBUS for inter-process communication was dropped in favor of using internet sockets. A prototype python and c program were created that communicated through sockets in a manner similar to that which the packet program and the user interface will communicate. It was determined that multiple connections to the packet program would not occur because when the gui launched the simulation to run, it would not need to communicate with the packet program until after the simulation was completed or aborted. A thread was created in the packet program to handle socket communication requests and to call functions to perform the requested action. The separate thread allows packets to be parsed at the same time that they are being served. A list of functions were created to handle each type of incoming socket request.
  • Dec 3, 2013 (8 hr) An initial pass for python tests was created to test receiving broadcast packet information from the headset. This code was designed to communicate using the python sockets api to a program written in C listening for data on UART from the xbee. A meeting occurred with Steven Ellis and Alec Green. Alec worked to fix rotation issues that came up with the addition of a kalman filtering algrithm. Alec changed the filtering to a low pass filter and eliminated rotation problems. Work was done with Steven Ellis to generate a pacman maze using the configuration file format and the pacman models created over the summer. Thor drew out the maze on paper and Steven wrote a program to generate the config file based on the design that was drawn. A video was taken of walking through the maze.
  • Dec 4, 2013 (4 hr) More work was done to update the python tests and to fix bugs in the packet library program so that it could handle 16 byte ids as opposed to 2 byte ids.
  • Dec 5, 2013 (8 hr) Carlson and Thor met to work on the SPI file transfer problem. It was found that the solution was as simple as clearing the buffer being sent to the micro. In the junk data being sent over SPI were occasional commands that injected unwanted extra data into the byte stream. Python tests for every wireless packet were completed. The tests were written first so as to avoid long delays debugging network traffic that would have been experienced had the code been directly integrated with the user interface. The spi code was updated to include receiving xbee data which includes notification of when to start and end a simulation as well as updated file data and updated object position information. The code sends a command to the micro to request xbee data first. If no more xbee data is available, then information about the headset's position and orientation is collected. The headset's code was updated so that it could receive and process all packets from the ccu.
  • Dec 6, 2013 (8 hr) Final integration was done to link the ccu's user interface to the packet library so that the user interface could accurately report the id of the headset and send commands to control the headset. A problem occurred with the SD card being used for the headset. When the raspberry pi was shut down, a kernel panic occurred. A meeting with Steven Ellis occurred and a new SD card was purchased in the hopes of duplicating the information on this SD card from github and getting it fully configured. The installation of raspbian on the raspberry pi took longer than expected. It was suggested to use fsck on the SD card from another linux machine. This allowed the SD card to boot, and the SD card re-ran fsck on the SD card. There were many errors found with the filesystem, but the headset still seemed to work. The fifth and final PSSC was checked off. The headset was presented at the showcase along with the ccu. Users were unable to "walk" in the pacman maze because a gps lock could not be obtained indoors, but they were able to look around from the position at boot.

Week 16 Summary

Week 15 Summary

  • Accomplishments: The packet program was completed. A python API into the packet program was written for the user interface on the CCU. A video was created to demonstrate four out of five PSSCs. A Pacman maze was successfully rendered using a configuration file.
  • Weekly Work Total: 36 hrs
  • Project Work Total: 210 hrs
⚠️ **GitHub.com Fallback** ⚠️