Skip to content
This repository has been archived by the owner on May 3, 2019. It is now read-only.

When attempting to install and run "Face App" from video linked in description, an error is thrown, and app does not start. #80

Closed
brianofrokk3r opened this issue Apr 27, 2017 · 50 comments
Assignees
Labels

Comments

@brianofrokk3r
Copy link
Contributor

brianofrokk3r commented Apr 27, 2017

When attempting to install and run "Face App" from from this video, an error is thrown, and app does not start.

(face-demo) Initialize Service: face

Cannot register component without name undefined
Uncaught exception:  TypeError: Cannot read property ‘prepare’ of undefined

Config

# do not touch this line
configVersion: 2

description: face detection
keywords: ''
name: face-demo
displayName: Face Demo

services:
  faceDemo:
    engine: detection
    type: face
@AlieGG AlieGG changed the title When attempting to install and run "Face App" from store, an error is thrown, and app does not start. When attempting to install and run "Face App" from Sean's video, an error is thrown, and app does not start. Apr 27, 2017
@brianofrokk3r
Copy link
Contributor Author

@gordinh

@AlieGG AlieGG changed the title When attempting to install and run "Face App" from Sean's video, an error is thrown, and app does not start. When attempting to install and run "Face App" from video linked in description, an error is thrown, and app does not start. Apr 27, 2017
@gordinh
Copy link
Contributor

gordinh commented Apr 27, 2017

This app is on store? I am not finding neither on apps.matrix.one nor dev-apps.matrix.one
Can you show me the app.js then?

@krishkal
Copy link

I just followed the steps in the video on bottom right of the page: https://creator.matrix.one/#!/develop/start

@krishkal
Copy link

In the first step, the app.js is very simple:

matrix.init('face').then(function(data){ console.log(data); });

@gordinh
Copy link
Contributor

gordinh commented Apr 27, 2017

oh, try to use matrix.service('face').start().then(function(data){ console.log(data); }); as you can see it here: https://matrix-io.github.io/matrix-documentation/API/computer-vision/

@krishkal
Copy link

OK, so please either have them remove that video or have them update it! Having a "getting started" video that doesn't work does not build a Noob's confidence for sure.

Now, I am not getting that error. But, I do get an different error:

[ 'FACE' ]
Face <Buffer 45 52 52 4f 52 3a 20 43 6f 75 6c 64 20 6e 6f 74 20 72 65 61 64 20 66 72 61 6d 65>
SERVICE ERROR undefined

@krishkal
Copy link

And those 2 lines keep repeating for ever until the app is killed.

@gordinh
Copy link
Contributor

gordinh commented Apr 27, 2017

Sorry about that we gonna update that. Can you restart MALOS?

@krishkal
Copy link

Yes, tried restarting several times already. Same thing happens.

@krishkal
Copy link

Is MALOS same as matrix-os? The one that I start with

NODE_ENV=rc node index.js

@gordinh
Copy link
Contributor

gordinh commented Apr 28, 2017

MALOS is a another service. You can kill it with sudo pkill -9 malos_eye.
And then you run the MOS again with NODE_ENV=rc node index.js

@krishkal
Copy link

OK, that made it better. At least, I don't see the errors streaming by anymore.

However, the face detection doesn't seem to be happening. Whether or not I stand in front of the camera, it just keeps printing to the console:

[ 'FACE' ]
[]
[ 'FACE' ]
[]
[ 'FACE' ]
[]
[ 'FACE' ]
[]

over, and over again. At this point, my app.js reads:

matrix.led('red').render();

matrix.service('face').start().then(function(data){
console.log(data);
matrix.led('green').render();
setTimeout(function() {
matrix.led('black').render();
},2000);
});

@gordinh
Copy link
Contributor

gordinh commented Apr 28, 2017

Oh. OK. Do you mind trying if you are using the right orientation of the camera?

@krishkal
Copy link

Yes, I did. I used the PiCamera on Python to show the preview image on screen, and saw my face in the right orientation. The matrix was not impressed at all.

@krishkal
Copy link

Is there a way from within the Matrix app to show the preview on screen?

@gordinh
Copy link
Contributor

gordinh commented Apr 28, 2017

hm... @krishkal unfortunately no. Let's try this okay? Can you open two terminal sessions on the pi, on one of them kill the malos_eye again with the sudo pkill -9 malos_eye and the run malos_eye again (just type it). on the other run the mos and run the Face app. Show me output for both of them.

@krishkal
Copy link

OK, now it is back to the error state. Here are the outputs:

Malos_eye:

pi@raspberrypi:/matrix-os$ sudo pkill -9 malos_eye
pi@raspberrypi:
/matrix-os$ malos_eye


MALOS eye starting


You can query specific driver info using port 22012.
Registered driver GESTURE with port 22013.
Configuring camera id: 0
Configuring resolution 640x480
End
Gesture initialization done
New delay between updates for GESTURE is 50 ms.
Configuring detections
Activating FACE
Activating face descriptors
VIDIOC_STREAMON: Invalid argument
Could not read frame
VIDIOC_STREAMON: Invalid argument
Could not read frame
VIDIOC_STREAMON: Invalid argument
Could not read frame
VIDIOC_STREAMON: Invalid argument
Could not read frame
VIDIOC_STREAMON: Invalid argument
Could not read frame

Matrix_os:

[]
[]
[]
undefined service name init [ 'engine', undefined, undefined, 'type', undefined, undefined ]
TODO: Should start VES for detection
==== Application face-demo started! ====
[]
[ 'FACE' ]
No Detection Component Available for Ping
(face-demo) Matrix OS Application Library Loading...

(face-demo) service> { engine: 'detection', type: 'face' }

(face-demo) matrix.service:: face : detection > face

(face-demo) APP>SERVICE> { eventType: 'container-ready', app: 'face-demo', pid: 2986 }

[]
[ 'FACE' ]
Face <Buffer 45 52 52 4f 52 3a 20 43 6f 75 6c 64 20 6e 6f 74 20 72 65 61 64 20 66 72 61 6d 65>
SERVICE ERROR undefined
Face <Buffer 31 2c 20 43 6f 75 6c 64 20 6e 6f 74 20 73 65 6e 64 20 75 70 64 61 74 65 20 66 6f 72 20 47 45 53 54 55 52 45 20 64 72 69 76 65 72 2e>
SERVICE ERROR undefined
Face <Buffer 45 52 52 4f 52 3a 20 43 6f 75 6c 64 20 6e 6f 74 20 72 65 61 64 20 66 72 61 6d 65>
SERVICE ERROR undefined
Face <Buffer 31 2c 20 43 6f 75 6c 64 20 6e 6f 74 20 73 65 6e 64 20 75 70 64 61 74 65 20 66 6f 72 20 47 45 53 54 55 52 45 20 64 72 69 76 65 72 2e>
SERVICE ERROR undefined

@brianofrokk3r
Copy link
Contributor Author

Hey @krishkal, sorry for the inconvenience here, please make sure to do the appropriate upgrades to your system first:

sudo apt-get update && sudo apt-get upgrade
cd matrix-os // you need to be in the right directory
git checkout master
git pull
npm install
npm upgrade matrix-app-config-helper matrix-firebase matrix-node-sdk matrix-eventfilter
git submodule update --init
sudo shutdown -r now //sudo reboot

The start your application again.

@krishkal
Copy link

No need to apologize @brianofrokk3r, glad you are persisting with this.

I did exactly as you suggested. The first command did update a bunch of stuff, but all the matrix-os stuff pretty much said I was already up to date (not surprising, since I just installed it all 2 days ago).

Rebooted, fired it up regular, got the same SERVICE ERROR screen on MOS.

Fired up another terminal, pkilled malos_eye, and started it again manually to monitor output. Again the same "Could not read frame" errors reported by malos_eye. Same SERVICE ERROR on matrix_os as well.

:(

@krishkal
Copy link

Don't know if this is helpful, but I did try to make sure that the camera was operational using PiCamera on Python. If I reboot, and try PiCamera first, the camera is shown on screen fine. However, once I run the Matrix face detection and then try the PiCamera, it is unable to read it with "Failed to enable connection: Out of resources" error.

@brianofrokk3r
Copy link
Contributor Author

@krishkal this seems like it may have something to do with the camera being in use or reserved for another process. MALOS_eye might not be detecting this, and may be failing as a result. I can check with the team to confirm this. In the meantime please ensure all other camera services are off to validate these findings.

@brianofrokk3r
Copy link
Contributor Author

@arhuaco malos_eye is returning a failure message when it's attempting to read the stream. The frames come through when using PiCamera, so it's not a "camera seating" issue.

VIDIOC_STREAMON: Invalid argument
Could not read frame

@krishkal
Copy link

@brianofrokk3r I made sure to bring up MOS immediately after reboot, so I don't think anything else is getting in. I also looked at ps -aux to see if anything looks like it may hog the camera. I don't see anything. Here is the output, in case you can spot anything:

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 1.1 0.4 22868 3900 ? Ss 17:40 0:02 /sbin/init splash
root 2 0.0 0.0 0 0 ? S 17:40 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S 17:40 0:00 [ksoftirqd/0]
root 4 0.0 0.0 0 0 ? S 17:40 0:00 [kworker/0:0]
root 5 0.0 0.0 0 0 ? S< 17:40 0:00 [kworker/0:0H]
root 6 0.0 0.0 0 0 ? S 17:40 0:00 [kworker/u8:0]
root 7 0.1 0.0 0 0 ? S 17:40 0:00 [rcu_sched]
root 8 0.0 0.0 0 0 ? S 17:40 0:00 [rcu_bh]
root 9 0.0 0.0 0 0 ? S 17:40 0:00 [migration/0]
root 10 0.0 0.0 0 0 ? S< 17:40 0:00 [lru-add-drain]
root 11 0.0 0.0 0 0 ? S 17:40 0:00 [cpuhp/0]
root 12 0.0 0.0 0 0 ? S 17:40 0:00 [cpuhp/1]
root 13 0.0 0.0 0 0 ? S 17:40 0:00 [migration/1]
root 14 0.0 0.0 0 0 ? S 17:40 0:00 [ksoftirqd/1]
root 15 0.0 0.0 0 0 ? S 17:40 0:00 [kworker/1:0]
root 16 0.0 0.0 0 0 ? S< 17:40 0:00 [kworker/1:0H]
root 17 0.0 0.0 0 0 ? S 17:40 0:00 [cpuhp/2]
root 18 0.0 0.0 0 0 ? S 17:40 0:00 [migration/2]
root 19 0.0 0.0 0 0 ? S 17:40 0:00 [ksoftirqd/2]
root 20 0.0 0.0 0 0 ? S 17:40 0:00 [kworker/2:0]
root 21 0.0 0.0 0 0 ? S< 17:40 0:00 [kworker/2:0H]
root 22 0.0 0.0 0 0 ? S 17:40 0:00 [cpuhp/3]
root 23 0.0 0.0 0 0 ? S 17:40 0:00 [migration/3]
root 24 0.0 0.0 0 0 ? S 17:40 0:00 [ksoftirqd/3]
root 25 0.0 0.0 0 0 ? S 17:40 0:00 [kworker/3:0]
root 26 0.0 0.0 0 0 ? S< 17:40 0:00 [kworker/3:0H]
root 27 0.0 0.0 0 0 ? S 17:40 0:00 [kdevtmpfs]
root 28 0.0 0.0 0 0 ? S< 17:40 0:00 [netns]
root 29 0.0 0.0 0 0 ? S 17:40 0:00 [khungtaskd]
root 30 0.0 0.0 0 0 ? S 17:40 0:00 [oom_reaper]
root 31 0.0 0.0 0 0 ? S< 17:40 0:00 [writeback]
root 32 0.0 0.0 0 0 ? S 17:40 0:00 [kcompactd0]
root 33 0.0 0.0 0 0 ? S< 17:40 0:00 [crypto]
root 34 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 35 0.0 0.0 0 0 ? S< 17:40 0:00 [kblockd]
root 36 0.0 0.0 0 0 ? S< 17:40 0:00 [watchdogd]
root 37 0.3 0.0 0 0 ? S 17:40 0:00 [kworker/0:1]
root 38 0.0 0.0 0 0 ? S< 17:40 0:00 [rpciod]
root 39 0.0 0.0 0 0 ? S< 17:40 0:00 [xprtiod]
root 40 0.0 0.0 0 0 ? S 17:40 0:00 [kswapd0]
root 41 0.0 0.0 0 0 ? S< 17:40 0:00 [vmstat]
root 42 0.0 0.0 0 0 ? S< 17:40 0:00 [nfsiod]
root 52 0.0 0.0 0 0 ? S< 17:40 0:00 [kthrotld]
root 53 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 54 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 55 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 56 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 57 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 58 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 59 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 60 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 61 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 62 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 63 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 64 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 65 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 66 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 67 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 68 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 69 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 70 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 71 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 72 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 73 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 74 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 75 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 76 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 77 0.0 0.0 0 0 ? S< 17:40 0:00 [iscsi_eh]
root 78 0.0 0.0 0 0 ? S< 17:40 0:00 [dwc_otg]
root 79 0.0 0.0 0 0 ? S 17:40 0:00 [kworker/2:1]
root 80 0.0 0.0 0 0 ? S< 17:40 0:00 [DWC Notificatio]
root 81 0.0 0.0 0 0 ? S< 17:40 0:00 [VCHIQ-0]
root 82 0.0 0.0 0 0 ? S< 17:40 0:00 [VCHIQr-0]
root 83 0.0 0.0 0 0 ? S< 17:40 0:00 [VCHIQs-0]
root 84 0.0 0.0 0 0 ? S 17:40 0:00 [VCHIQka-0]
root 85 0.0 0.0 0 0 ? S< 17:40 0:00 [SMIO]
root 86 0.0 0.0 0 0 ? S 17:40 0:00 [kworker/2:2]
root 87 0.0 0.0 0 0 ? S 17:40 0:00 [irq/92-mmc1]
root 88 0.0 0.0 0 0 ? S 17:40 0:00 [kworker/2:3]
root 89 0.0 0.0 0 0 ? S 17:40 0:00 [kworker/2:4]
root 90 0.0 0.0 0 0 ? S< 17:40 0:00 [bioset]
root 91 0.3 0.0 0 0 ? S 17:40 0:00 [mmcqd/0]
root 92 0.0 0.0 0 0 ? S 17:40 0:00 [kworker/1:1]
root 93 0.0 0.0 0 0 ? S 17:40 0:00 [jbd2/mmcblk0p2-]
root 94 0.0 0.0 0 0 ? S< 17:40 0:00 [ext4-rsv-conver]
root 95 0.0 0.0 0 0 ? S< 17:40 0:00 [ipv6_addrconf]
root 99 0.0 0.0 0 0 ? S 17:40 0:00 [kworker/3:1]
root 116 0.0 0.0 0 0 ? S 17:40 0:00 [kworker/u8:1]
root 118 0.0 0.0 0 0 ? S 17:40 0:00 [kworker/0:2]
root 133 0.0 0.0 0 0 ? S 17:40 0:00 [kworker/3:2]
root 134 0.3 0.3 9932 2948 ? Ss 17:40 0:00 /lib/systemd/systemd-journald
root 136 0.3 0.3 11984 3060 ? Ss 17:40 0:00 /lib/systemd/systemd-udevd
root 172 0.0 0.0 0 0 ? S 17:40 0:00 [kworker/1:2]
root 221 0.1 0.0 0 0 ? S 17:40 0:00 [spi0]
root 264 0.0 0.0 0 0 ? S< 17:40 0:00 [cfg80211]
root 274 0.0 0.0 0 0 ? S< 17:40 0:00 [brcmf_wq/mmc1:0]
root 276 0.0 0.0 0 0 ? S 17:40 0:00 [kworker/0:3]
root 277 0.0 0.0 0 0 ? S 17:40 0:00 [brcmf_wdog/mmc1]
root 295 0.0 0.0 0 0 ? S 17:40 0:00 [kworker/u8:2]
root 481 0.0 0.0 0 0 ? S< 17:40 0:00 [kworker/3:1H]
root 526 0.0 0.5 8728 5568 ? Ss 17:40 0:00 dhclient -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases eth0
root 589 3.9 0.8 853208 8348 ? Ssl 17:40 0:08 /usr/bin/malos
root 592 0.0 0.2 5072 2384 ? Ss 17:40 0:00 /usr/sbin/cron -f
root 599 0.0 0.6 126244 5932 ? Ssl 17:40 0:00 /usr/bin/malos_eye
root 602 0.0 0.2 3852 2432 ? Ss 17:40 0:00 /lib/systemd/systemd-logind
avahi 608 0.0 0.2 3876 2484 ? Ss 17:40 0:00 avahi-daemon: running [raspberrypi.local]
message+ 611 0.1 0.3 5704 3072 ? Ss 17:40 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
nobody 627 0.0 0.1 2292 1452 ? Ss 17:40 0:00 /usr/sbin/thd --daemon --triggers /etc/triggerhappy/triggers.d/ --socket /var/run/thd.socket --pidfile /var/run/thd.pid --user nobody /dev/input/event0 /dev/input/event1 /dev/inpu
root 632 0.0 0.1 2564 1664 ? Ss 17:40 0:00 /sbin/dhcpcd -q -b
avahi 656 0.0 0.0 3876 240 ? S 17:40 0:00 avahi-daemon: chroot helper
root 702 0.0 0.3 7156 3024 ? Ss 17:40 0:00 /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlan0.pid -i wlan0 -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf
root 788 0.0 0.2 32144 2644 ? Ssl 17:40 0:00 /usr/sbin/rsyslogd -n
root 803 0.0 0.4 7864 4408 ? Ss 17:40 0:00 /usr/sbin/sshd -D
root 879 0.0 0.7 41056 7112 ? Ssl 17:40 0:00 /usr/sbin/lightdm
ntp 890 0.0 0.3 5776 3732 ? Ss 17:40 0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 106:111
root 891 0.0 0.2 5740 2772 tty1 Ss 17:40 0:00 /bin/login -f
root 934 0.7 5.5 197076 52412 tty7 Ssl+ 17:40 0:01 /usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
root 948 0.0 0.0 0 0 ? S< 17:40 0:00 [kworker/1:1H]
root 1006 0.0 0.7 33460 7540 ? Sl 17:40 0:00 lightdm --session-child 13 16
pi 1015 0.0 0.3 4976 3280 ? Ss 17:40 0:00 /lib/systemd/systemd --user
pi 1018 0.0 0.1 6888 1236 ? S 17:40 0:00 (sd-pam)
pi 1021 0.1 1.3 52304 12464 ? Ssl 17:40 0:00 /usr/bin/lxsession -s LXDE-pi -e LXDE
root 1039 0.0 0.0 0 0 ? S< 17:40 0:00 [kworker/u9:0]
root 1040 0.0 0.0 0 0 ? S< 17:40 0:00 [hci0]
root 1041 0.0 0.0 0 0 ? S< 17:40 0:00 [hci0]
root 1042 0.0 0.0 2068 148 ? S 17:40 0:00 /usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow -
root 1043 0.0 0.0 0 0 ? S< 17:40 0:00 [kworker/u9:1]
root 1044 0.0 0.0 0 0 ? S< 17:40 0:00 [kworker/u9:2]
root 1047 0.0 0.3 5008 3396 ? Ss 17:40 0:00 /usr/lib/bluetooth/bluetoothd
pi 1070 0.0 0.0 3700 220 ? Ss 17:40 0:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session x-session-manager
pi 1073 0.0 0.1 3236 1596 ? S 17:40 0:00 /usr/bin/dbus-launch --exit-with-session x-session-manager
pi 1074 0.0 0.2 5624 2184 ? Ss 17:40 0:00 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 6 --session
pi 1081 0.0 0.6 31500 5764 ? Sl 17:40 0:00 /usr/lib/gvfs/gvfsd
root 1084 0.0 0.0 0 0 ? S< 17:40 0:00 [kworker/0:1H]
pi 1086 0.0 0.5 49032 5304 ? Sl 17:40 0:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
root 1091 0.0 0.0 0 0 ? S< 17:40 0:00 [kworker/2:1H]
pi 1101 0.1 0.4 6536 4524 tty1 S+ 17:40 0:00 -bash
pi 1108 0.4 1.2 20868 11844 ? S 17:40 0:00 openbox --config-file /home/pi/.config/openbox/lxde-pi-rc.xml
pi 1111 0.0 0.9 30372 8656 ? Sl 17:40 0:00 lxpolkit
pi 1113 0.6 2.7 104256 25836 ? Sl 17:40 0:01 lxpanel --profile LXDE-pi
pi 1116 0.8 2.7 141484 25960 ? Sl 17:40 0:01 pcmanfm --desktop --profile LXDE-pi
root 1121 0.0 0.7 41316 7488 ? Ssl 17:40 0:00 /usr/lib/policykit-1/polkitd --no-debug
pi 1134 0.0 0.0 3700 220 ? Ss 17:40 0:00 /usr/bin/ssh-agent -s
pi 1139 0.8 3.9 70252 37308 ? Sl 17:40 0:01 /usr/bin/python /usr/bin/blueman-applet
pi 1142 0.1 1.6 47540 15760 ? Sl 17:40 0:00 /usr/lib/notification-daemon/notification-daemon
pi 1152 0.0 0.8 43484 8204 ? Sl 17:40 0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
root 1162 0.0 0.8 59580 7912 ? Ssl 17:40 0:00 /usr/lib/udisks2/udisksd --no-debug
rtkit 1176 0.0 0.2 21376 2084 ? SNsl 17:40 0:00 /usr/lib/rtkit/rtkit-daemon
pi 1181 0.0 0.5 30444 5348 ? Sl 17:40 0:00 /usr/lib/gvfs/gvfs-mtp-volume-monitor
pi 1188 0.0 0.5 31464 5572 ? Sl 17:40 0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
pi 1199 0.0 0.7 42928 6744 ? Sl 17:40 0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
pi 1205 0.0 0.5 30544 5620 ? Sl 17:40 0:00 /usr/lib/gvfs/gvfs-goa-volume-monitor
pi 1231 0.0 0.0 1912 96 ? S 17:40 0:00 /bin/sh /usr/bin/start-pulseaudio-x11
pi 1232 0.0 0.2 5796 2000 ? S 17:40 0:00 /usr/bin/xprop -root -spy
pi 1233 0.0 0.6 30204 5976 ? Ssl 17:40 0:00 /usr/lib/menu-cache/menu-cached /tmp/.menu-cached-:0-pi
pi 1259 0.0 0.4 9164 4544 ? S 17:40 0:00 /usr/lib/arm-linux-gnueabihf/gconf/gconfd-2
pi 1261 0.0 0.7 51672 7404 ? Sl 17:40 0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.1 /org/gtk/gvfs/exec_spaw/0
pi 1311 0.0 0.3 17316 3636 ? S 17:41 0:00 /usr/bin/obex-data-server --no-daemon
root 1315 0.0 0.0 0 0 ? S< 17:41 0:00 [krfcommd]
pi 1343 0.3 1.9 47180 18820 ? Sl 17:41 0:00 lxterminal
pi 1368 0.0 0.1 2348 1528 ? S 17:41 0:00 gnome-pty-helper
pi 1369 0.0 0.4 6560 4712 pts/0 Ss 17:41 0:00 /bin/bash
pi 1555 0.0 0.3 6560 3580 pts/0 S+ 17:41 0:00 /bin/bash
pi 1556 5.3 5.6 172296 53204 pts/0 Sl+ 17:41 0:09 node index.js
root 1906 0.1 0.5 12352 5276 ? Ss 17:41 0:00 sshd: pi [priv]
pi 2141 0.0 0.3 12352 3156 ? S 17:42 0:00 sshd: pi@pts/1
pi 2143 0.1 0.4 6524 4552 pts/1 Ss 17:42 0:00 -bash
pi 3738 0.0 0.2 4740 2128 pts/1 R+ 17:44 0:00 ps -aux

@arhuaco
Copy link
Contributor

arhuaco commented Apr 28, 2017

@brianofrokk3r :

From what I read the error "VIDIOC_STREAMON: Invalid argument" can happen when you kill a program that is accessing the camera and then start it again (or start another program that uses it). (v2l stuff).

So the message doesn't imply that the camera isn't working.

@krishkal , what distro are you running? Is it easy for you to try a headless boot (no X)?

@krishkal
Copy link

Running stock raspbian. Let me see if I can figure out a headless boot method for it.

@krishkal
Copy link

OK stopped X-server by running sudo systemctl set-default multi-user.target, and rebooting. SSH into the box, fire up matrix-os. Bring up face-demo from CLI.

No joy. Same exact result.

@krishkal
Copy link

BTW, Top shows 98% idle, with ~700Mb out of 1GB free.

@krishkal
Copy link

I meant to say stock Raspbian/Jessie.

@krishkal
Copy link

I am using the Raspberry Pi Camera V2, in case that makes a diff.

@krishkal
Copy link

So, have you guys given up on this? Does the face detection work with ANY configuration? If so, what configuration?

@arhuaco arhuaco closed this as completed Apr 28, 2017
@arhuaco arhuaco reopened this Apr 28, 2017
@arhuaco
Copy link
Contributor

arhuaco commented Apr 28, 2017

In a meeting. I can help soon. We know it's working, we have to find out why it isn't working for you and I can help debug. For instance, sending custom programs that give us more output.

Let's start checking if the basic detection is working for you by using the basic examples: https://github.com/matrix-io/malos-eye

@arhuaco
Copy link
Contributor

arhuaco commented Apr 28, 2017

I'll write a small program and send it to you. I need to setup my env, doing it. It will just open the camera and see if it works. Let's start from there.

@krishkal
Copy link

Hey, getting somewhere. The malos-eye program basically worked. It detected my face everytime, and either said "MALE-ANGRY" or "MALE-SAD", which were both probably correct emotions I am feeling because I can't get this thing to work ;)

Also, the Palm/Fist detector also seemed to detect OK.

@arhuaco
Copy link
Contributor

arhuaco commented Apr 28, 2017

@krishkal: this is good news, thanks for testing. Can you check if you can still get things working after a few restarts of MALOS-eye? (just to see if things work smoothly at the v2l layer). That is: restart, check, restart, check. I think that 3 times will do.

If it works for you all the time we will need to check things from the Matrix OS side. CC @eighteyes . Maybe MALOS-eye is getting an invalid config?

@arhuaco
Copy link
Contributor

arhuaco commented Apr 28, 2017

Hey, getting somewhere. The malos-eye program basically worked. It detected my face everytime, and either said "MALE-ANGRY" or "MALE-SAD", which were both probably correct emotions I am feeling because I can't get this thing to work ;)

In the example query_demographics.js things can be a bit confusing because we are printing the raw proto and the actual emotion (or field meaning) depends on the "tag" field of the FacialRecognition message. I'll add a ticket so that we (probably me) improve this demo.

var data = new matrixVisionBuilder.VisionResult.decode(buffer).toRaw()
console.log(data)

@krishkal
Copy link

OK pkilled and restarted malos_eye 3 times, and checked query_demographics every time, and it produces an output when I stand in front of it, and none when I am not. So, I think we can call this a success.

@eighteyes
Copy link
Contributor

Hi @krishkal I just installed the face app and was able to do a recognition.

We're trying to narrow down some causes. Can you look in your matrix-os output and look for something like this.

  detection config> { delay_between_updates: 0.05,
  timeout_after_last_ping: 0,
  image: null,
  malos_eye_config:
   { camera_config: { camera_id: 0, width: 640, height: 480 },
     detector_config: null,
     tracker_config: null,
     detection_server_config: null,
     object_to_detect: [] },
  zigbee_message: null,
  lirc: null,
  servo: null,
  gpio: null,
  humidity: null,
  micarray: null } +47ms

Please paste that here. Thanks for your patience.

@krishkal
Copy link

I started Matrix OS, and this time it said Upgrade Ready, 0.12.0 now available. After upgrading, it restarted. Then I tried the app again, and this time it worked!

Maybe the upgrade did the trick?

@krishkal
Copy link

Uh, oh. For a good measure, I rebooted the Pi, and went back to start Matrix OS again. Now, Matrix OS simply won't start. Output is:

Environment Selected: rc
Loading Core Matrix Files
Loading... device
/home/pi/matrix-os/lib/device/network.js:200
stop: function () {
^^^^
SyntaxError: missing ) after argument list
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:528:28)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at /home/pi/matrix-os/lib/device/index.js:18:27
at Array.forEach (native)
pi@raspberrypi:~/matrix-os$

@krishkal
Copy link

Guys, any ideas here? I am dead in the water...

@krishkal
Copy link

pi@raspberrypi:/matrix-os$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
pi@raspberrypi:
/matrix-os$ NODE_ENV=rc node index.js
Environment Selected: rc
Loading Core Matrix Files
Loading... device
/home/pi/matrix-os/lib/device/network.js:200
stop: function () {
^^^^
SyntaxError: missing ) after argument list
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:528:28)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at /home/pi/matrix-os/lib/device/index.js:18:27
at Array.forEach (native)
pi@raspberrypi:~/matrix-os$

brianofrokk3r added a commit that referenced this issue Apr 29, 2017
@brianofrokk3r
Copy link
Contributor Author

@krishkal do a latest pull from master, I believe this is fixed now.

@krishkal
Copy link

krishkal commented May 1, 2017

@brianofrokk3r Yes, this seems to be fixed now.

Also, faceTest seems to be working now as well.

@krishkal
Copy link

krishkal commented May 1, 2017

Now that everything seems to be working as it should :), trying to learn a bit more about this... Is the ComputerVision "service" running on the R-Pi processor, or on the Matrix board? I know the sensor processing runs on the Matrix. But, trying to figure out what, if any, of the following runs on the Matrix, as opposed to the main R-Pi:

  1. Capture of vision frames (i.e., malos_eye): I see malos_eye runs on the R-Pi. So, I assume that function has nothing to do with the Matrix board as such. Correct?
  2. Computer Vision: The call to matrix.service( algorithm, options ) is a call into malos, which runs on the R-Pi. However, does that, in turn, call a service within the Matrix board? This is my assumption, but making sure.
  3. The app itself (e.g., faceTest): I assume the app itself just runs on the R-Pi. Correct?

BTW, if there is some documentation hat explains all this that I have missed, please just point that out!

@gordinh
Copy link
Contributor

gordinh commented May 4, 2017

Sorry for the long delay @krishkal 😔
So answering you:

  1. The malos_eye runs the RPi. I assume that function has nothing to do with the Matrix board as such it's a way to think, the malos_eye is a process like anyother running on the RPi.
  2. No, the matrix.service is a call to MOS [MATRIX OS], and then the MOS process and calls the malos_eye and process that information. The MOS running in the RPi can call services and sensors on the MATRIX board.
  3. The app runs in the MOS. Abstracting it's like: faceTest -> MOS -> RPi

All docs are available here: https://matrix-io.github.io/matrix-documentation/
If you have anymore question i will try to answer ASAP.

@krishkal
Copy link

krishkal commented May 5, 2017

Thanks @gordinh. "The MOS running in the RPi can call services and sensors on the MATRIX board". So, by "services" I assume things like face detection. Is the source code for these services (that run on the MATRIX board) open? If so, where can I see it? I am trying to figure out what those look like, and how I can go about extending or changing them to suit some projects I have in mind.

@gordinh
Copy link
Contributor

gordinh commented May 6, 2017

Well for services you can look in the computer vision section on the link I had sent before. There you will see examples and the output. You can also run the MOS with DEBUG=* option to see all logs. You can also see the code in the repository on the lib folder for services :)

@krishkal
Copy link

krishkal commented May 6, 2017

Sorry, @gordinh, I am not seeing what you are seeing. If I go to the Code tab above, and go to lib/service I see a bunch of Javascript files. None of these are the source code for the services such as the Computer Vision services (face, palm, fist, etc.) which presumably run inside the matrix board. Where is the disconnect? Am I not understanding something right?

@gordinh
Copy link
Contributor

gordinh commented May 11, 2017

Sorry i think i didn't understanded your question. My bad. You can look for matrix-gesture in our repos, there are the sdks https://github.com/matrix-io/matrix-gesture-cpp-sdk for example
About the Face algorithm that one isn't open.
You can look at http://www.gesture.ai/#/index too.

@Eccabrera
Copy link

hello, a i'm new at matrix-os. Has anyone add a gpio output to this Face-demo?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants