In recent weeks, the development of the Polhemus project has come a long way. We have been able to test the device and figure out how it works and have been creating programs in python in order to analyze the data we will generate from the experiment. The following is a summary of how we propose the device will be used during this experiment.
The first leg of the project involved figuring out how the Polhemus device works and getting a feel for its limitations and its features. After a lot of testing, we concluded that we would not use it for its actual coordinate positioning features because there was too much variance in measurements that were further than 6ft from the source. We also felt that measuring each object in the exam room in relation to the source could become extremely tedious and time consuming, and also leave us with a lot of room for error. The device did not have very good accuracy far from the source, but the measurements had high repeatability. Because of this, we decided it would be best to use the Polhemus device to calibrate each object in the room.
We designed a program called calibration.py that allows us to map out different objects in the exam room, and save them as separate files. The movements while calibrating replicate those of a regular motion with each of these objects, making sure to do these movements at every angle possible, and at every hand position possible, as not to disclude any possible movement. Since these calibration files will be quite large, we came up with a cleanCalibration.py program, significantly decreases the size of the calibration files. This program essentially takes the first point in the calibration file, draws a sphere around it with a radius of 1 inch, adds it to the cleanCalibration file, and tests the rest of the points in that file against the sphere. For example, if the second point is inside the sphere, it gets discarded. However, if the point is not inside the sphere, the second point gets added to the new cleanCalibration file and also gets a sphere around it. The third point would then be tested against points one and two in a similar manner. This program allows us to eliminate repetitive calibration points that slow down the analysis process. With the addition of the clean.calibration file, we were able to reduce analysis time by about 75%.
The readPol.py program allows us to collect experiment data instantaneously from the PiMGR, which is the program that came with the Polhemus device and is responsible for collecting the motion capture data. This program utilizes a pipe to take the information from the PiMGR, and writes it to a file. This program produces one file per sensor, which means that we have the ability to do comparisons between the left and right hands if we so choose.
Preliminary analysis of the collected data is done with the closeToFiles.py program, which calculates the closest Cartesian distances between the raw files and the calibration files. Those distances from each object in the room are calculated for each point in the raw data and are written to one master file. The master file contains a column for each object in the room, and in those columns are the distances to the object at each time data was collected during the experiment. The file also contains a timestamp, so we are able to tell exactly when the doctor was close to each object.
In order separate out the touches from the non-touches, the program touchSummary.py only takes distances from the master file that are 6 inches or less from any object and writes range of time for the touch to a file. The summary is organized by object, with the time ranges and total touches under each object. The total touches throughout the experiment are calculated at the end of the summary. This program also outputs one file for each sensor.
At this point, we have done preliminary testing inside the lab and are ready to move to the experimental exam room in the hospital. Future work might include a program that creates a timeline summary of the events during the experiment, which would make it easy to decipher what the doctor did during the exam and at what time, without actually being in the room.