software-dev


user-0eae33 09 January, 2020, 10:35:36

Hey guys, as #dhennem on 31.05.2019 I have troubles to get the GazeRaysDemo to work. Its one of the Unity Demos to get in touch with the handling of the pupil software within the unity environment. I went through all the demos, but in the GazeRaysDemo the Calibration doesn't work.

I had a look into the code, but I coudn't find anything fixable for myself.

Do you guys have an idea what might be the problem?

papr 09 January, 2020, 10:38:22

@user-0eae33 Please reach out to the vr-ar channel for help with the unity demos.

user-b8b425 10 January, 2020, 15:05:19

@papr Hi, could you please tell me that, regarding the Network API, is it possible to trigger all the events through the PUB-SUB connection?

user-b8b425 10 January, 2020, 15:05:41

I mean, all the events stated in the source code

user-b8b425 10 January, 2020, 15:06:03

Such as Emits notifications: eye_process.should_start eye_process.should_stop set_detection_mapping_mode world_process.started world_process.stopped recording.should_stop: Emits on camera failure launcher_process.should_stop

user-b8b425 10 January, 2020, 15:06:46

Because from what I read in the source code.

user-b8b425 10 January, 2020, 15:06:47

elif msg == "SUB_PORT": response = self.g_pool.ipc_sub_url.split(":")[-1] elif msg == "PUB_PORT": response = self.g_pool.ipc_pub_url.split(":")[-1]

user-b8b425 10 January, 2020, 15:07:16

It seems to be possible, I suppose ?

user-b8b425 10 January, 2020, 15:07:18

thantks

user-b8b425 10 January, 2020, 15:07:21

thanks

papr 10 January, 2020, 15:08:31

@user-b8b425 Do you just want to receive the messages, or do you want to send a message to Capture that triggers the according events?

user-b8b425 10 January, 2020, 15:09:37

I want to control the Capture remotely, maybe even change the configuration remotely, like the resolution of the camera etc

user-b8b425 10 January, 2020, 15:10:00

@papr Trigger the events

user-b8b425 10 January, 2020, 15:11:08

Maybe by adding the [email removed] function in "pupil_remote.py" ?

papr 10 January, 2020, 15:13:20

@user-b8b425 Have you seen our helpers already? https://github.com/pupil-labs/pupil-helpers/blob/master/python/pupil_remote_control.py

user-b8b425 10 January, 2020, 15:15:51

oh, thx , seems the "def notify(notification):" function can emit all the notifications right?

papr 10 January, 2020, 15:15:59

correct

user-b8b425 10 January, 2020, 15:16:30

Danke schon

user-2143a5 13 January, 2020, 20:17:13

Hi Pupil Labs team, quick question: is it possible to use the Pupil Capture software to capture gaze overlaid onto a screen recording, as opposed to the world camera video? Thanks!

user-b8b425 14 January, 2020, 10:11:48

@papr hi, i'm trying to run from source code on raspi, i successfully installed all the dependencies except one, the pupil-apriltags. I tried to install locally, it said:CMake Error in CMakeLists.txt: Running

   '/tmp/pip-build-env-d6ksm0je/overlay/bin/ninja' '--version'

  failed with:

   No such file or directory
user-b8b425 14 January, 2020, 10:12:00

Do you have any idea how to fix this?

user-c5fb8b 14 January, 2020, 10:31:15

Hi @user-b8b425 please note that we do not officially support the raspi for Pupil. Regarding the error: pupil-apriltags is merely a Python wrapper around the official apriltags library: https://github.com/AprilRobotics/apriltag The CMake error indicates that the original library cannot be copiled on your system. I am sorry, but you will have to figure out for yourself how to make the apriltag library compile on your raspi. If you manage to get this working, we'll gladly accept pull requests into pupil-apriltags that update the dependency to a version where compilation on raspi is supported.

user-b8b425 14 January, 2020, 11:32:24

Ok, thx

user-b8b425 14 January, 2020, 11:33:22

BTW, a small question is, the dependency is requiring cmake 3.14.4

user-b8b425 14 January, 2020, 11:34:02

would it work on higher version ?

user-b8b425 14 January, 2020, 11:34:28

I mean, on x64 platform

user-c5fb8b 14 January, 2020, 11:57:14

@user-b8b425 where do you find this requirement? The cmake version should be independent of your processor architecture. Pupil is built for x64 systems only, so all requirements of Pupil should work on x64.

user-b8b425 14 January, 2020, 12:10:24

@user-c5fb8b Regarding the previous question, it seems, after I removed the remote folder and copy the files into a local folder. It compiles

user-b8b425 14 January, 2020, 12:12:15

@user-c5fb8b the requirement is in pupil-apriltags

user-b8b425 14 January, 2020, 12:12:35

in "pyproject.toml"

user-c5fb8b 14 January, 2020, 12:14:45

Ah right, as you see there's a comment on this. We had an issue on mac with 3.15 which was the newest version when we built the wrapper, so we set the requirement back to 3.14. Feel free to edit pyproject.toml and try out newer versions.

user-65b830 15 January, 2020, 19:59:43

Hi! Is it possible to receive the normalized x and y coordinates from the surface tracker plugin in real time, through the API?

user-65b830 15 January, 2020, 22:28:16

Ok, I found the answer to my question in the documentation for Pupil Capture! If I subscribe to the surface topic through the IPC backbone, how can I receive only the normalized x and y coordinates? Thanks in advance!

papr 16 January, 2020, 07:53:34

@user-65b830 Subscribing to surface is correct. Its payload contains a field called gaze_on_srf which is a list containing gaze that was mapped to the surface.

user-65b830 16 January, 2020, 16:08:29

@papr thank you!! I am now able to stream real time surface gaze data 🙂 this is awesome, thanks for all of your help!

user-a51d13 16 January, 2020, 16:26:28

Hello! Is there a way to make Pupil Service publish "gaze.3d" topics? So far I have only managed to receive "gaze.2d" with it (using HoloLens add-on), although when I use Pupil Capture I can receive "gaze.3d". I tried switching the "Detection and mapping mode" through the UI, only change I see is the Pupil in the Gaze's base_data field has more information... Thanks!

papr 16 January, 2020, 16:33:00

@user-a51d13 this is matter of calibrating with 3d data. But I do not know if the hololens integration supports receiving 3d data. Please post your question in vr-ar for a certain answer.

user-a51d13 16 January, 2020, 16:40:34

thank you!

user-973483 21 January, 2020, 11:42:05

Afternoon, I tried to get some questions answered last week on vr-ar but this channel doesn't seem to be very active. It is possible to answer my questions here or is there another channel/source that I can access? I already tried to contact pupil labs by mail but have yet to receive a reply.

user-973483 21 January, 2020, 11:53:25

I'll just post it again in this channel.

user-973483 21 January, 2020, 11:53:43

Hi, I'm a game developer at the Utrecht University in the Netherlands where I build VR applications/prototypes for research. The Vive Pro Eye and the Pupil Labs Binocular Add-on for the Vive are currently on my radar. While I've read the documentation and github examples, I still have some unanswered questions. For context, I'm building an environment in Unity that is experienced from a seated position. I want to tracks pupil size and gaze(both timestamped) , I also want to measure saccadic eye movement. I'm currently researching VR eye tracking solutions for an upcoming project. My questions: 1. Are there events that indicate the start and end of saccadic eye movement or are is the prefabricated code available to measure this? 2. How does the data flow work from the integrated eye tracker into unity, is all raw data available in Unity or do I get data that is filtered for in game performance. 3. According to your documentation it should be possible to connect the Binocular Add-on can to the usb connector on the HTC Vive Pro. Does this mean that I wirelessly use the Binocular Add-on can in combination with the HTC Vive Wireless Adapter? If so, what kind of latency can I expect? 4. Is possible to add/remove the Pupil Labs Binocular Add-on multiple times or will that cause damage to the headset and/or Binocular Add-on 5. I've recently read an article on slippage: https://link.springer.com/article/10.3758/s13428-019-01307-0 How does the binocular add-on perform in this matter? 6. This question might seem a bit naive. Is there an active pupil labs developers community. This discord server doesn’t seem to be very active, I hope there are more sources out there. I hope someone here is able to answer my questions. Thanks in advance, I'm looking forward to our input.

papr 22 January, 2020, 09:28:19

@user-973483 Please check your inbox. You should have received a response from info@pupil-labs.com yester.day. 👍

user-973483 22 January, 2020, 09:37:44

thanks @papr

user-b8b425 22 January, 2020, 15:57:18

@papr Hi, i'm experiencing a weird problem. I'm running from source code (pupil core), sometimes the window would freeze (could be any one of the three windows), and if I move the mouse cursor onto the window, it starts to refresh again. Do you have any idea what is happening ? The code is not modified and the dependencies are installed according to the document, the OS is ubuntu 18

papr 22 January, 2020, 16:07:14

@user-b8b425 I have not experienced this problem before. Is your headset connected via a USB hub or via a direct connection?

user-b8b425 22 January, 2020, 16:08:09

direct connection

user-b8b425 22 January, 2020, 16:08:31

it happens both on a regular PC and a powerful workstation

papr 22 January, 2020, 16:08:33

Ok, I asked because I have experienced issues with some usb hubs in the past.

papr 22 January, 2020, 16:09:18

Is the problem solved as soon as the mouse is moved or the mouse enters the Capture window?

user-b8b425 22 January, 2020, 16:09:19

However, it would not happen with the released software

papr 22 January, 2020, 16:09:37

@user-b8b425 Which glfw version do you have installed?

user-b8b425 22 January, 2020, 16:09:45

let me check

user-b8b425 22 January, 2020, 16:10:38

it's libglfw3-dev

papr 22 January, 2020, 16:10:53

@user-b8b425 I recommend building the current 3.3 release from source https://www.glfw.org/docs/latest/compile_guide.html

AFAIK the apt release is out of date

user-b8b425 22 January, 2020, 16:10:56

the same as you suggested on the pupil/dependency webpage

user-b8b425 22 January, 2020, 16:11:41

ok i'll try that tomorrow.

papr 22 January, 2020, 16:11:44

glfw is just a guess on what the issue might be. It is possible that the apt release is fine.

user-b8b425 22 January, 2020, 16:12:10

OK. thanks, i'll keep you updated

user-54376c 23 January, 2020, 08:26:06

Is there any built in way to use the Pupil Player do "replay" a recording over the network (ZeroMQ)?

user-b8b425 23 January, 2020, 09:35:00

@papr Hi, I compiled and installed the latest glfw lib, unfortunately, it has not been fixed

user-b8b425 23 January, 2020, 09:35:27

it still goes freeze after running for a while

user-b8b425 23 January, 2020, 09:35:56

do you think is it possible something wrong with the timer?

papr 23 January, 2020, 09:36:02

Is the problem solved as soon as the mouse is moved or the mouse enters the Capture window? Have you been able to test this?

user-b8b425 23 January, 2020, 09:36:08

yes

user-b8b425 23 January, 2020, 09:36:23

once the mouse is moved upon the window

user-b8b425 23 January, 2020, 09:36:29

it starts to work again

user-b8b425 23 January, 2020, 09:37:59

the cpu usage also decreased when the window get freeze

user-b8b425 23 January, 2020, 09:38:44

now all three of them are freeze, the CPU usage goes down to around 10%

user-b8b425 23 January, 2020, 09:38:56

0% now

user-b8b425 23 January, 2020, 09:39:33

in terminal, it still outputs "*** Correcting clock frequency to 14999909"

papr 23 January, 2020, 09:41:18

@user-b8b425 Are you running the master branch? If so, could you let me know the output of git describe --long

user-b8b425 23 January, 2020, 09:41:33

1 min

user-b8b425 23 January, 2020, 09:42:05

v1.21-5-ga9d492ec

user-b8b425 23 January, 2020, 09:43:39

@papr Are all the dependencies on the document updated to date?

papr 23 January, 2020, 09:45:06

Could you share the ~/pupil_capture_settings/capture.log file of a session where such a freeze happened?

user-b8b425 23 January, 2020, 09:46:21

sorry

user-b8b425 23 January, 2020, 09:46:28

this is the wrong one

user-b8b425 23 January, 2020, 09:46:50

capture.log

papr 23 January, 2020, 09:48:38

This log only shows a session of 5 seconds. Could you please run a longer session, e.g. ~60seconds

papr 23 January, 2020, 09:50:47

And do I understand correctly that the video freezes immediately as soon as the mouse leaves the window?

user-b8b425 23 January, 2020, 09:50:58

no

user-b8b425 23 January, 2020, 09:52:28

the capture would sometimes freeze, when the mouse moves onto the window, it unfreezes

user-b8b425 23 January, 2020, 09:53:27

i found a suspect message

user-b8b425 23 January, 2020, 09:53:28

2020-01-23 10:49:52,658 - world - [WARNING] uvc: Turbojpeg jpeg2yuv: b'Corrupt JPEG data: premature end of data segment'

user-b8b425 23 January, 2020, 09:53:41

capture.log

user-b8b425 23 January, 2020, 09:53:47

here is the full log

user-b8b425 23 January, 2020, 09:54:49

the Turbojpeg lib i'm using now, is what stated in the dependency document, i think it's 1.5.1

papr 23 January, 2020, 09:55:51

It is ok for this to happen, as long as it does not happen in high frequency.

user-b8b425 23 January, 2020, 09:56:14

ok

user-b8b425 23 January, 2020, 09:56:16

for this log

user-b8b425 23 January, 2020, 09:56:32

the world window freezes at nearly the end

user-b8b425 23 January, 2020, 10:14:37

@papr I just did some testing, it seems there is nothing inside the log when it freezes

user-b8b425 23 January, 2020, 10:16:02

E0123 11:15:04.243528 6251 trust_region_minimizer.cc:72] Terminating: Residual and Jacobian evaluation failed.

user-b8b425 23 January, 2020, 10:16:07

Does this matter?

papr 23 January, 2020, 10:16:48

I just did some testing, it seems there is nothing inside the log when it freezes I can confirm this. Terminating: Residual and Jacobian evaluation failed. Does this matter? No, it is a log message from the 3d eye model

papr 23 January, 2020, 10:19:35

@user-b8b425 So the only thing freezing is the camera video preview, the graphs etc continue working?

user-b8b425 23 January, 2020, 10:23:35

all the things freeze

user-b8b425 23 January, 2020, 10:23:42

including CPU graph

user-b8b425 23 January, 2020, 10:23:50

confidence

user-b8b425 23 January, 2020, 10:24:06

all things inside the window

papr 23 January, 2020, 10:28:55

How do you know that the cpu graph goes down to 10%/0% then?

user-b8b425 23 January, 2020, 10:29:07

i opened another terminal

user-b8b425 23 January, 2020, 10:29:09

and htop

papr 23 January, 2020, 10:29:47

ah ok, I thought you were reading the values from the graph in the top left of the window

papr 23 January, 2020, 10:36:15

@user-54376c Technically, there is a notification that can be sent to seek, but the issue is that Player does not run Pupil Remote, making it difficult to access the ipc backend. The ipc backend ports are allocated randomly on application start.

user-b8b425 23 January, 2020, 11:26:52

@papr Hi, how could I run the source code with a debugger ? Maybe if I can put a breakpoint somewhere or pause the programme when it freezes, I shall be able to tell what is the problem

user-b8b425 23 January, 2020, 11:28:09

if I run the source code with debugger, it says : "RuntimeError: already started"

user-b8b425 23 January, 2020, 11:28:40

Maybe my environment config is somehow wrong ?

user-b8b425 23 January, 2020, 14:56:07

@papr Hi, any updates?

papr 23 January, 2020, 14:58:15

@user-b8b425 @user-c5fb8b will send you his Visual Studio Code debug launch config.

papr 23 January, 2020, 14:58:59

Unfortunately, we won't be able to help effectively, since we have not come across this issue yet, and are not able to reproduce it on our Ubuntu 18.04 machines.

user-c5fb8b 23 January, 2020, 15:05:06

@user-b8b425 Hi. I'm using Visual Studio Code to debug Pupil from both Windows and Ubuntu. The problem is that VSCode currently has a problem with their python debugger, making it unable to debug multiprocessing code on Ubuntu. Unfortunately Pupil runs in a multiprocessing environment, so it won't work out of the box. I have a custom beta build of the python debugger running with is good enough for my needs. If you need to run on Ubuntu, I'd probably rather recommend a different IDE (maybe PyCharm?) But I can't help you with setting up the debugger there. I'll ask around though if someone from our R&D team uses PyCharm and can share a debug config. However, if you are able to switch to Windows or Mac, you can use the following config for debugging Pupil from Visual Studio Code:

user-c5fb8b 23 January, 2020, 15:05:07
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Run Capture",
            "type": "python",
            "request": "launch",
            "cwd": "${workspaceFolder}/pupil_src",
            "program": "${workspaceFolder}/pupil_src/main.py",
            "args": [
                "capture",
                "--debug"
            ],
            "subProcess": true,
            "justMyCode": false,
        },
        {
            "name": "Run Player",
            "type": "python",
            "request": "launch",
            "cwd": "${workspaceFolder}/pupil_src",
            "program": "${workspaceFolder}/pupil_src/main.py",
            "args": [
                "player",
                "--debug"
            ],
            "subProcess": true,
            "justMyCode": false,
        },
        {
            "name": "Run Service",
            "type": "python",
            "request": "launch",
            "cwd": "${workspaceFolder}/pupil_src",
            "program": "${workspaceFolder}/pupil_src/main.py",
            "args": [
                "service",
                "--debug"
            ],
            "subProcess": true,
            "justMyCode": false,
        },
    ]
}
user-b8b425 23 January, 2020, 15:05:13

OK thx. Does all the dependencies exactly the same as shown in the doc/dependencis ?

user-b8b425 23 January, 2020, 15:06:22

@user-c5fb8b OK, thanks, I'll try it first

papr 23 January, 2020, 15:07:18

@user-b8b425 Yes, the dependencies from the docs should be correct. In some cases, e.g. glfw, it is possible to build newer versions from source.

user-b8b425 23 January, 2020, 15:08:53

OK, i'll keep you guys updated once I found something

user-c5fb8b 23 January, 2020, 15:10:02

@user-b8b425 In PyCharm you should be able to also just select main.py as start script and make sure to supply capture as parameter in the debug settings in order to start Pupil Capture with the debugger attached.

user-b8b425 23 January, 2020, 15:11:02

@user-c5fb8b I'm currently using vscode to edit code, maybe I'll try PyCharm if I'm not able to solve the problem

user-c5fb8b 23 January, 2020, 15:14:15

Like I said there's an issue with the vscode python debugger on Ubuntu. You can follow the issue here: https://github.com/microsoft/ptvsd/issues/1706 If you are feeling adventurous, you can try building their custom beta version. References are in the linked thread.

user-b8b425 23 January, 2020, 16:45:34

So far, I can only tell, when the window freezes, the process cannot be suspended by the debugger, I just added some "print()" function to see what it is doing.

user-b8b425 23 January, 2020, 17:34:40

before freeze, the program was at the GL drawing

papr 23 January, 2020, 17:35:14

So it might be an issue with your graphics driver? I can only guess 😕

user-b8b425 23 January, 2020, 17:35:20

somewhere inside the "if window_should_update():"

user-b8b425 23 January, 2020, 17:37:02

idk, but this issue happens both on my regular PC and our workstation. So the chance that it is the graphics driver to blame is very small I think

user-b8b425 23 January, 2020, 17:37:30

Maybe I'll try to test it on a windows machine and see if the problem goes away

user-b8b425 23 January, 2020, 17:38:27

could this "glfw.glfwPollEvents()" suspend the thread?

papr 23 January, 2020, 17:39:43

yes, it blocks to call registered ui callbacks. If one of these callbacks blocks, it will block the main loop

user-b8b425 23 January, 2020, 17:42:23

I'll continue this maybe tomorrow or next week then, gonna run now

user-b8b425 23 January, 2020, 17:42:26

thx

user-b8b425 27 January, 2020, 13:17:26

@user-c5fb8b Hi

user-b8b425 27 January, 2020, 13:17:38

I've run some tests

user-b8b425 27 January, 2020, 13:17:53

it seems, when the window freeze, the process get stuck in

user-b8b425 27 January, 2020, 13:17:54

clipboard = glfw.glfwGetClipboardString(main_window).decode()

user-b8b425 27 January, 2020, 13:17:56

this function

user-b8b425 27 January, 2020, 13:18:16

GL drawing

user-b8b425 27 January, 2020, 13:18:18 render GUI
                try:
                    clipboard = glfw.glfwGetClipboardString(main_window).decode()
                except AttributeError:  # clipboard is None, might happen on startup
                    clipboard = ""
papr 27 January, 2020, 13:18:45

Nice find!

user-b8b425 27 January, 2020, 13:20:12

could I just bypass all clipboard stuff ?

user-b8b425 27 January, 2020, 13:20:31

seems it's not vital

papr 27 January, 2020, 13:20:46

Yes that is indeed possible.

user-b8b425 27 January, 2020, 13:20:57

ok, i'll try

papr 27 January, 2020, 13:21:04

This only effects pasting text into text fields

user-b8b425 27 January, 2020, 13:37:03

it seems it is not freezing again.

user-b8b425 27 January, 2020, 13:37:24

I'll run it for perhaps for one hour or longer to see

user-b8b425 27 January, 2020, 14:07:24

@papr I think, basically, problem solved. But I'm still confused. Why it feels like this problem will not occur with the released bundle. Or the possibility is very small

papr 27 January, 2020, 14:12:55

Maybe your compiled glfw uses a different lib to access the clipboard than the bundled one

papr 27 January, 2020, 14:13:30

And maybe this non-bundled lib is not able to properly provide the clipboard while the app is inactive

user-b8b425 27 January, 2020, 14:14:00

idk, last time you mentioned about the version of glfw. I compiled& installed the latest version, the problem still existed.

papr 27 January, 2020, 14:15:00

I do not think that this is an issue with glfw itself but the lib providing the clipboard access. glfw is a cross-plattform lib and is just an abstraction of multiple way to access the OS's clipboard

user-b8b425 27 January, 2020, 14:19:21

possibly it's due to the python wrapper ?

papr 27 January, 2020, 14:20:04

Unlikely, since Pupil source and bundle use the same bindings for glfw.

user-b8b425 27 January, 2020, 14:25:13

OK, anyway, my problem is solved, and I have no plan to fix the clipboard stuff. LOL

user-b8b425 27 January, 2020, 14:25:16

thanks

user-b8b425 27 January, 2020, 14:25:20

Danke

papr 27 January, 2020, 14:28:43

Good luck!

wrp 28 January, 2020, 03:16:30
End of January archive