Вы находитесь на странице: 1из 6

wearTECH

Withthecontinuousevolutionoftechnology,mobiledevicesare becomingmoreandmoreimportantinpeople’slives.Inthesameway, newneedsrelatedtotheinformationprovidedbytheirusersarise, makingevidenttheneedtodevelopsystemsthattakeadvantageof theirdailyuse.Therecognitionofpersonalactivitybasedonthe informationprovidedbythelastgenerationmobiledevicescaneasilybe consideredasanusefultoolformanypurposesandfutureapplications.

ThisprojectpresentstheuseofinformationprovidedfromaniPhone7

andaMyoarmbanddeviceindifferentacquisitionschemes,assessing

conventionalsupervisedclassifierstorecognizepersonalactivitybyan

identificationofsevenclasses.

RepositoryFolders

Thisrepositorycontents:

/your_root - path |--data ject data |--iPhone |--LearningData |--Myo |--project-Figures |--References /Folder
/your_root
- path
|--data
ject data
|--iPhone
|--LearningData
|--Myo
|--project-Figures
|--References
/Folder where you can find the pro
/Activity data from the iPhone
/.sav files from the training
/Activity data from the Myo
/Figures from the project
/Related work

|--Readme

n software

/ instructions for use the Activity recognitio

|--src

/ scripts for the Activity Recognition (A.R.)

/scripts for the A.R. after featur

e reduction

/scripts for the A.R. with Full Fe

atures

/ Curves for the feature reduction / 2 and 3 bars graphics /scripts for the A.R. with hierarc

hical scheme |--Hierarchical-consolidate-stairs /scripts with upstair

s and downstairs consolidated

|--HierarchicalRoutine-UnknownClass / scripts for the A. R. adding an unknown class

/script to run the synchronized sy

|--my_script.sh stem to collect data |--myo_con.py

|--BestFeatures

|--FullFeatures

|--Gauss-curves

|--Graphics

|--Hierarchical

/script to recollect data from the

myo armband |--posicioncelular.py /script that shows that the result of the prediction is independent of cellphone position in the pocket |--pruebasincronia.py /script that test the synchronized system

Hardwareelements

Softwarerequirements

Python>2.6inthiscaseIusedSpyderandatom

InstallingROSnodefortheMyo

1. OpenTerminal

2. createaworkspace

$ mkdir -p ~/catkin_ws/src

3. opentheworkspace

$ cd ~/catkin_ws/src

4. Clonetherepository.

$ cd ~/catkin_ws

$ catkin_make

6. OncetheNodeisinstalled,ifyou’reusingthenewfirmwarefor theMyoArmbandgotoros_myo/scripts/myo-rawNode.pyandin

the300lineyou’llfindthis

elif attr == 0x23:

typ, val, xdir = unpack('3B', pay)

justreplacethose2lineswith

elif attr == 0x23:

pay) justreplacethose2lineswith elif attr == 0x23: typ, val, xdir, unknown1, unknown2, unknown3 =

typ, val, xdir, unknown1, unknown2, unknown3 = unpack('6B', pay)

unknown1, unknown2, unknown3 = unpack('6B', pay) RunningRos_myo

RunningRos_myo

ifyouwanttorunthenodeyoumustfollowthenextsteps

1. OpenTerminalandrunRoscore

$ roscore

2. Openanewwindowanddothefollowing

$ cd ~/catkin_ws

$ source ./devel/setup.bash

$ rosrun ros_myo myo-rawNode.py

Note:It’simportanttorunroscorefirstandkeepthat2windows

openwhileyou’recollectingdata

CollectingData

Onceyouhaveros_myorunning,it’stimetocollectingdatafollowing

thenextsteps:

1. Yourcomputerandthecellphonemustbeconnectedatthesame localnetwork

2. openanewTerminalwindowandgoto /src folder

localnetwork 2. openanewTerminalwindowandgoto /src folder $ cd/wearTECH/src 3. openthemy_script.shscript $ sudo nano

$ cd/wearTECH/src

3. openthemy_script.shscript

$ sudo nano my_script.sh

4. updatetheIPaddressandthesocketport

5. press“start”recordingintheappSensorLog

5. press“start”recordingintheappSensorLog 6. Runthe my_script.sh $ bash my_script.sh 7. press ctrl+c

6. Runthe my_script.sh

$ bash my_script.sh

6. Runthe my_script.sh $ bash my_script.sh 7. press ctrl+c whenyouwanttostopthedatacollection. 8.

7. press ctrl+c whenyouwanttostopthedatacollection.

7. press ctrl+c whenyouwanttostopthedatacollection. 8. Youwillfindafilecalled mylog_test.csv inyour /src
7. press ctrl+c whenyouwanttostopthedatacollection. 8. Youwillfindafilecalled mylog_test.csv inyour /src

8. Youwillfindafilecalled mylog_test.csv inyour /src folder, thisonecorrespondstotheiPhonedata.Andinyour /data folderyou’llfinda .txt filewiththedateandtimeofthe collection,thisonecorrespondstotheMyodata.

collection,thisonecorrespondstotheMyodata. Note:The /data foldercontainstwofolderscallediPhoneand
collection,thisonecorrespondstotheMyodata. Note:The /data foldercontainstwofolderscallediPhoneand
collection,thisonecorrespondstotheMyodata. Note:The /data foldercontainstwofolderscallediPhoneand

Note:The /data foldercontainstwofolderscallediPhoneand

Myo.Thecontentofthesefoldersarethedatacollected,they’re

organizedbyactivity,usernameandcellphonepositioninthe

pocket

HowtostarttheActivity

RecognitionTest

1. OpenyourPythoneditor(spyderoratom)

RecognitionTest 1. OpenyourPythoneditor(spyderoratom) 2. Fromthe /src folderchoosetheclassificationType 3.

2. Fromthe /src folderchoosetheclassificationType

3. Runfirstthetrainingscript,andthelearningDataaresavedin the /data folder

the /data folder 4. runtheValidationscriptifyouwanttoknowtheresultsof

4. runtheValidationscriptifyouwanttoknowtheresultsof

predictionfortheofflinetests(test1)orruntheroutinescriptto

knowtheroutinepredictionresults(test2)

Authors

knowtheroutinepredictionresults(test2) Authors HaroldF.Murcia ( haroldmurcia.com ) MairaJ.Triana

HaroldF.Murcia(haroldmurcia.com)

MairaJ.Triana