Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/akrv/sensorfloor
Browse files Browse the repository at this point in the history
  • Loading branch information
AnasIbrahim committed Feb 24, 2020
2 parents 79ac4ed + 8f539d5 commit f099a78
Show file tree
Hide file tree
Showing 5 changed files with 29,216 additions and 5 deletions.
4 changes: 2 additions & 2 deletions floor_flasher/fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@

@parallel
def r():
with cd('~/sensorfloor'):
run('git pull')

run('sudo timedatectl set-timezone Europe/Berlin')


@parallel
Expand Down
3 changes: 2 additions & 1 deletion imu_reader/read_past_imu.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ def reader_worker(strip_id, strip_path_inorder, node_list, serial_handler, mqtt_
parse = True
if parse:
reading_to_publish = []
current_reading = {}


for reading in range(0, len(data), 9):
current_reading = {}
current_reading['a'] = [(i * 1.0) / (32768 / 2) for i in data[reading:reading + 3]]
current_reading['m'] = data[reading + 3:reading + 6]
current_reading['g'] = [(i * 1.0) / (65536 / 500) for i in data[reading + 6:reading + 9]]
Expand Down
28 changes: 26 additions & 2 deletions imu_reader/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
**Latency measurements for looping through the strip**<br/>
**How to start data mesaurement**
using the FLW-NUC or the robot nuc in the hall


`cd ~/sensorfloor`<br />
is where the repo is available <br />

**Collecting Vicon data:** <br />
start vicon data after starting ros core and roslaunch vicon_bridge
cd ~/sensorfloor/imu_reader<br />
python listener.py <br />
this will create a vicon_data.txt file with line delimited json objects which contain a reading with timestamp from the local machine.<br />

{'interrupt': 0.09613079603026513,<br/>
**Collecting imu data**<br />
cd ~/sensorfloor/imu_reader
python live_plotter.py<br />
this will create a file test_data.txt with json per reading per node timestampped at the RPi<br />
it will only start to populate after the next step.

**starting imu data**<br />
cd ~/sensorfloor/floor_flasher<br />
fab imuread<br />
this fab recipe will block the terminal and this need to be alive to run the programs on all the RPi hosts.

**Latency measurements for looping through the strip**<br/>
3.8s latency with 7Hz sample rate <br />
{'interrupt': 0.09613079603026513,<br/>
'parsing': 0.000125336809223201,<br/>
'publish': 0.001433641732144518,<br/>
'rs422': 0.006461214208278526,<br/>
Expand Down
Loading

0 comments on commit f099a78

Please sign in to comment.